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

params NOT WORK #635

Closed
bbqi opened this issue Jul 27, 2024 · 6 comments · Fixed by #641
Closed

params NOT WORK #635

bbqi opened this issue Jul 27, 2024 · 6 comments · Fixed by #641
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@bbqi
Copy link

bbqi commented Jul 27, 2024

use script:

params: commit=1
tags: fix🐞
steps:
  - name: step1
    command: bash
    script: |
      echo ${commit}
      export

output:


declare -x "commit="123"
declare -x 1="\"commit=123"

params not declare. please check it. thanks

maybe from version 1.13.1 : (bug) Fix params quoting when using quotes on value by @zph in #602

just use ${commit//\"}, output not include quotes on value.

@bbqi bbqi changed the title params NOT work params NOT WORK Jul 27, 2024
@yohamta yohamta added bug Something isn't working good first issue Good for newcomers labels Jul 27, 2024
@zph
Copy link
Contributor

zph commented Jul 27, 2024

Taking a look

@zph
Copy link
Contributor

zph commented Jul 27, 2024

To determine if it's related to #602 , I checked out the commit right before that PR's merge (fdcc93a):

test script (added second step in case this is about the ${})

params: commit=1
tags: fix🐞
steps:
  - name: step1
    command: bash
    script: |
      echo ${commit}
      export
  - name: step2
    command: bash
    script: |
      echo $commit $1
      export

The output of step 1 is:

"1"
.... (unrelated exported vars)
declare -x commit="\"1\""

Then I checked the tip of main (a20bd1d) and using same dag, I can reproduce your bug report:

<both the echo of commit is missing and the declare -x commit= are missing>

Then I run the commit where #602 was merged in (9ef8153)

The output is:

1
declare -x commit="1"

Summary

Pre #602 : it output commit=""1""
Immediately Post #602: it output commit="1"
Now: it doesn't output anything

In none of the cases does it explicitly 1="\"commit=123"

Finding

Next Step

I'll git bisect to find where this changed after 602 landed.

@zph
Copy link
Contributor

zph commented Jul 27, 2024

Using git bisect:

git bisect start
git bisect good 9ef8153
git bisect bad a20bd1d
git bisect bad
git bisect good

I find the following:

e78459b is the first bad commit which looks like part of a large refactor.

@zph
Copy link
Contributor

zph commented Jul 27, 2024

@yohamta Can you please take a look since you know the code in the refactor?

@yohamta
Copy link
Collaborator

yohamta commented Aug 2, 2024

@zph Thank you very much for the thorough investigation! This is extremely helpful. I will take a look shortly.

@yohamta
Copy link
Collaborator

yohamta commented Aug 3, 2024

The issue has been resolved in v1.14.2. Sorry for any inconvenience this may have caused. I greatly appreciate the support provided in helping to fix the problem. Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants