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

Bug: unmarshalling CommandStep error when a : character is found in a string that's passed to buildkite-agent pipeline upload #3126

Open
jamietanna opened this issue Dec 13, 2024 · 0 comments

Comments

@jamietanna
Copy link

I noticed today that, when trying to add an additional step to the pipeline to notify Slack, I received the following error:

2024-12-13 16:51:28 WARN   There were some issues with the pipeline input - pipeline upload will proceed, but might not succeed:
while unmarshaling the value for key "steps" into struct field "Steps"
  ↳ while unmarshaling step 1 of 1
      ↳ fell back using unknown type of step due to an unmarshaling error
          ↳ unmarshalling CommandStep: unmarshaling item at index 0 of 2: incompatible types: cannot unmarshal *ordered.Map[string,interface {}] into *string command=pipeline upload

This is given the following:

steps:
  - label: "Something to write here"
    command:
      - echo "Some context for the error message, blah: See https://github.com/...."
      - exit 1
    agents:
      image: busybox:latest
    notify:
      - slack:
          channels:
            - "#some-alerts-channel"

I noticed that when making the following change:

 steps:
   - label: "Something to write here"
     command:
-      - echo "Some context for the error message, blah: See https://github.com/...."
+      - echo "Some context for the error message, blah. See https://github.com/...."
       - exit 1
     agents:
       image: busybox:latest
     notify:
       - slack:
           channels:
             - "#some-alerts-channel"

Then the upload started working as expected.

It looks like there may be some additional YAML parsing/marshalling occurring, that doesn't seem to handle the : in the string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant