project-infra
project-infra copied to clipboard
prototype: mount local directory for build
What this PR does / why we need it:
https://github.com/kubevirt/project-infra/issues/3868
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #3868
Special notes for your reviewer:
Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR. Approvers are expected to review this list.
- [ ] Design: A design document was considered and is present (link) or not required
- [ ] PR: The PR description is expressive enough and will help future contributors
- [ ] Code: Write code that humans can understand and Keep it simple
- [ ] Refactor: You have left the code cleaner than you found it (Boy Scout Rule)
- [ ] Upgrade: Impact of this change on upgrade flows was considered and addressed if required
- [ ] Testing: New code requires new unit tests. New features and bug fixes require at least on e2e test
- [ ] Documentation: A user-guide update was considered and is present (link) or not required. You want a user-guide update if it's a user facing feature / API change.
- [ ] Community: Announcement to kubevirt-dev was considered
Release note:
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
/lifecycle stale
@sourcery-ai review
Reviewer's Guide by Sourcery
This PR introduces changes to the image building process, specifically for the publish_image.sh script and the botreview container. It allows mounting a local project-infra directory during image builds and disables caching. The botreview container build process was also updated to support mounting a local project-infra directory and to use a newer base image.
Sequence diagram for building the image with a local project-infra directory
sequenceDiagram
participant S as publish_image.sh
participant P as podman
S->>S: Parses arguments: -p <project_infra_dir>
S->>P: build_image <no_cache> <build_target> <full_image_name> <project_infra_dir>
alt project_infra_dir exists
S->>P: podman build -v <project_infra_dir>:/project-infra . -t <image_name> -t <build_target>
else project_infra_dir does not exist
S->>P: podman build . -t <image_name> -t <build_target>
end
File-Level Changes
| Change | Details | Files |
|---|---|---|
Added options to the publish_image.sh script to allow building images without cache and mounting a local project-infra directory. |
|
images/publish_image.sh |
Modified the botreview container build process to support mounting a local project-infra directory and updated the base image. |
|
images/botreview/Containerfile |
Assessment against linked issues
| Issue | Objective | Addressed | Explanation |
|---|---|---|---|
| #3868 | Use the local copy of project-infra instead of cloning it for each image build. | ✅ | |
| #3868 | Build all images one after another. | ❌ | The PR focuses on using the local project-infra directory for builds, but it doesn't explicitly address building all images one after another. The changes in publish_image.sh modify how individual images are built, but not the overall orchestration of building multiple images in sequence. |
Tips and commands
Interacting with Sourcery
- Trigger a new review: Comment
@sourcery-ai reviewon the pull request. - Continue discussions: Reply directly to Sourcery's review comments.
- Generate a GitHub issue from a review comment: Ask Sourcery to create an
issue from a review comment by replying to it. You can also reply to a
review comment with
@sourcery-ai issueto create an issue from it. - Generate a pull request title: Write
@sourcery-aianywhere in the pull request title to generate a title at any time. You can also comment@sourcery-ai titleon the pull request to (re-)generate the title at any time. - Generate a pull request summary: Write
@sourcery-ai summaryanywhere in the pull request body to generate a PR summary at any time exactly where you want it. You can also comment@sourcery-ai summaryon the pull request to (re-)generate the summary at any time. - Generate reviewer's guide: Comment
@sourcery-ai guideon the pull request to (re-)generate the reviewer's guide at any time. - Resolve all Sourcery comments: Comment
@sourcery-ai resolveon the pull request to resolve all Sourcery comments. Useful if you've already addressed all the comments and don't want to see them anymore. - Dismiss all Sourcery reviews: Comment
@sourcery-ai dismisson the pull request to dismiss all existing Sourcery reviews. Especially useful if you want to start fresh with a new review - don't forget to comment@sourcery-ai reviewto trigger a new review! - Generate a plan of action for an issue: Comment
@sourcery-ai planon an issue to generate a plan of action for it.
Customizing Your Experience
Access your dashboard to:
- Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others.
- Change the review language.
- Add, remove or edit custom review instructions.
- Adjust other review settings.
Getting Help
- Contact our support team for questions or feedback.
- Visit our documentation for detailed guides and information.
- Keep in touch with the Sourcery team by following us on X/Twitter, LinkedIn or GitHub.
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
/lifecycle rotten
/remove-lifecycle rotten
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
/lifecycle rotten
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
/close
@kubevirt-bot: Closed this PR.
In response to this:
Rotten issues close after 30d of inactivity. Reopen the issue with
/reopen. Mark the issue as fresh with/remove-lifecycle rotten./close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
/reopen /remove-lifecycle rotten
@dhiller: Reopened this PR.
In response to this:
/reopen /remove-lifecycle rotten
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
/cc @brianmcarey
/rehearse ?
Rehearsal is available for the following jobs in this PR:
Further information on rehearsals
A rehearsal can be triggered for all jobs by commenting either /rehearse or /rehearse all on this PR.
A rehearsal for a specific job can be triggered by commenting /rehearse {job-name}.
Commenting /rehearse ? triggers a comment with a list of jobs that can be rehearsed.
A pull request can be rehearsed if either the user is authorized to rehearse or the pull
request has the ok-to-rehearse label.
Authorized users are the group of users that are members of the KubeVirt GitHub
organization AND either are approvers[1] for all files in the pull request or are
top-level approvers[1] in the project-infra project.
[1]: see OWNERS file definition for reference.
/rehearse ?
Rehearsal is available for the following jobs in this PR:
build-phased-image
build-test-report-image
build-release-blocker-image
build-flake-report-creator-image
build-botreview-image
build-flakefinder-image
build-indexpagecreator-image
build-referee-image
build-rehearse-image
Further information on rehearsals
A rehearsal can be triggered for all jobs by commenting either /rehearse or /rehearse all on this PR.
A rehearsal for a specific job can be triggered by commenting /rehearse {job-name}.
Commenting /rehearse ? triggers a comment with a list of jobs that can be rehearsed.
A pull request can be rehearsed if either the user is authorized to rehearse or the pull
request has the ok-to-rehearse label.
Authorized users are the group of users that are members of the KubeVirt GitHub
organization AND either are approvers[1] for all files in the pull request or are
top-level approvers[1] in the project-infra project.
[1]: see OWNERS file definition for reference.
/rehearse
Rehearsal jobs created for this PR:
rehearsal-build-referee-image
rehearsal-build-phased-image
rehearsal-build-indexpagecreator-image
rehearsal-build-rehearse-image
rehearsal-build-flakefinder-image
rehearsal-build-botreview-image
rehearsal-build-release-blocker-image
rehearsal-build-flake-report-creator-image
rehearsal-build-test-report-image
Further information on rehearsals
A rehearsal can be triggered for all jobs by commenting either /rehearse or /rehearse all on this PR.
A rehearsal for a specific job can be triggered by commenting /rehearse {job-name}.
Commenting /rehearse ? triggers a comment with a list of jobs that can be rehearsed.
A pull request can be rehearsed if either the user is authorized to rehearse or the pull
request has the ok-to-rehearse label.
Authorized users are the group of users that are members of the KubeVirt GitHub
organization AND either are approvers[1] for all files in the pull request or are
top-level approvers[1] in the project-infra project.
[1]: see OWNERS file definition for reference.
/rehearse ?
Rehearsal is available for the following jobs in this PR:
build-flakefinder-image
build-rehearse-image
build-test-subset-image
build-indexpagecreator-image
build-release-tool-image
build-release-blocker-image
build-flake-report-creator-image
build-phased-image
build-botreview-image
build-test-report-image
build-referee-image
build-test-label-analyzer-image
Further information on rehearsals
A rehearsal can be triggered for all jobs by commenting either /rehearse or /rehearse all on this PR.
A rehearsal for a specific job can be triggered by commenting /rehearse {job-name}.
Commenting /rehearse ? triggers a comment with a list of jobs that can be rehearsed.
A pull request can be rehearsed if either the user is authorized to rehearse or the pull
request has the ok-to-rehearse label.
Authorized users are the group of users that are members of the KubeVirt GitHub
organization AND either are approvers[1] for all files in the pull request or are
top-level approvers[1] in the project-infra project.
[1]: see OWNERS file definition for reference.
/rehearse
Rehearsal jobs created for this PR:
rehearsal-build-botreview-image
rehearsal-build-referee-image
rehearsal-build-release-tool-image
rehearsal-build-flake-report-creator-image
rehearsal-build-rehearse-image
rehearsal-build-test-subset-image
rehearsal-build-flakefinder-image
rehearsal-build-phased-image
rehearsal-build-test-label-analyzer-image
rehearsal-build-release-blocker-image
rehearsal-build-test-report-image
rehearsal-build-indexpagecreator-image
Further information on rehearsals
A rehearsal can be triggered for all jobs by commenting either /rehearse or /rehearse all on this PR.
A rehearsal for a specific job can be triggered by commenting /rehearse {job-name}.
Commenting /rehearse ? triggers a comment with a list of jobs that can be rehearsed.
A pull request can be rehearsed if either the user is authorized to rehearse or the pull
request has the ok-to-rehearse label.
Authorized users are the group of users that are members of the KubeVirt GitHub
organization AND either are approvers[1] for all files in the pull request or are
top-level approvers[1] in the project-infra project.
[1]: see OWNERS file definition for reference.
@brianmcarey updated the PR according to your comments, PTAL, thank you!
/rehearse
Rehearsal jobs created for this PR:
rehearsal-build-botreview-image
rehearsal-build-test-report-image
rehearsal-build-flakefinder-image
rehearsal-build-referee-image
rehearsal-build-release-blocker-image
rehearsal-build-phased-image
rehearsal-build-test-label-analyzer-image
rehearsal-build-indexpagecreator-image
rehearsal-build-release-tool-image
rehearsal-build-flake-report-creator-image
rehearsal-build-rehearse-image
rehearsal-build-test-subset-image
Further information on rehearsals
A rehearsal can be triggered for all jobs by commenting either /rehearse or /rehearse all on this PR.
A rehearsal for a specific job can be triggered by commenting /rehearse {job-name}.
Commenting /rehearse ? triggers a comment with a list of jobs that can be rehearsed.
A pull request can be rehearsed if either the user is authorized to rehearse or the pull
request has the ok-to-rehearse label.
Authorized users are the group of users that are members of the KubeVirt GitHub
organization AND either are approvers[1] for all files in the pull request or are
top-level approvers[1] in the project-infra project.
[1]: see OWNERS file definition for reference.
/rehearse
Rehearsal jobs created for this PR:
rehearsal-build-test-report-image
rehearsal-build-phased-image
rehearsal-build-botreview-image
rehearsal-build-indexpagecreator-image
rehearsal-build-test-label-analyzer-image
rehearsal-build-release-blocker-image
rehearsal-build-referee-image
rehearsal-build-flakefinder-image
rehearsal-build-rehearse-image
rehearsal-build-test-subset-image
rehearsal-build-release-tool-image
rehearsal-build-flake-report-creator-image
Further information on rehearsals
A rehearsal can be triggered for all jobs by commenting either /rehearse or /rehearse all on this PR.
A rehearsal for a specific job can be triggered by commenting /rehearse {job-name}.
Commenting /rehearse ? triggers a comment with a list of jobs that can be rehearsed.
A pull request can be rehearsed if either the user is authorized to rehearse or the pull
request has the ok-to-rehearse label.
Authorized users are the group of users that are members of the KubeVirt GitHub
organization AND either are approvers[1] for all files in the pull request or are
top-level approvers[1] in the project-infra project.
[1]: see OWNERS file definition for reference.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: brianmcarey
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [brianmcarey]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
@dhiller: Updated the following 2 configmaps:
job-configconfigmap in namespacekubevirt-prowat clusterdefaultusing the following files:- key
project-infra-postsubmits.yamlusing filegithub/ci/prow-deploy/files/jobs/kubevirt/project-infra/project-infra-postsubmits.yaml - key
project-infra-presubmits.yamlusing filegithub/ci/prow-deploy/files/jobs/kubevirt/project-infra/project-infra-presubmits.yaml
- key
configconfigmap in namespacekubevirt-prowat clusterdefaultusing the following files:- key
config.yamlusing filegithub/ci/prow-deploy/kustom/base/configs/current/config/config.yaml
- key
In response to this:
What this PR does / why we need it:
https://github.com/kubevirt/project-infra/issues/3868
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged): Fixes #3868Special notes for your reviewer:
Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR. Approvers are expected to review this list.
- [ ] Design: A design document was considered and is present (link) or not required
- [ ] PR: The PR description is expressive enough and will help future contributors
- [ ] Code: Write code that humans can understand and Keep it simple
- [ ] Refactor: You have left the code cleaner than you found it (Boy Scout Rule)
- [ ] Upgrade: Impact of this change on upgrade flows was considered and addressed if required
- [ ] Testing: New code requires new unit tests. New features and bug fixes require at least on e2e test
- [ ] Documentation: A user-guide update was considered and is present (link) or not required. You want a user-guide update if it's a user facing feature / API change.
- [ ] Community: Announcement to kubevirt-dev was considered
Release note:
Summary by Sourcery
Enhance the image build process to support mounting a local project-infra directory during builds
New Features:
- Add option to disable build cache with -c flag
- Allow specifying custom project-infra directory path with -p flag
Enhancements:
- Add support for mounting a local project-infra directory during image builds
- Introduce a new command-line option to specify a local project directory path
Chores:
- Update Containerfile to use a more recent Golang base image
- Modify build script to support optional local directory mounting
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.