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

use go vendoring for dependencies #3522

Conversation

dhiller
Copy link
Contributor

@dhiller dhiller commented Jul 11, 2024

What this PR does / why we need it:

Replaces the bazel dependency management for go repositories with pure go mod vendoring. This is required because kubernetes-sigs/prow has dropped bazel a while ago - since then we haven't been able to update the prow dependencies. This way we should be able to consume prow dependency updates again.

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 #

Special notes for your reviewer:

/cc @brianmcarey

Jira-ticket: https://issues.redhat.com/browse/CNV-49006

@kubevirt-bot kubevirt-bot requested a review from brianmcarey July 11, 2024 11:58
@kubevirt-bot kubevirt-bot added dco-signoff: yes Indicates the PR's author has DCO signed all their commits. size/XXL labels Jul 11, 2024
@dhiller
Copy link
Contributor Author

dhiller commented Jul 11, 2024

/cc @xpivarc

FYI: since kubernetes-sigs/test-infra and kubernetes-sigs/prow moved away from using bazel, maintaining it has become more of a burden - so we think it's best to remove it and work with go tools only.

@kubevirt-bot kubevirt-bot requested a review from xpivarc July 11, 2024 12:02
@dhiller dhiller marked this pull request as draft July 11, 2024 12:16
@kubevirt-bot kubevirt-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 11, 2024
@dhiller dhiller force-pushed the replace-bazel-go-repo-deps-with-vendoring branch from fe2cbe6 to 343c83c Compare July 11, 2024 12:34
@dhiller
Copy link
Contributor Author

dhiller commented Jul 11, 2024

/test pull-project-infra-test-robots

@dhiller dhiller force-pushed the replace-bazel-go-repo-deps-with-vendoring branch from 343c83c to 588fdee Compare July 11, 2024 12:37
@dhiller
Copy link
Contributor Author

dhiller commented Jul 11, 2024

/rehearse ?

@kubevirt-bot
Copy link
Contributor

Rehearsal is available for the following jobs in this PR:

pull-project-infra-test-robots

You can trigger rehearsal for all jobs by commenting either /rehearse or /rehearse all
on this PR.

For a specific PR you can comment /rehearse {job-name}.

For a list of jobs that you can rehearse you can comment /rehearse ?.

@dhiller
Copy link
Contributor Author

dhiller commented Jul 11, 2024

/rehearse pull-project-infra-test-robots

@kubevirt-bot
Copy link
Contributor

Rehearsal jobs created for this PR:

rehearsal-pull-project-infra-test-robots

You can trigger rehearsal for all jobs by commenting either /rehearse or /rehearse all
on this PR.

For a specific PR you can comment /rehearse {job-name}.

For a list of jobs that you can rehearse you can comment /rehearse ?.

@dhiller
Copy link
Contributor Author

dhiller commented Jul 11, 2024

/test pull-project-infra-test-robots

@xpivarc
Copy link
Member

xpivarc commented Jul 11, 2024

/cc @xpivarc

FYI: since kubernetes-sigs/test-infra and kubernetes-sigs/prow moved away from using bazel, maintaining it has become more of a burden - so we think it's best to remove it and work with go tools only.

I like vendoring 👍

@dhiller dhiller force-pushed the replace-bazel-go-repo-deps-with-vendoring branch from 588fdee to 5e7a333 Compare July 11, 2024 13:35
@dhiller
Copy link
Contributor Author

dhiller commented Jul 11, 2024

/rehearse

@kubevirt-bot
Copy link
Contributor

Rehearsal jobs created for this PR:


You can trigger rehearsal for all jobs by commenting either /rehearse or /rehearse all
on this PR.

For a specific PR you can comment /rehearse {job-name}.

For a list of jobs that you can rehearse you can comment /rehearse ?.

@dhiller
Copy link
Contributor Author

dhiller commented Jul 11, 2024

/rehearse pull-project-infra-test-robots

@kubevirt-bot
Copy link
Contributor

Rehearsal jobs created for this PR:


You can trigger rehearsal for all jobs by commenting either /rehearse or /rehearse all
on this PR.

For a specific PR you can comment /rehearse {job-name}.

For a list of jobs that you can rehearse you can comment /rehearse ?.

@dhiller
Copy link
Contributor Author

dhiller commented Jul 11, 2024

/test pull-project-infra-test-robots

@dhiller
Copy link
Contributor Author

dhiller commented Jul 11, 2024

/test pull-project-infra-test-bazel-config

@dhiller dhiller force-pushed the replace-bazel-go-repo-deps-with-vendoring branch from 5e7a333 to fe2e392 Compare July 11, 2024 14:09
@dhiller
Copy link
Contributor Author

dhiller commented Jul 11, 2024

/rehearse pull-project-infra-test-bazel-config

@kubevirt-bot
Copy link
Contributor

Rehearsal jobs created for this PR:


You can trigger rehearsal for all jobs by commenting either /rehearse or /rehearse all
on this PR.

For a specific PR you can comment /rehearse {job-name}.

For a list of jobs that you can rehearse you can comment /rehearse ?.

@dhiller
Copy link
Contributor Author

dhiller commented Jul 12, 2024

/test all

@dhiller dhiller force-pushed the replace-bazel-go-repo-deps-with-vendoring branch from fe2e392 to e1c0f98 Compare July 12, 2024 14:32
@dhiller
Copy link
Contributor Author

dhiller commented Jul 12, 2024

/test all

@kubevirt-bot kubevirt-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 24, 2024
@dhiller dhiller force-pushed the replace-bazel-go-repo-deps-with-vendoring branch from b9a22b1 to 6e31992 Compare December 18, 2024 14:53
@dhiller
Copy link
Contributor Author

dhiller commented Dec 18, 2024

/test pull-project-infra-test-bazel-config

@dhiller
Copy link
Contributor Author

dhiller commented Dec 18, 2024

/test pull-project-infra-ci-search-deploy-test

@dhiller dhiller marked this pull request as ready for review December 18, 2024 15:28
@kubevirt-bot kubevirt-bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Dec 18, 2024
@dhiller dhiller changed the title bazel: move to vendoring go dependencies use go vendoring for dependencies Dec 20, 2024
@dhiller dhiller force-pushed the replace-bazel-go-repo-deps-with-vendoring branch from 6e31992 to 8f32eaf Compare December 27, 2024 09:15
@kubevirt-bot kubevirt-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 27, 2024
@dhiller dhiller marked this pull request as draft December 27, 2024 09:22
@kubevirt-bot kubevirt-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 27, 2024
@dhiller
Copy link
Contributor Author

dhiller commented Dec 27, 2024

/test pull-project-infra-test-bazel-config

@dhiller
Copy link
Contributor Author

dhiller commented Dec 27, 2024

/test pull-project-infra-test-external-plugins
/test pull-project-infra-test-releng
/test pull-project-infra-test-robots

@dhiller dhiller marked this pull request as ready for review December 27, 2024 11:22
@kubevirt-bot kubevirt-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 27, 2024
Copy link
Member

@brianmcarey brianmcarey left a comment

Choose a reason for hiding this comment

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

Looks good @dhiller - could you just add some more context on why we want to do this to the PR description?

@@ -43,7 +43,7 @@ gazelle:
$(bazelbin) run //:gazelle

gazelle-update-repos:
Copy link
Member

Choose a reason for hiding this comment

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

will this be removed in a follow up?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, currently there's lane failure if you remove it. Therefore I just emptied it.

Remove gazelle-update-repos make target as no longer required on the
way.

Signed-off-by: Daniel Hiller <[email protected]>
@dhiller dhiller force-pushed the replace-bazel-go-repo-deps-with-vendoring branch from 8f32eaf to eeccf69 Compare January 2, 2025 15:02
@kubevirt-bot
Copy link
Contributor

kubevirt-bot commented Jan 2, 2025

@dhiller: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
rehearsal-pull-project-infra-test-robots 588fdee link unknown /test pull-project-infra-test-robots

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. I understand the commands that are listed here.

@dhiller
Copy link
Contributor Author

dhiller commented Jan 2, 2025

Looks good @dhiller - could you just add some more context on why we want to do this to the PR description?

@brianmcarey updated PR description, PTAL, thank you!

@dhiller dhiller requested a review from brianmcarey January 2, 2025 15:08
Copy link
Member

@brianmcarey brianmcarey left a comment

Choose a reason for hiding this comment

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

/approve

thanks @dhiller! it will be good to able to consume prow updates again.

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 2, 2025
@kubevirt-bot
Copy link
Contributor

[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

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 2, 2025
@kubevirt-bot kubevirt-bot merged commit 586a480 into kubevirt:main Jan 2, 2025
18 checks passed
@kubevirt-bot
Copy link
Contributor

@dhiller: Updated the job-config configmap in namespace kubevirt-prow at cluster default using the following files:

  • key project-infra-periodics.yaml using file github/ci/prow-deploy/files/jobs/kubevirt/project-infra/project-infra-periodics.yaml
  • key project-infra-presubmits.yaml using file github/ci/prow-deploy/files/jobs/kubevirt/project-infra/project-infra-presubmits.yaml

In response to this:

What this PR does / why we need it:

Replaces the bazel dependency management for go repositories with pure go mod vendoring. This is required because kubernetes-sigs/prow has dropped bazel a while ago - since then we haven't been able to update the prow dependencies. This way we should be able to consume prow dependency updates again.

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 #

Special notes for your reviewer:

/cc @brianmcarey

Jira-ticket: https://issues.redhat.com/browse/CNV-49006

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants