Skip to content

Add remaining missing verify/update targets into make#5111

Closed
SgtCoDFish wants to merge 7 commits intocert-manager:masterfrom
SgtCoDFish:codegen
Closed

Add remaining missing verify/update targets into make#5111
SgtCoDFish wants to merge 7 commits intocert-manager:masterfrom
SgtCoDFish:codegen

Conversation

@SgtCoDFish
Copy link
Copy Markdown
Member

@SgtCoDFish SgtCoDFish commented May 10, 2022

Pull Request Motivation

Add remaining missing verify/update targets for codegen and CRDs into make (i.e. the things that we were keeping the pull-cert-manager-bazel presubmit around for).

Also removes the related bazel targets entirely (but keeps the scripts which the bazel targets used to call, to preserve muscle memory)

NB: In standup on 2022-05-13 we agreed that (verify|update)-deps doesn't really fit naturally with the makefile build system, so it won't be ported.

Kind

/kind feature

Release Note

Adds k8s codegen and CRD tooling support to make, replacing bazel

@jetstack-bot jetstack-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 10, 2022
@jetstack-bot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SgtCoDFish

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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

@jetstack-bot jetstack-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 10, 2022
@jetstack-bot jetstack-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 10, 2022
# a lesser evil than blocking our potential future upgrade to go 1.18 behind the release
# of k8s 1.24
K8S_CODEGEN_VERSION=5915ef051dfa0658ffebb9af39679e52c31762bf
K8S_CODEGEN_VERSION=v0.24.0
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

note: this is actually a benefit of the fact that I prioritised the website refresh in favour of this; k8s 1.24 came out in the meantime which removed the need for this big long comment and weird version 😁

Comment on lines +399 to +407
|| command -v $(GO) >/dev/null || echo "$(GO) (or run 'make vendor-go')") \
&& (command -v $(CTR) >/dev/null || echo "$(CTR) (or set CTR to a docker-compatible tool)"))
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

note: tiny little change which makes it clearer that users can choose to vendor go and that they can use tools like podman instead of docker

@SgtCoDFish
Copy link
Copy Markdown
Member Author

/test pull-cert-manager-make-test

@SgtCoDFish
Copy link
Copy Markdown
Member Author

/hold

Our tests aren't calling make ci-presubmit yet, so this can't merge until that's enabled.

@jetstack-bot jetstack-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 10, 2022
@jetstack-bot jetstack-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 12, 2022
@SgtCoDFish
Copy link
Copy Markdown
Member Author

SgtCoDFish commented May 12, 2022

@munnerz I think if we're gonna remove the bazel tests here I should roll the update-crds stuff into this PR as well as the existing stuff about update-codegen.

I've got it written and I'd saved it for a separate PR but I'm thinking now we might as well remove these tests from bazel and get everything ready so we can remove the pull-cert-manager-bazel presubmit entirely after this PR merges. I'll rework this.

@SgtCoDFish SgtCoDFish changed the title K8S Codegen in Make Add remaining missing verify/update targets into make May 12, 2022
Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
@jetstack-bot jetstack-bot added area/deploy Indicates a PR modifies deployment configuration size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels May 12, 2022
@SgtCoDFish
Copy link
Copy Markdown
Member Author

/test pull-cert-manager-make-test

@SgtCoDFish SgtCoDFish force-pushed the codegen branch 3 times, most recently from c6c4b99 to 4d07c80 Compare May 13, 2022 10:48
- runs "make update-codegen"
- adds codegen verification to make tests
- changes hack/(update|verify)-codegen.sh to just call make
- removes bazel codegen test so it's not automatically run in CI

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
- includes a run of make update-crds which causes some trivial changes
- (bonus) updates version of YQ to latest
- makes hack/update-crds.sh just call make
- makes hack/verify-crds.sh just call make
- moves functionality of hack/verify-crds.sh to hack/check-crds.sh,
  using the makefile for generating alternative CRDs for comparison
- removes the bazel test associated with CRDs

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
- hack/update-deps-licenses.sh becomes a muscle-memory-preserver
- bazel test for deps-licenses is removed

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
these won't be added to make because they're quite tightly tied to bazel

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
since they're implemented in make, there's no reason to also have them
run by bazel

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
@SgtCoDFish
Copy link
Copy Markdown
Member Author

/test pull-cert-manager-bazel-nocache

@irbekrm
Copy link
Copy Markdown
Contributor

irbekrm commented May 13, 2022

/test all

@jetstack-bot
Copy link
Copy Markdown
Contributor

jetstack-bot commented May 13, 2022

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

Test name Commit Details Required Rerun command
pull-cert-manager-make-test 6395f69 link true /test pull-cert-manager-make-test
pull-cert-manager-deps 6395f69 link true /test pull-cert-manager-deps

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

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

@SgtCoDFish
Copy link
Copy Markdown
Member Author

Just gonna close this because this piece of work is going to be a bigger thing I think

@SgtCoDFish SgtCoDFish closed this May 13, 2022
@SgtCoDFish SgtCoDFish deleted the codegen branch May 13, 2022 17:52
@SgtCoDFish SgtCoDFish restored the codegen branch May 13, 2022 17:52
@SgtCoDFish SgtCoDFish mentioned this pull request Jun 15, 2022
30 tasks
@SgtCoDFish SgtCoDFish mentioned this pull request Jun 27, 2022
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. area/deploy Indicates a PR modifies deployment configuration dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/feature Categorizes issue or PR as related to a new feature. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants