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

Gitstream action spins indefinitely when the job fails + multi-line values don't indent #62

Closed
michaeldrotar opened this issue Mar 20, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@michaeldrotar
Copy link

Describe the bug

(This should probably be 2 bugs but I have an example that shows both)

If the job fails, such as from a syntax error in the generated yaml file, it never reports back to the PR's actions that it failed and the icon stays spinning indefinitely (10d and counting here)
image

To Reproduce

There are a number of ways to reproduce this, I usually hit it when some of the dynamic content causes the error like with a multi-line description

Steps to reproduce the behavior:

  1. Create an automation like so
  print_description:
    if:
      - true
    run:
      - action: add-comment@v1
        args:
          comment: |
            description: {{ pr.description }}
  1. Set a single-line description, it should work
  2. Set a multi-line description like this
Line 1

Line 2
  1. You get an error like this:
2023-03-10T00:33:54.4061491Z /node_modules/js-yaml/lib/loader.js:187
2023-03-10T00:33:54.4061837Z   throw generateError(state, message);
2023-03-10T00:33:54.4062092Z   ^
2023-03-10T00:33:54.4099659Z YAMLException: end of the stream or a document separator is expected (50:1)
2023-03-10T00:33:54.4099950Z 
2023-03-10T00:33:54.4100698Z  48 |             description: Line 1 ...
2023-03-10T00:33:54.4100948Z  49 | 
2023-03-10T00:33:54.4101422Z  50 | Line 2 ...

Expected behavior

  1. It should indent each line in the generated output
48 |             description: Line 1 ...
49 | 
50 |             Line 2 ...
  1. If it does fail for any reason, it should report back to stop the spinner (I've had other failures from dynamic data but this is the easiest to demonstrate)

Screenshots

Included above.

Additional context

I had a slack chat with Ofer about this but recording it here too since the infinite spinner failure has come up a few times now that we have devs using it.

@michaeldrotar michaeldrotar added the bug Something isn't working label Mar 20, 2023
@vim-zz
Copy link
Collaborator

vim-zz commented Mar 23, 2023

The first bug here was fixed, the job should no longer hang.

@vim-zz
Copy link
Collaborator

vim-zz commented Apr 2, 2023

@michaeldrotar this should work now and not hang

@admarko
Copy link

admarko commented Apr 4, 2023

@vim-zz - we believe this is still happening

@vim-zz
Copy link
Collaborator

vim-zz commented Apr 4, 2023

@admarko, I'm not totally certain about the details of what you're seeing, but we're actively developing a failsafe mechanism that will address all of these situations. It's our top priority.

@vim-zz
Copy link
Collaborator

vim-zz commented Apr 16, 2023

The failsafe mechanism is active now

@vim-zz vim-zz closed this as completed Apr 16, 2023
@admarko
Copy link

admarko commented Apr 16, 2023

Thank you @vim-zz!

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

No branches or pull requests

3 participants