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

a bit more detailed erroring in the scheduler client. #3546

Merged
merged 4 commits into from
Sep 18, 2024

Conversation

underdarknl
Copy link
Contributor

Changes

We noticed some issues in Rocky's interaction with the scheduler, where we where unable to see what the organization or even the url was.

Issue link

You have to create an issue to link to this PR. If this really is not possible, write a very detailed description here and add this PR to the project board directly.

Please add the link to the issue after "Closes".

Closes ...

Demo

Please add some proof in the form of screenshots or screen recordings to show (off) new functionality, if there are interesting new features for end-users.

QA notes

Please add some information for QA on how to test the newly created code.


Code Checklist

  • All the commits in this PR are properly PGP-signed and verified.
  • This PR only contains functionality relevant to the issue.
  • I have written unit tests for the changes or fixes I made.
  • I have checked the documentation and made changes where necessary.
  • I have performed a self-review of my code and refactored it to the best of my abilities.
  • Tickets have been created for newly discovered issues.
  • For any non-trivial functionality, I have added integration and/or end-to-end tests.
  • I have informed others of any required .env changes files if required and changed the .env-dist accordingly.
  • I have included comments in the code to elaborate on what is not self-evident from the code itself, including references to issues and discussions online, or implicit behavior of an interface.

Checklist for code reviewers:

Copy-paste the checklist from the docs/source/templates folder into your comment.


Checklist for QA:

Copy-paste the checklist from the docs/source/templates folder into your comment.

@underdarknl underdarknl requested a review from a team as a code owner September 17, 2024 15:05
Copy link
Contributor

@ammar92 ammar92 left a comment

Choose a reason for hiding this comment

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

The current scheduler client doesn't have a consistent way of dealing with this indeed.

But may I suggest reverting the introduction of the path variable, but keep the raise from http_error clause? Because a formatted HTTPStatusError (which also contains both the request and response) already has the information you need (the error message, status code and the request URL).
image
This makes the path variable redundant.

Another option is to also log the errors. This would provide structured logging with contextual information (such as the organization and user)

@dekkers dekkers merged commit 61ef453 into main Sep 18, 2024
10 checks passed
@dekkers dekkers deleted the feat/better-scheduler-clients-errors branch September 18, 2024 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants