-
Notifications
You must be signed in to change notification settings - Fork 420
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
Incorrect capitalization in fields treated differently b/w first creation + updates #526
Comments
p.s. I thought this was just me until I paired with @sbwsg and he ran into it as well |
Does this only happen if you change something in the resourceTemplate. If this happens when you change something in the metadata/params as well, then this is definitely very bizarre |
Ah, interesting! So... If I add a new param to the trigger template then I see this update straight away after applying it. However, if I rename a workspace (for example) in the resourceTemplate and apply it then that change ends up in the |
This is wild! If I change a param and a resource template field at the same time, the param change takes and the resource template field only changes in the last-updated-configuration :O @dibyom sounds like this makes sense to you somehow?? |
My hunch is that it has something to do with just the resourceTemplates since they get stored as "rawMessage"/"unstructured" unlike the regular fields |
/kind bug |
probably related: kubernetes/kubernetes#64612 |
In the repro case we were using It's possible that open API validation will help here, some related issues from pipeline:
|
@dibyom tried adding openapi validation, but it seemed to be ignored unless we disabled the webhook 😨 |
Wow, great sleuthing! |
Expanding on @bobcatfish 's comment above, here is what I tried:
I don't know enough about the webhooks workflow, but it seems like the knative webhook field name checks should be case sensitive? (Also, @bobcatfish could repro this on Pipelines as well!) |
Rotten issues close after 30d of inactivity. /close Send feedback to tektoncd/plumbing. |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
Stale issues rot after 30d of inactivity. /lifecycle rotten Send feedback to tektoncd/plumbing. |
@tekton-robot: Closing this issue. In response to this:
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. |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
/label priority/important-longterm |
Verified that this is still an issue. I think adding openAPI schemas would be the ideal long term way of solving this so I'm going to try to add openAPI schemas for Triggers |
Update: I was able to generate a go file that contains the openAPI structs along with a bunch of OpenAPI violations. Now I'm not sure how to get these into the CRD yaml in some automated fashion.
Vincent's branch came in handy: tektoncd/pipeline@main...vdemeester:schema-gen My branch is here: https://github.com/tektoncd/triggers/compare/main...dibyom:openapi?expand=1 |
Ok, it kinda works 🎉
Main issue is with the URL type:
|
😞 (looks like we need some custom schemapatch after all) EDIT: Custom schemapatch works. Remaining work is:
|
This commit adds a hack/update-schemas.sh script that will generate OpenAPI specs for v1beta1 Triggers CRDs and then patch the CRD definitions in the config/ folder with these specs. To enable these, we now have stub CRD definitions for all types in config/resources that this script uses to generate the fully formed CRDs with OpenAPI schema. Since the EventListener allows PodSpec types, we use the hack/schema-config.yaml file to filter down the subset of `PodSpec` and related fields that we allow in Triggers. Addresses tektoncd#526 Signed-off-by: Dibyo Mukherjee <dibyo@google.com>
So, the OpenAPI fix works but this does mean a BREAKING CHANGE if we merge the PR. The old behavior where we allowed wrong cases (e.g. I wonder if there is a way to enable the schemas without this breaking change for now (while we announce and deprecate the old behavior). |
From today's WG:
|
|
may be fixed by addressing #1271 |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
Stale issues rot after 30d of inactivity. /lifecycle rotten Send feedback to tektoncd/plumbing. |
Is this resolved and can be closed? @dibyom |
Expected Behavior
When I make a change to a TriggerTemplate it should change!
Actual Behavior
When I apply a TriggerTemplate and subsequently try to make changes to it, the changes are never reflected in the state of the TriggerTemplate! I have to delete the TriggerTemplate and re-apply it to see the change.
Steps to Reproduce the Problem
last-applied-configuration
does reflect the values we tried to change (i.e. "perplexed" above), e.g:Note that I am not even using an eventlistener or referring to
unused-triggertemplate
anywhere! At first I thought the event listener might be doing this but it's not involved at all afaik!(I am using the latest triggers from HEAD b44648c)
Additional Info
My only guess for what could be causing this is a webhook? I'm kinda stumped tho!
Also this might be something I'm not understanding that I need to do differently and not a bug at all? However I haven't seen this behavior with any other CRDs so not sure!
The text was updated successfully, but these errors were encountered: