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

Implicit params being propogated to Refs #4483

Closed
wlynch opened this issue Jan 13, 2022 · 1 comment · Fixed by #4484
Closed

Implicit params being propogated to Refs #4483

wlynch opened this issue Jan 13, 2022 · 1 comment · Fixed by #4484
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@wlynch
Copy link
Member

wlynch commented Jan 13, 2022

Expected Behavior

Implicit params should only be available with the same resource - they shouldn't be considered for references.

Actual Behavior

From @sbwsg in #4388 (comment):

Just to add another anecdotal here - we experienced some surprising behaviour in relation to this change during the release of 0.32 of Tekton Pipelines. One of our Pipelines relied on a default param value in a referenced Task, which was then unexpectedly overridden by the implicit param defined in the Pipeline.

It's tricky to describe in words, here's a link to the PipelineTask as we had it before we noticed this behaviour and here's a link to the PipelineTask after we corrected for it.

^ In the first link we don't pass the platforms param because we're relying on the default defined in the referenced Task. With implicit params that platforms param gets overridden with the value in the platforms param defined for the Pipeline. The reason for the difference in the values is a bit nuanced but regardless it looks like this might be accidentally backwards incompatible?

edit: tried to disambiguate that the default was set in the referenced task.

Additional Info

Likely affected code:

if config.FromContextOrDefaults(ctx).FeatureFlags.EnableAPIFields == "alpha" {
ctx = addContextParams(ctx, pt.Params)
ps.Tasks[i].Params = getContextParams(ctx, pt.Params...)
}

@wlynch wlynch added the kind/bug Categorizes issue or PR as related to a bug. label Jan 13, 2022
@wlynch
Copy link
Member Author

wlynch commented Jan 13, 2022

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant