-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
convert resources to ResourceGenerator #5228
base: master
Are you sure you want to change the base?
convert resources to ResourceGenerator #5228
Conversation
Skipping CI for Draft Pull Request. |
785a5f7
to
8a195ab
Compare
I have a problem with the So Do you have any idea to fix this? I need your help resolving this code structure problem. |
This PR has multiple commits, and the default merge method is: merge. 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. |
841e34a
to
b8f2659
Compare
@koba1t If I understand correctly, the problem is that when you create a We may have already discussed this, but did you try moving all the files from |
b8f2659
to
42759d6
Compare
a6b2124
to
2535291
Compare
fc5268d
to
f17304e
Compare
62aa6ce
to
e119b01
Compare
I resolved to If you have any ideas, please let me know. |
I have a problem with fields that affect out of the So, If we need to keep current behavior, we may need some other keep of these fields. Do you have any good ideas? |
@@ -459,7 +459,7 @@ resources: | |||
t.Fatalf("Expected resource accumulation error") | |||
} | |||
if !strings.Contains( | |||
err.Error(), "already registered id: StatefulSet.v1.apps/my-sts.[noNs]") { | |||
err.Error(), `id resid.ResId{Gvk:resid.Gvk{Group:"apps", Version:"v1", Kind:"StatefulSet", isClusterScoped:false}, Name:"my-sts", Namespace:""} exists`) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This error message was changed due to every resources
field in another directory being applied independently.
@@ -391,9 +392,6 @@ resources: | |||
nameSuffix: "-a" | |||
`), | |||
writeC("comp-b", ` | |||
resources: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer permitted to call the same resources two times in each components due to the change to resources
was transitioned to ResMap
before applying components.
If I understand the problem correctly, then I can think of a couple suggestions
Of these options, I'm hoping that (3) or (4) will be feasible. (1) is okay too. (2) and (5) we should try to avoid if we can, but we can consider them if the other options aren't possible. I am also open to other solutions if you can come up with some better ideas. |
@koba1t I edited my comment for (2) above - I think changing the Generators interface is actually not feasible and will have a lot of consequences, so let's try to avoid that one. |
Thanks for thinking of a solution and explaining it so clearly! |
Hi everyone, just a little idea of mine. How about adding func (r ResMap) withProperties(crds []kt.Crds, vars []types.Var ) ResMap {
r.crds = crds
r.vars = vars
return r
} We can call it from Factory m, err := newResMapFromResourceSlice(ress).withProperties(crds,vars) Alternatively, instead of adding individual optional fields like Ideally speaking, we should separate CRDs and Vars as its own maps and make Generators return bunch of maps :) Example implementation: https://medium.com/@reetas/clean-ways-of-adding-new-optional-fields-to-a-golang-struct-99ae2fe9719d |
a38f44d
to
09b3195
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: koba1t 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 |
09b3195
to
594aaee
Compare
…unction to ResourceGenerator fix for failing tests
594aaee
to
823fe3f
Compare
PR needs rebase. 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. |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
#4402