Fix glue-verify-code-gen CI: rebase onto main + code-generator ordering fix - #5
Open
HansG89 wants to merge 4 commits into
Open
Conversation
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
…llers-k8s#29) ### Update to ACK runtime `v0.62.0`, code-generator `v0.62.1` ---------- * ACK code-generator `v0.62.1` [release notes](https://github.com/aws-controllers-k8s/code-generator/releases/tag/v0.62.1) * ACK runtime `v0.62.0` [release notes](https://github.com/aws-controllers-k8s/runtime/releases/tag/v0.62.0) ---------- NOTE: This PR increments the release version of service controller from `v1.1.0` to `v1.1.1` Once this PR is merged, release `v1.1.1` will be automatically created for `glue-controller` **Please close this PR, if you do not want the new patch release for `glue-controller`** ---------- #### stdout for `make build-controller`: ``` building ack-generate ... ok. installing controller-gen v0.19.0 ... ok. ==== building glue-controller ==== Copying common custom resource definitions into glue Building Kubernetes API objects for glue Generating deepcopy code for glue Generating custom resource definitions for glue Building service controller for glue Running GO mod tidy Generating RBAC manifests for glue Running gofmt against generated code for glue Updating additional GitHub repository maintenance files ==== building glue-controller release artifacts ==== Building release artifacts for glue-v1.1.1 Generating common custom resource definitions Generating custom resource definitions for glue Generating RBAC manifests for glue ``` ---------- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
…port # Conflicts: # apis/v1alpha1/ack-generate-metadata.yaml
Regenerates the controller using aws-controllers-k8s/code-generator#737, which moves gofmt's doc-comment normalization to run before either controller-gen crd invocation, instead of only after the first one. Without this fix, config/crd/bases/*.yaml and helm/crds/*.yaml disagree on Markdown list-marker style (* vs -) for the same enum description text (e.g. Job.spec.jobMode), which is what was failing glue-verify-code-gen on this PR. Both CRD YAML targets now agree.
Author
|
Hey @JonathanGraniero 👋 opened this to unblock CI on aws-controllers-k8s#16 — rebased onto |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause
glue-verify-code-genwas failing on this branch due to a Markdown list-marker mismatch (-vs*) betweenhelm/crds/glue.services.k8s.aws_jobs.yamlandconfig/crd/bases/glue.services.k8s.aws_jobs.yamlfor the sameJobModeenum doc text.This is an upstream
aws-controllers-k8s/code-generatorbug, not something introduced in this branch:code-generator/scripts/build-controller.shrunscontroller-gen crdforconfig/crd/basesbefore itsgofmt -wpass.code-generator/scripts/build-controller-release.sh(invoked right after, samemake build-controllertarget, same working tree) runs a secondcontroller-gen crdforhelm/crdsafter thatgofmt -wpass already ran.*list markers to-. Since the twocontroller-gen crdcalls straddle that rewrite, the two output targets permanently disagree on marker style for identical source text, regenerating locally just flips which file is "wrong."Fix upstream: aws-controllers-k8s/code-generator#737 (moves the
gofmt -wcall to run immediately afterack-generate apis, before eithercontroller-gen crdinvocation, so both read consistently-formatted source).What this PR does
aws-controllers-k8s/glue-controllermaininto this branch (resolves the version-bump conflict inapis/v1alpha1/ack-generate-metadata.yaml— tookmain's newer values since that file is fully regenerated anyway).apis/,config/,helm/,pkg/) using the patchedcode-generatorfrom PR #737 above, soconfig/crd/basesandhelm/crdsnow agree.Verified locally against the actual CI script (
aws-controllers-k8s/test-infra'scd/scripts/verify-code-gen.sh, the same script Prow'sglue-verify-code-genjob runs):No Database CRD schema or behavior changes, diff is confined to the
mainrebase plus generated-file formatting.Feel free to merge this straight into
jg_database_crd_supportto unblock CI on aws-controllers-k8s#16.