Skip to content

Conversation

@Adirio
Copy link
Contributor

@Adirio Adirio commented Feb 4, 2021

Plugin phase 1.5

Implements #1990
Closes: #2036

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 4, 2021
@k8s-ci-robot k8s-ci-robot requested review from droot and mengqiy February 4, 2021 14:50
@Adirio Adirio force-pushed the plugin-phase-1.5 branch 24 times, most recently from 6ab1a65 to 1649b29 Compare February 8, 2021 07:32
Copy link
Member

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

The scenario operator-framework/operator-sdk#4581 (comment) needs also be solved before we get it merged.

@Adirio Adirio force-pushed the plugin-phase-1.5 branch 6 times, most recently from 1a7873d to 054a7b5 Compare March 1, 2021 23:24
@Adirio
Copy link
Contributor Author

Adirio commented Mar 1, 2021

After rebasing when #2037 got merged, go mod tidy is bumping the dependencies in the declarative projects when it should not. The only difference from non-declarative projects is relation to modules is the import of kubernetes-sigs/kubebuilder-declarative-pattern. Any way to prevent this in combination with go mod tidy to bump all those dependencies?

@Adirio Adirio force-pushed the plugin-phase-1.5 branch from 054a7b5 to c14999b Compare March 2, 2021 07:45
@Adirio
Copy link
Contributor Author

Adirio commented Mar 2, 2021

After rebasing when #2037 got merged, go mod tidy is bumping the dependencies in the declarative projects when it should not. The only difference from non-declarative projects is relation to modules is the import of kubernetes-sigs/kubebuilder-declarative-pattern. Any way to prevent this in combination with go mod tidy to bump all those dependencies?

I discovered the cause. go post-scaffold method was running go mod tidy and declarative post-scaffold method was running go get kubernetes-sigs/kubebuilder-declarative-pattern@.... As the go mod tidy was being run before go get ... it was importing the latest version of kubebuilder-declarative-pattern which bumped a bunch of versions. Later go get ... was defining the exact declarative pattern version but the damage was already done. Changing go get ... calls to the end of scaffold hooks instead of post-scaffold guarantees that they will all be run before go mod tidy.

@Adirio Adirio force-pushed the plugin-phase-1.5 branch from c14999b to 1ff97e8 Compare March 2, 2021 12:24
Adirio added 4 commits March 2, 2021 15:45
- Use the cli filesystem to persist the project config
- Use PreRunE and PostRunE functions to handle configuration file loading and saving

Signed-off-by: Adrian Orive <[email protected]>
Signed-off-by: Adrian Orive Oneca <[email protected]>
@Adirio Adirio force-pushed the plugin-phase-1.5 branch 2 times, most recently from 8e56502 to ec0eb6f Compare March 2, 2021 23:39
- Export scaffolding machinery
- Reorganize scaffolding machinery that was in model
- Remove experimental pattern code (old plugin system)

Signed-off-by: Adrian Orive <[email protected]>
@Adirio
Copy link
Contributor Author

Adirio commented Mar 3, 2021

/close

Closing this in favor of the chain of PRs #2057 - #2058 - #2059 that split this PR into several PRs to split concerns and make reviewer job easier.

@k8s-ci-robot
Copy link
Contributor

@Adirio: Closed this PR.

In response to this:

/close

Closing this in favor of the chain of PRs #2057 - #2058 - #2059 that split this PR into several PRs to split concerns and make reviewer job easier.

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.

@Adirio Adirio deleted the plugin-phase-1.5 branch March 3, 2021 09:24
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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.

✨ Export scaffolding machinery

4 participants