Skip to content
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

flux-job: improve EPERM error message #5971

Merged
merged 2 commits into from
May 16, 2024
Merged

Conversation

grondo
Copy link
Contributor

@grondo grondo commented May 16, 2024

This PR just closes an old issue since the fix was simple enough.

Copy link
Member

@garlick garlick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"I thought you said my job did not bite?"
"That is not your job"

https://www.youtube.com/shorts/lLR-V2S0DC8

@grondo
Copy link
Contributor Author

grondo commented May 16, 2024

Thanks! Setting MWP

Problem: When attaching to a job of another user, the error message

 flux-job: flux_job_event_watch_get: Operation not permitted

is emitted by `flux job attach` which isn't helpful.

Improve the error message to

 flux-job: Failed to attach to JOBID: That is not your job

Fixes flux-framework#2852
Problem: No tests in the testsuite ensure that a sensible error is
generated when a guest user attempts to `flux job attach` to a job
they do not own.

Add a test to t2500-job-attach.t.
Copy link

codecov bot commented May 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.32%. Comparing base (a3cfb3b) to head (4149a9e).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5971      +/-   ##
==========================================
+ Coverage   83.29%   83.32%   +0.02%     
==========================================
  Files         515      515              
  Lines       83405    83407       +2     
==========================================
+ Hits        69471    69497      +26     
+ Misses      13934    13910      -24     
Files Coverage Δ
src/cmd/job/attach.c 85.66% <100.00%> (+0.04%) ⬆️

... and 11 files with indirect coverage changes

@mergify mergify bot merged commit 8a6eb0e into flux-framework:master May 16, 2024
35 checks passed
@grondo grondo deleted the issue#2852 branch May 16, 2024 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants