-
Notifications
You must be signed in to change notification settings - Fork 39
Test mode post merge cleanups #893
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
Test mode post merge cleanups #893
Conversation
Replace custom mock_context fixture with the shared tmp_context fixture from conftest.py, using a real WorkContext instead of a mock. Closes python-wheel-build#892 Co-Authored-By: Claude <claude@anthropic.com> Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
1c5640d to
1dafd38
Compare
| else: | ||
| version = None | ||
| self._record_test_mode_failure(req, version, err, "bootstrap") | ||
| logger.info(f"bootstrapping {req} as {req_type} dependency of {self.why[-1:]}") |
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.
The resolver logic needs to be inside the try/except, since it is still a common source of failures.
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.
This is a good suggestion. Will fix 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.
Fixed it in 400544a
src/fromager/bootstrapper.py
Outdated
| req_type | ||
| ) | ||
|
|
||
| # Avoid cyclic dependencies and redundant processing. |
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.
Maybe this logic could move to bootstrap too? Then this internal function becomes the "actually do the bootstrap" function and the outer one is managing the setup and error handling.
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.
@dhellmann Do you mean the code for cyclic dependencies and redundant processing logic should move from _bootstrap_impl to bootstrap() ?
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.
Fixed this in a separate commit in bbad8fa
Move resolve_version() and _track_why context manager from _bootstrap_impl to bootstrap() for cleaner exception handling and direct access to resolved_version without cache lookup. Co-Authored-By: Claude <claude@anthropic.com> Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
1dafd38 to
400544a
Compare
…strap() Cleaner separation: bootstrap() handles setup/validation/error-handling, _bootstrap_impl() performs only the actual build work. Co-Authored-By: Claude <claude@anthropic.com> Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
bbad8fa to
5bb0b55
Compare
dhellmann
left a comment
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 should add an e2e test for something where bootstrapping fails, too.
@dhellmann I have created #895 to track the e2e test |
Contains following commits
Followup clean ups suggested by @dhellmann during review of #865 . There is one more cleanup but it will be larger refactor, so planning to send another PR for that.