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

Add workflows that are not directly using pathogen-repo-build #12

Closed
joverlee521 opened this issue Apr 22, 2024 · 4 comments
Closed

Add workflows that are not directly using pathogen-repo-build #12

joverlee521 opened this issue Apr 22, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@joverlee521
Copy link
Contributor

joverlee521 commented Apr 22, 2024

Context

Prompted by nextstrain/zika#55 (comment)

We want to monitor GH Action workflows using the pathogen-repo-build reusable workflow and we are currently filtering for them with

where
workflow_file_content_json @@ '$.jobs.*.uses starts with "nextstrain/.github/.github/workflows/pathogen-repo-build.yaml@"'

However, this does not include workflows that are nesting reusable workflows, such as the current zika ingest-to-phylo.yaml workflow.

Possible solutions

  1. We could add another proxy for filtering if we use a stable pattern across pathogen repos. e.g filter for path ingest-to-phylogenetic.yaml
  2. We could traverse the nested workflows to check if any of them are using the pathogen-repo-build workflow. (GH Action currently allows four levels of nested reusable workflows)
@joverlee521 joverlee521 added the enhancement New feature or request label Apr 22, 2024
@joverlee521
Copy link
Contributor Author

Ah right, just remembered this issue since I changed avian flu GH Action workflows in nextstrain/avian-flu#71 but the name is ingest-to-phylogenetic-ncbi.yaml instead of ingest-to-phylogenetic.yaml.

I'm going to add a separate check for the avian-flu workflow, but other pathogens that only use NCBI data should continue to follow the generic ingest-to-phylogenetic.yaml naming.

@joverlee521 joverlee521 self-assigned this Jul 11, 2024
@joverlee521
Copy link
Contributor Author

Or maybe just update exact match to pattern match

diff --git a/pathogen-workflows.sql b/pathogen-workflows.sql
index d68d368..cf23d33 100644
--- a/pathogen-workflows.sql
+++ b/pathogen-workflows.sql
@@ -93,7 +93,7 @@ workflow as materialized (
                  *
                  * <https://github.com/nextstrain/status/issues/12>
                  */
-                or path = '.github/workflows/ingest-to-phylogenetic.yaml')
+                or path like '.github/workflows/ingest-to-phylogenetic%.yaml')
         and name != 'CI'
 ),

@genehack
Copy link

@joverlee521 it looks like, reviewing the above, that the work here is done and this issue can be closed?

@joverlee521
Copy link
Contributor Author

Ah yeah, I'll consider #24 good enough. We can re-open this if there are other cases not supported.

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

2 participants