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

Pipelines ignoring following name fields on resolvers #7980

Closed
Aleromerog opened this issue May 23, 2024 · 2 comments · Fixed by #7984
Closed

Pipelines ignoring following name fields on resolvers #7980

Aleromerog opened this issue May 23, 2024 · 2 comments · Fixed by #7984
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@Aleromerog
Copy link
Contributor

Aleromerog commented May 23, 2024

Expected Behavior

Have multiple different resources resolved from a specific resolver using name field and concise remote syntax.

Actual Behavior

Following StepActions/Task/Pipeline are ignored and the first declared name is being passed to the following resources.

Steps to Reproduce the Problem

execute a TaskRun with the following:

steps:
      - name: step-1
        ref:
          resolver: some-resolver
          name: scheme://<path>/step-1
        params:
          - name: param1
            value: value1
          - name: param2
            value: value2
     - name: step-2
        ref:
          resolver: some-resolver
          name: scheme://<path>/step-2
        params:
          - name: param3
            value: value3
          - name: param4
            value: value4

Resulting in

extra params passed by Step to StepAction: [params3 params4]

Even though step-2 supports those parameters. Which means that is trying to apply params3 and params4 as if it was using step-1.

Additional Info

Proposed solution

change GetNameAndNamespace in pkg/resolution/resource/name.go to accept *v1beta1.ResolutionRequestSpec parameter instead of just params

func GetNameAndNamespace(resolverName string, owner kmeta.OwnerRefable, name string, namespace string, req *v1beta1.ResolutionRequestSpec) (string, string, error) { ... }
@Aleromerog Aleromerog added the kind/bug Categorizes issue or PR as related to a bug. label May 23, 2024
@Aleromerog
Copy link
Contributor Author

cc'ing @chitrangpatel

@chitrangpatel
Copy link
Contributor

Thanks @Aleromerog !
I agree that this should be fixed. If you have the fix handy, please submit a PR and I'm happy to review it.

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.

2 participants