-
Notifications
You must be signed in to change notification settings - Fork 53
flux-job: support attach --tail #6899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
chu11
wants to merge
10
commits into
flux-framework:master
Choose a base branch
from
chu11:issue5035_job_attach_tail
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
22b8359
to
5595fab
Compare
53b167f
to
4ce4fc3
Compare
Problem: A simple assignment to a variable did not have proper spacing. Fix the simple whitspace problem.
Problem: In flux-core, function parameters are normally placed on separate lines if they exceed 80 chars. Some code in the libjob did not follow this. Update code in libjob for consistency.
Problem: When watching appends to a key, it would be convenient if we knew when the "initial" or "current" data has been fully sent before waiting / watching for future data. It would take several RPCs to accomplish this at the moment. Support a new KVS_WATCH_APPEND_INITIAL_SENTINEL flag in kvs-watch. An empty RPC will be sent after all "initial" or "current" data has read from the KVS and sent to the caller. Update flux_kvs_lookup_get() and flux_kvs_lookup_get_raw() to return NULL (or 0) for OUT parameters when a sentinel has been received.
Problem: There are no tests that cover the new FLUX_KVS_WATCH_APPEND_INITIAL_SENTINEL flag. Solution: Add tests to t1007-kvs-lookup-watch.t and a helper test file watch_initial_sentinel.c.
Problem: The new FLUX_KVS_WATCH_APPEND_INITIAL_SENTINEL flag in libkvs is not documented. Add documentation in flux_kvs_loopup(3)
Problem: The kvs-watch module recently supported a FLUX_KVS_WATCH_APPEND_INITIAL_SENTINEL flag. The the job-info module does not take advantage of this flag when watching an eventlog. Support a new FLUX_JOB_EVENT_WATCH_INITIAL_SENTINEL flag. Update flux_job_event_watch_get() to return an empty event if the sentinel has been reached. Fixes flux-framework#6872
Problem: There are no tests to cover the new FLUX_JOB_EVENT_WATCH_INITIAL_SENTINEL flag. Solution: Add tests to t2231-job-info-eventlog-watch.t and a helper test file eventlog_watch_initial_sentinel.c.
Problem: Some parameters to a fbuf_read_watcher_create() call were not indented properly. Fix invalid indentation.
Problem: If flux job attach is executed on a long running job, it outputs all job output for that job. If the job output is extremely long, this extremely long output can be very annoying to the user. In many cases, a user only wants to see the newest output (i.e. current job status, error message causing the job to fail, etc.). Support a --tail option. By default it outputs the last 10 lines of output, but an optional argument can be specified for additional lines. Fixes flux-framework#5035
Problem: There are no tests for the new "flux job attach" --tail option. Add coverage in t2500-job-attach.t.
4ce4fc3
to
acb3af4
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6899 +/- ##
==========================================
- Coverage 83.91% 83.89% -0.02%
==========================================
Files 540 540
Lines 90610 90769 +159
==========================================
+ Hits 76033 76152 +119
- Misses 14577 14617 +40
🚀 New features to boost your workflow:
|
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.
Built on top of #6880, per discussion in #5035, this supports a new
--tail
option toflux job attach
.Note that this performs poorly, as we don't presently have a way to "jump forward" in the output eventlog. So all events in the log are forwared to
flux job attach
, butflux job attach
, just saves them off until it knows when to begin outputting "tail" events using the new "initial sentinel" in #6880. The "jump forward" is for a future support.