Skip to content

Conversation

@diego-plan9
Copy link
Member

Summary

Tweak the reintroduced delete_job tests (from #2541) so they are skipped in case the credentials do not allow for deletion of jobs.

Details and comments

Fixes #2548

Copy link
Collaborator

@yaelbh yaelbh left a comment

Choose a reason for hiding this comment

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

  1. Can we not skip if the error is 1401?
  2. Can we know in advance if there are privileges, to refrain from running the program?
  3. It will be good to ask Matt to approve as well, as the creator of the issue.

@diego-plan9
Copy link
Member Author

CC @mriedem indeed for review and the above questions.

@yaelbh
Copy link
Collaborator

yaelbh commented Jan 13, 2026

@diego-plan9 The first question is in fact a code review comment. It amounts to refining "403" in ex.message to verify that the characters before and after 403 are not number, and the same also for 401.

@diego-plan9
Copy link
Member Author

Ah, I misread and thought you were asking to avoid skipping if the HTTP error was 401. I pushed f9e1f2f with a less ambiguous matching: unfortunately, the real RequestsApiError exception does not get raised from the IBMRuntimeError so we are limited to comparing the strings, but hopefully this will indeed prevent it picking up other strings unintendedly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change how delete_job tests are skipped to avoid confusion

2 participants