Skip to content

Conversation

twoGiants
Copy link
Member

@twoGiants twoGiants commented Apr 18, 2025

Note

Since the merge of #8482 the code generation in the main branch is faster, 6min 45s but still downloads a lot of packages every time. With this PR the downloads will be reduced but not eliminated, it will run in 4min. The run time depends on your connection.

Changes

Remove temporary GOPATH directory generation in update-codegen.sh and update-openapigen.sh.

The project uses Go modules but the code generation script executed by make generated uses a legacy workflow creating a temporary GOPATH directory and downloading all dependencies needed for code generation on every run. This takes 15-20 min for every execution.

Removing setup-temporary-gopath.sh and its references falls back to using Go modules and make generated executes under 2 min.

Closes #8718.

/kind cleanup

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Has Docs if any changes are user facing, including updates to minimum requirements e.g. Kubernetes version bumps
  • Has Tests included if any functionality added or changed
  • pre-commit Passed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including functionality, content, code)
  • Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings). See some examples of good release notes.
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

NONE

@tekton-robot tekton-robot added release-note-none Denotes a PR that doesnt merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Apr 18, 2025
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 18, 2025
@twoGiants
Copy link
Member Author

/kind cleanup

@twoGiants
Copy link
Member Author

/test check-pr-has-kind-label

@tekton-robot
Copy link
Collaborator

@twoGiants: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test check-pr-has-kind-label

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.

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vdemeester

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

@tekton-robot tekton-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Apr 22, 2025
Copy link
Member

@afrittoli afrittoli left a comment

Choose a reason for hiding this comment

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

Thanks! Once rebased, it can be merged
/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 28, 2025
Remove temporary GOPATH directory generation for codegen and openapigen.

The project uses Go modules but the code generation script executed by
`make generated` uses a legacy workflow creating a temporary GOPATH
directory and downloading all dependencies needed for code generation on
every run. This takes 15 - 20 min for every execution.

Removing `setup-temporary-gopath.sh` and its references falls back to
using Go modules and `make generated` executes under 2 min.

Signed-off-by: Stanislav Jakuschevskij <[email protected]>
@twoGiants twoGiants force-pushed the issue-8718-remove-temp-gopath-for-codegen-and-openapigen branch from a8d4f8b to b94091c Compare April 30, 2025 10:16
@tekton-robot tekton-robot removed lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Apr 30, 2025
@twoGiants
Copy link
Member Author

@afrittoli I rebased the branch. I updated the PR message. Now that Vincents Go update was made and the code generation scripts were updated the change is not as significant but still an improvement. See my message above.

Thanks for reviewing!

Copy link
Member

@afrittoli afrittoli left a comment

Choose a reason for hiding this comment

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

Thank you!
/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 30, 2025
@tekton-robot tekton-robot merged commit 0485e9a into tektoncd:main Apr 30, 2025
20 checks passed
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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesnt merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Remove temporary GOPATH creation for codegen and openapigen.

4 participants