-
Notifications
You must be signed in to change notification settings - Fork 7
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
Fix attach to job that exits immediately #2086
Conversation
neuro-cli/src/neuro_cli/ael.py
Outdated
# - wrong usage api usage (checked by tests) | ||
# - container already stopped, so we can ignore such error | ||
|
||
if e.status != 400: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can also use special HTTP status for this case (409 CONFLICT
or 410 GONE
may be relevant), but it is somewhat hacky.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
410 Gone
sounds really good. I'd like to distinguish 'bad request data' and 'job is already finished'.
Maybe 404 Not Found
is the better alternative? At least we use this status for similar situations, isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, 404
also sounds like a good idea to me. Sometimes the best option is the simplest one:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR to platform monitoring: neuro-inc/platform-monitoring#377
Codecov Report
@@ Coverage Diff @@
## master #2086 +/- ##
==========================================
- Coverage 86.79% 85.88% -0.92%
==========================================
Files 63 63
Lines 10030 10034 +4
Branches 1581 1583 +2
==========================================
- Hits 8706 8618 -88
- Misses 1015 1113 +98
+ Partials 309 303 -6
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
No description provided.