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

properly scope try/except when loading obsoleted keys #1286

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

evgeni
Copy link
Member

@evgeni evgeni commented Aug 21, 2024

We want to load all possible keys, even after a KeyError happenend

Fixes: 7e0fb44

Copy link

Thank you for contributing to the Leapp project!

Please note that every PR needs to comply with the Leapp Guidelines and must pass all tests in order to be mergeable.
If you want to request a review or rebuild a package in copr, you can use following commands as a comment:

  • review please @oamg/developers to notify leapp developers of the review request
  • /packit copr-build to submit a public copr build using packit

Packit will automatically schedule regression tests for this PR's build and latest upstream leapp build.
However, here are additional useful commands for packit:

  • /packit test to re-run manually the default tests
  • /packit retest-failed to re-run failed tests manually
  • /packit test oamg/leapp#42 to run tests with leapp builds for the leapp PR#42 (default is latest upstream - master - build)

Note that first time contributors cannot run tests automatically - they need to be started by a reviewer.

It is possible to schedule specific on-demand tests as well. Currently 2 test sets are supported, beaker-minimal and kernel-rt, both can be used to be run on all upgrade paths or just a couple of specific ones.
To launch on-demand tests with packit:

  • /packit test --labels kernel-rt to schedule kernel-rt tests set for all upgrade paths
  • /packit test --labels beaker-minimal-8.10to9.4,kernel-rt-8.10to9.4 to schedule kernel-rt and beaker-minimal test sets for 8.10->9.4 upgrade path

See other labels for particular jobs defined in the .packit.yaml file.

Please open ticket in case you experience technical problem with the CI. (RH internal only)

Note: In case there are problems with tests not being triggered automatically on new PR/commit or pending for a long time, please contact leapp-infra.

@evgeni
Copy link
Member Author

evgeni commented Aug 21, 2024

@pirat89 damn, the first PR was not as good as I thought yesterday. This one is better scoped. Sorry!

TL;DR:

>>> things = {'7': 'seven', '9': 'nine'}
>>> keys = []
>>> try:
...     for i in ['7', '8', '9']:
...         keys.append(things[i])
... except KeyError:
...     pass
... 
>>> keys
['seven']
>>> things = {'7': 'seven', '9': 'nine'}
>>> keys = []
>>> for i in ['7', '8', '9']:
...     try:
...         keys.append(things[i])
...     except KeyError:
...         pass
...     
... 
>>> keys
['seven', 'nine']

Copy link
Member

@pirat89 pirat89 left a comment

Choose a reason for hiding this comment

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

ouch. I missed that too. can you please add unit-tests that will cover the changed behaviour?

@evgeni evgeni force-pushed the keyerror branch 12 times, most recently from 5daf43f to 775693b Compare August 23, 2024 19:37
@evgeni
Copy link
Member Author

evgeni commented Aug 23, 2024

@pirat89 done!

@evgeni evgeni force-pushed the keyerror branch 2 times, most recently from a1744ec to f575b00 Compare August 24, 2024 06:37
We want to load all possible keys, even *after* a KeyError happenend

Fixes: 7e0fb44
@evgeni
Copy link
Member Author

evgeni commented Aug 24, 2024

testing farm seems to have a bad day:

"stderr": "The server rate limit has been exceeded, please try again later."

@pirat89
Copy link
Member

pirat89 commented Aug 26, 2024

testing farm seems to have a bad day:

"stderr": "The server rate limit has been exceeded, please try again later."

there has been an internal outage. re-running

@pirat89
Copy link
Member

pirat89 commented Aug 26, 2024

/packit copr-build

@evgeni
Copy link
Member Author

evgeni commented Aug 28, 2024

/packit retest-failed

@pirat89
Copy link
Member

pirat89 commented Aug 28, 2024

@evgeni ignore failed tests with "ondemand" substring. We are aware that these are failing most likely due to some changes in tests / test tooling / configuration which we missed.

@evgeni
Copy link
Member Author

evgeni commented Aug 28, 2024

Okay, then this is as green as it gets I guess

@pirat89 pirat89 merged commit bf302fc into oamg:master Aug 30, 2024
29 of 32 checks passed
@pirat89 pirat89 added the changelog-checked The merger/reviewer checked the changelog draft document and updated it when relevant label Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-checked The merger/reviewer checked the changelog draft document and updated it when relevant
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants