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

Improve workflow search to avoid retrieve archived workflows #89

Open
dapineyro opened this issue Sep 21, 2022 · 0 comments
Open

Improve workflow search to avoid retrieve archived workflows #89

dapineyro opened this issue Sep 21, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@dapineyro
Copy link
Collaborator

When cloudos-cli looks for the workflow ID, it just retrieves the first ID with the specified workflow name (see here:

if (element["name"] == name and element["repository"]["platform"] == repository_platform):
). However, that includes archived and unarchived workflows.
If, by chance, the first ID corresponds to an archived workflow, that will produce an error in the send_job function as, in this case, the API only accepts non-archived workflows.

The solution is to add an additional control in this if (

if (element["name"] == name and element["repository"]["platform"] == repository_platform):
) to also ask for non-archived workflows, if that information is retrieved here:
r = requests.get("{}/api/v1/{}?teamId={}".format(cloudos_url,

@dapineyro dapineyro added the enhancement New feature or request label Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant