-
Notifications
You must be signed in to change notification settings - Fork 12
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 debug message for expected build tag #543
Conversation
39375f3
to
57402b1
Compare
src/fromager/bootstrapper.py
Outdated
@@ -323,6 +323,10 @@ def _download_wheel_from_cache( | |||
wheelfile_name = pathlib.Path(urlparse(wheel_url).path) | |||
pbi = self.ctx.package_build_info(req) | |||
expected_build_tag = pbi.build_tag(resolved_version) | |||
# Log the expected build tag for debugging | |||
if expected_build_tag: |
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 goal is to log more complete debug information about the build tag, so that someone looking at the log can understand why fromager took whatever steps it did. So we want a message even if there is no build tag.
I tried to reproduce it locally but I get the message
I checked and |
To run the tests, start in the root of the git repository and run the script by it's path like this:
When I do that I see the same failure. |
86c24ea
to
217a90d
Compare
src/fromager/bootstrapper.py
Outdated
logger.info(f"{req.name}: has expected build tag {expected_build_tag}") | ||
# Get changelogs for debug info | ||
changelogs = pbi.get_changelog(resolved_version) | ||
logger.info(f"{req.name} has change logs {changelogs}") |
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.
Logging at info level here is going to be pretty noisy. The thing we really care about at info level is the number (the expected build tag), which you're logging on 327. So maybe change this to a debug message.
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.
Okay, makes sense
ec0593e
to
3042e90
Compare
src/fromager/packagesettings.py
Outdated
@@ -638,6 +638,10 @@ def build_tag(self, version: Version) -> BuildTag: | |||
suffix = "" | |||
return release, suffix | |||
|
|||
def get_changelog(self, version: Version) -> list[str]: | |||
pv = typing.cast(PackageVersion, version) | |||
return self._ps.changelog.get(pv, []) |
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.
Sorry, I just noticed this. If you look at lines 633 and 634, you'll see that the build_tag is computed by combining the variant changelog and the package changelog. If we're returning a list here so we can log it, we should combine the same values.
Then in build_tag
, we could use this method to get the changelog and just take the length of that result.
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.
Ah, I see okay! I will push the updated code
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.
I have pushed latest code
eb39778
to
338d0ac
Compare
This commit adds a debug message for
expected_build_tag
and logs the change log entries for debugFurther, new version of pbr released few days ago which breaks our e2e test for
test_bootstrap_constraints.sh
. The pbr version is now updated to6.1.1
for the testSigned-off by: Rohan Devasthale