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

Tekton OperationsImpl Scope Fix #2194

Merged
merged 1 commit into from
May 8, 2020

Conversation

Fabian-K
Copy link
Contributor

@Fabian-K Fabian-K commented May 5, 2020

This PR updates the generation logic for *OperationsImpl to include proper scoping (namespaced vs cluster-wide) for all parts using the rewritten go generator.

Changes:

  • go configuration requires scoping definition for all CRDs
  • marker interface 'Namespaced' added
  • go generator adds the marker interface to all Namespaced CRDs
  • during the generation of the *OperationsImpl, the marker interface is used to detect the proper scoping.

This fixes #2193

…de proper scoping (namespaced vs cluster-wide) for all parts using the rewritten go generator.

Changes:
- go configuration requires scoping definition for all CRDs
- marker interface 'Namespaced' added
- go generator adds the marker interface to all Namespaced CRDs
- during the generation of the *OperationsImpl, the marker interface is used to detect the proper scoping.

This fixes fabric8io#2193
@centos-ci
Copy link

Can one of the admins verify this patch?

@sonarqubecloud
Copy link

sonarqubecloud bot commented May 5, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@rohanKanojia
Copy link
Member

ok to test

Copy link
Member

@rohanKanojia rohanKanojia 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, Thanks.

But I see you have only made changes in tekton. Are you planning to change Knative, ServiceCatalog and Kubernetes Model after this patch?

@rohanKanojia rohanKanojia requested review from oscerd and manusa May 6, 2020 05:06
@rohanKanojia
Copy link
Member

@Fabian-K : Bdw, I've started to document client operations in our cheat sheet. Would appreciate if you could contribute some documentation regarding tekton extensions there 🙏

@Fabian-K
Copy link
Contributor Author

Fabian-K commented May 6, 2020

I just rebased my knative pr on top of this one and included the scoping info there as well. (although there are no cluster-scoped CRDs in knative)

When other modules like ServiceCatalog or K8s core uses the generator rewrite, they are forced to include it by the go compiler :)

The cheat sheet looks nice! Will try to find some time for tekton :)

@rohanKanojia
Copy link
Member

[merge]

@fusesource-ci fusesource-ci merged commit 49867e9 into fabric8io:master May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tekton: ClusterTaskOperationsImpl has wrong scope
6 participants