8000 Seeing old complete runs rather than runs in progress, when a run hasn't started yet · Issue #8 · remorses/actions-cli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Seeing old complete runs rather than runs in progress, when a run hasn't started yet #8

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

Open
tsutsu opened this issue Nov 27, 2020 · 1 comment

Comments

@tsutsu
Copy link
tsutsu commented Nov 27, 2020

I have a script that pushes a tag, and then immediately calls actions-cli to watch the deploy workflow triggered on: create of that tag.

Right now, I need to insert a sleep in my script, because without it, actions-cli just finds the newest existing run (the one from the last deploy), shows it, and exits.

Although my tag has already been pushed, the relevant workflow-run gets created asynchronously on Github's side, and it seemingly takes a few seconds. So if I invoke actions-cli right away, the new run isn't available yet. Instead, it just sees the old runs, and assumes I wanted to see the newest of those.

But of course, I actually want to see the new run; and if hasn't been created yet, I want actions-cli to wait around until it does get created, and then show its progress.

Proposed fix

  • Add a timestamp-valued switch to actions-cli, which will tell it to ignore or avoid matching any workflow-runs that were created before the passed timestamp.
  • Add a boolean switch, to tell actions-cli that if it fails to discover any non-ignored runs (as could happen with the above time-filter in place), it should not exit, but rather should poll the workflow-runs API endpoint until it does successfully find a workflow run that passes the filter.

With these two switches together, I wouldn't need the sleep in my script; instead, I could run e.g. actions-cli --runs-since=... --block-until-found, and it would just sit there until a new workflow-run starts, at which point it would then start logging the progress of that workflow-run.

@remorses
Copy link
Owner

This cli doesn’t support tags, I would need to change the api endpoint I am using

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

No branches or pull requests

2 participants
0