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

Add 'ignore-trailing-jobs' as optional flag #2759

Merged
merged 4 commits into from
Mar 12, 2025

Conversation

emilkovacev
Copy link
Collaborator

@emilkovacev emilkovacev commented Mar 11, 2025

nb-tester by default uses QiskitRuntimeService to cancel trailing jobs. This assumes that jobs are run using that same configuration, as opposed to being passed in via a patch. For notebooks run with fake backends, this should not be a requirement. The flag '--ignore-trailing-jobs' allows users of nb-tester to skip the step to cancel trailing jobs.

@qiskit-bot
Copy link
Contributor

Thanks for contributing to Qiskit documentation!

Before your PR can be merged, it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. Thanks! 🙌

Copy link
Collaborator

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

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

This seems useful.

I don't think we want ignoring trailing jobs to be the default, though. Most users of nb-tester do want the safer behavior of canceling trailing jobs. It would be surprising to need to specify an arg to do the safe thing. This would be a gotcha for our local users of nb-tester in this repository.

What do you think of renaming --cancel-trailing-jobs to instead be --ignore-trailing-jobs? So, we keep the default behavior the same as the status quo.

@emilkovacev emilkovacev force-pushed the fix/cancel-trailing-jobs branch from 5bf2519 to b5648cb Compare March 11, 2025 21:53
@emilkovacev
Copy link
Collaborator Author

What do you think of renaming --cancel-trailing-jobs to instead be --ignore-trailing-jobs? So, we keep the default behavior the same as the status quo.

Seems reasonable to me! I rewrote the functionality to work as you described.

Copy link
Collaborator

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

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

Thanks for making that change!

@Eric-Arellano
Copy link
Collaborator

PR title and description need updates, please

Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
@emilkovacev emilkovacev changed the title Add 'cancel-trailing-jobs' as optional flag Add 'ignore-trailing-jobs' as optional flag Mar 11, 2025
Copy link
Collaborator

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

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

Going to let @frankharkins review and merge, but lgtm :)

Copy link
Member

@frankharkins frankharkins left a comment

Choose a reason for hiding this comment

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

Thank you!

@frankharkins frankharkins added this pull request to the merge queue Mar 12, 2025
Merged via the queue into main with commit 254ec1a Mar 12, 2025
3 checks passed
@frankharkins frankharkins deleted the fix/cancel-trailing-jobs branch March 12, 2025 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants