fix(build): Dynamically tag base images for Ubuntu 24.04#14248
fix(build): Dynamically tag base images for Ubuntu 24.04#14248
Conversation
This commit addresses the issue where builds for Ubuntu 24.04 projects were incorrectly using the ':latest' tag for base images, leading to build failures. Changes include: - Added 'ubuntu_version' to the 'Project' class, defaulting to 'legacy'. - Modified 'create_config' to accept and pass 'base_image_tag' to the 'Config' object. - Updated calls to 'build_lib.get_runner_image_name' to use 'config.base_image_tag'. - Updated 'expected_build_steps.json' to reflect the new 'ubuntu-24-04' image tags in test data. This ensures that projects specifying 'ubuntu-24-04' in their 'project.yaml' will correctly pull the versioned base images, while projects without a specified version will continue to use ':latest' (legacy).
This change modifies the build process to support dynamic tagging of base runner images based on the specified in a project's . - The function now reads the . - If the version is 'legacy' or not specified, it defaults to , ensuring that existing projects continue to use the tag. - If a specific version like 'ubuntu-24-04' is provided, it is passed through the configuration and used to tag the runner image name. This fixes an issue where projects intended for Ubuntu 24.04 were incorrectly using the latest base image.
|
/gcbrun trial_build.py bios-bmc-smm-error-logger |
javanlacerda
left a comment
There was a problem hiding this comment.
I've left a comment and the tests are failing.
|
|
||
| steps = get_build_steps_func(project_name, project_yaml, | ||
| dockerfile_contents, config) | ||
| base_image_tag = project_yaml.get('ubuntu_version') |
There was a problem hiding this comment.
Shouldn't it be base_os_version?
There was a problem hiding this comment.
You're right, I fixed it.
… from expected build steps
This commit introduces a new JSON file containing the expected build steps for the OSS-Fuzz project on Ubuntu 24.04. The file includes various build configurations for different architectures and fuzzing engines, ensuring compatibility and proper setup for the fuzzing process.
…izers and architectures
|
/gcbrun trial_build.py bios-bmc-smm-error-logger |
…y and consistency test(build): Add unittest.main() call to enable test execution from command line
|
/gcbrun trial_build.py bios-bmc-smm-error-logger |
javanlacerda
left a comment
There was a problem hiding this comment.
Thanks for the effort on this.
Could we re-run this pipeline for this branch, to assure that it will work with the changes?
It's not that simple. The plan is to deploy the current change and see if it fixes the issue. The tests indicate it should work correctly. |
javanlacerda
left a comment
There was a problem hiding this comment.
LGTM! Thanks for that!
This commit addresses the issue where builds for Ubuntu 24.04 projects were incorrectly using the ':latest' tag for base images, leading to build failures.
Changes include:
This ensures that projects specifying 'ubuntu-24-04' in their 'project.yaml' will correctly pull the versioned base images, while projects without a specified version will continue to use ':latest' (legacy).