Checkpoint in log checking improvement; extraction of compile aliases…#408
Open
rrivera747 wants to merge 2 commits into
Open
Checkpoint in log checking improvement; extraction of compile aliases…#408rrivera747 wants to merge 2 commits into
rrivera747 wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the tools/ots log-finding capabilities with new modes for local-only and ARTDAQ-host log discovery, and factors compile-related shell aliases into a standalone script installed via the tools CMake packaging.
Changes:
- Added
ots -ll/--logfind-local(local-only) andots -lll/--logfind-artdaq(local + ARTDAQ hosts from latestranks.txt) log-finding modes. - Implemented expanded “recently written files” scanning under
$USER_DATA/Logs, action-handler logs undertmp/, and ARTDAQ configuration/run-record locations. - Added and installed
tools/ots_compile_aliases.shas a reusable compile-alias helper script.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| tools/ots_compile_aliases.sh | New compile alias helper with lockfile protection and build/install logging. |
| tools/ots | Adds new logfind flags and substantial log discovery + remote SSH parsing logic. |
| tools/CMakeLists.txt | Installs the new ots_compile_aliases.sh script via cet_script(ALWAYS_COPY ...). |
Comment on lines
+1
to
+8
| #!/bin/sh | ||
| # Source this to get color code variables to use during output | ||
|
|
||
| # setup compile aliases (for more spack debug info, use spack -d install -j$CETPKG_J 2>&1) | ||
| #============================ | ||
| lockfile="/tmp/ots_compile_${OTS_SOURCE//\//_}.lock" | ||
|
|
||
| get_lock() { |
Comment on lines
+80
to
+85
| #only run warn check if build succeeded | ||
| if [ $CHECK_GIT_REPO_STATUS == 1 ]; then | ||
| echo -e "$(date +%d%h%y.%T) setup_ots.sh:${LINENO} | \t Will report a warning if any uncommitted code found..." | ||
| UpdateOTS.sh --warnfast 2>&1 >/dev/null | ||
| echo #to get back to terminal | ||
| fi |
Comment on lines
+2691
to
+2694
| # extract file path from lines containing "less /" | ||
| if [[ "$_lf_clean" == *"less /"* ]]; then | ||
| _lf_path="${_lf_clean##*less }" | ||
| _lf_path="${_lf_path%% *}" # trim any trailing whitespace |
Comment on lines
+3081
to
+3082
| if [[ "$_lf_clean" == *"less /"* ]]; then | ||
| _lf_path="${_lf_clean##*less }" |
| # - Also search each remote host from the XML via: | ||
| # ssh -K host "cd <ots_root> && source ./fast_ots_setup.sh <subsystem> logs" | ||
| # which sources the environment and runs 'ots -ll' (local-only log find). | ||
| # - ots -ll outputs machine-parseable lines: LOGFIND_LOCAL:<time_label>:<path> |
| _logfind_runrecords_dir="" | ||
|
|
||
| # find the latest (highest numbered) run record directory | ||
| _logfind_latest_run_dir=$(find -L "${USER_DATA}/ARTDAQConfigurations/run_records" -maxdepth 1 -mindepth 1 -type d 2>/dev/null | sort -t/ -k$(echo "${USER_DATA}/ARTDAQConfigurations/run_records/x" | tr -cd '/' | wc -c) -n | tail -1) |
Comment on lines
+2973
to
+2974
| | sort -t/ -k$(echo "${USER_DATA}/ARTDAQConfigurations/run_records/" | tr -cd '/' | wc -c) -n \ | ||
| | tail -1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… as general tool