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

Results regex should be the same as other substitution regexes #2464

Closed
bobcatfish opened this issue Apr 22, 2020 · 6 comments · Fixed by #2471
Closed

Results regex should be the same as other substitution regexes #2464

bobcatfish opened this issue Apr 22, 2020 · 6 comments · Fixed by #2471
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@bobcatfish
Copy link
Collaborator

bobcatfish commented Apr 22, 2020

Expected Behavior

We should permit the same characters in substitution for Task results as we do for other subsitutions.

Actual Behavior

The results variable replacement logic defines its own regex:

variableSubstitutionFormat = `\$\([A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\)`

Which is different from the one used for other substitution:

const parameterSubstitution = `[_a-zA-Z][_a-zA-Z0-9.-]*(\[\*\])?`

This means the results regex, doesn't allow for the same set of characters, for example it does not allow the name of a variable to contain _

@vdemeester
Copy link
Member

/kind feature

@tekton-robot tekton-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 22, 2020
bobcatfish added a commit to bobcatfish/pipeline that referenced this issue Apr 22, 2020
When results parsing was implemented, the set of allowed characters
wasn't made to match the rest of our substitutions. This duplicates the
set of characters though hopefully we can eventually consolidate this
logic.

I discovered this when trying to use the kaniko task in the catalog
https://github.com/tektoncd/catalog/blob/v1beta1/kaniko/kaniko.yaml

Part of tektoncd#2464.
tekton-robot pushed a commit that referenced this issue Apr 23, 2020
When results parsing was implemented, the set of allowed characters
wasn't made to match the rest of our substitutions. This duplicates the
set of characters though hopefully we can eventually consolidate this
logic.

I discovered this when trying to use the kaniko task in the catalog
https://github.com/tektoncd/catalog/blob/v1beta1/kaniko/kaniko.yaml

Part of #2464.
@bobcatfish
Copy link
Collaborator Author

I think that #2471 doesn't totally address this b/c the logic is spread across multiple regexes in 2 different packages so I'm reopening this

@bobcatfish bobcatfish reopened this Apr 23, 2020
bobcatfish added a commit to bobcatfish/pipeline that referenced this issue Apr 23, 2020
When results parsing was implemented, the set of allowed characters
wasn't made to match the rest of our substitutions. This duplicates the
set of characters though hopefully we can eventually consolidate this
logic.

I discovered this when trying to use the kaniko task in the catalog
https://github.com/tektoncd/catalog/blob/v1beta1/kaniko/kaniko.yaml

Part of tektoncd#2464.

(cherry picked from commit fc2bf79)
tekton-robot pushed a commit that referenced this issue Apr 23, 2020
When results parsing was implemented, the set of allowed characters
wasn't made to match the rest of our substitutions. This duplicates the
set of characters though hopefully we can eventually consolidate this
logic.

I discovered this when trying to use the kaniko task in the catalog
https://github.com/tektoncd/catalog/blob/v1beta1/kaniko/kaniko.yaml

Part of #2464.

(cherry picked from commit fc2bf79)
@tekton-robot
Copy link
Collaborator

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.

/lifecycle rotten

Send feedback to tektoncd/plumbing.

@tekton-robot
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.

/lifecycle stale

Send feedback to tektoncd/plumbing.

@tekton-robot
Copy link
Collaborator

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

/close

Send feedback to tektoncd/plumbing.

@tekton-robot tekton-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Aug 14, 2020
@tekton-robot
Copy link
Collaborator

@tekton-robot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

/close

Send feedback to tektoncd/plumbing.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants