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 CI #11

Merged
merged 5 commits into from
Jun 11, 2024
Merged

Add CI #11

merged 5 commits into from
Jun 11, 2024

Conversation

genehack
Copy link
Contributor

@genehack genehack commented May 21, 2024

No description provided.

@genehack
Copy link
Contributor Author

Noting that with these first set of changes, running nextstrain build ingest --config 'viruses=["229e"]' only does the single species build, as expected.

@genehack genehack force-pushed the add-ci-8 branch 2 times, most recently from be90a1a to 7ea8972 Compare May 22, 2024 01:06
@genehack
Copy link
Contributor Author

Hurdle: The pathogen-repo-ci.yaml workflow in .github (which is what I think I'm supposed to be using for this...) has nextstrain build . hard-coded, so the build_args I'm trying to pass in just don't work right.

The one thing that jumps out at me is updating the base workflow so that the build target can be passed in (defaulting to . to preserve current behavior). Will discuss this with @joverlee521 in 1:1 tomorrow!

@genehack genehack force-pushed the add-ci-8 branch 4 times, most recently from 211edd3 to 629df84 Compare May 22, 2024 16:52
@joverlee521
Copy link

Hurdle: The pathogen-repo-ci.yaml workflow in .github (which is what I think I'm supposed to be using for this...) has nextstrain build . hard-coded, so the build_args I'm trying to pass in just don't work right.

The one thing that jumps out at me is updating the base workflow so that the build target can be passed in (defaulting to . to preserve current behavior). Will discuss this with @joverlee521 in 1:1 tomorrow!

Ah, sorry if this wasn't clear! I've been using the pathogen-repo-build workflow instead of the pathogen-repo-ci because of this issue.

@genehack genehack force-pushed the add-ci-8 branch 2 times, most recently from 06e2890 to 137a7a5 Compare May 22, 2024 17:24
@genehack
Copy link
Contributor Author

Ah, sorry if this wasn't clear! I've been using the pathogen-repo-build workflow instead of the pathogen-repo-ci because of this issue.

I made a local copy-fork of pathogen-repo-ci workflow into seasonal-cov and added a build-target param; I think this will be backwards compatible (because I defaulted to ".")

Have it working for the ingest build, currently working on extending to download ingest results before the phylogenetic build.

@genehack genehack force-pushed the add-ci-8 branch 6 times, most recently from d886ecf to 4081ebd Compare May 22, 2024 18:04
@genehack genehack requested a review from a team May 22, 2024 18:13
@genehack genehack marked this pull request as ready for review May 22, 2024 18:13
genehack added a commit to nextstrain/.github that referenced this pull request May 22, 2024
This adds the following features to the `pathogen-repo-ci` workflow:

* defines a `build-target` argument that will get passed to
  `nextstrain build` as a target directory — this allows the targeting
  of sub-dir based workflows, which was the main original issue in #63
* defines arguments (`download-previous-artifact`,
  `previous-artifact-name`) and a conditional step (`Dowload previous
  step artifact`) to support the downloading of the build artifact from
  a previous step to allow testing of later steps in a complete
  pathogen repo build

This combination of features was all that was needed to support [a CI
workflow for
`seasonal-cov`](nextstrain/seasonal-cov#11)
that:

1. runs an ingest workflow for a subset of the regular build data
2. uploads an artifact with the ingest output
3. downloads that artifact into a phylogenetic workflow
4. runs the phylogenetic workflow for the same subset of data
@genehack
Copy link
Contributor Author

Note: changes to the core pathogen-repo-ci forked into this branch are now in this PR — if/when that gets merged, I will update this branch to remove the forked copy and use the core workflow instead.

Comment on lines 14 to 15
uses: nextstrain/.github/.github/workflows/pathogen-repo-ci.yaml@master
name: nextstrain build ingest
uses: ./.github/workflows/pathogen-repo-ci.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, instead of a local fork, you can point to the centralized workflow on an alternative branch, e.g.

Suggested change
uses: nextstrain/.github/.github/workflows/pathogen-repo-ci.yaml@master
name: nextstrain build ingest
uses: ./.github/workflows/pathogen-repo-ci.yaml
uses: nextstrain/.github/.github/workflows/pathogen-repo-ci.yaml@update-pathogen-repo-ci-63

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks — I was iterating pretty rapidly on both the underlying "base" workflow and the ci.yaml in this repo so it was faster to just be able to keep amending the commit and force pushing the one repo. (I'm not particularly happy about that but I think if I was force pushing branches in 2 repos at the same time where one was dependent on the other, I would have tripped over my own feet a lot ...more.)

@genehack genehack force-pushed the add-ci-8 branch 2 times, most recently from 4081ebd to 95b63d2 Compare May 23, 2024 17:42
@genehack
Copy link
Contributor Author

genehack commented May 24, 2024

Noting that this is going to stall briefly behind the changes discussed in today's lab meeting around standardizing pathogen-repo-ci and making it "smarter" — ticket for that to come and get linked here soon.

ETA: specifically, this PR needs to land and then the local fork in this PR should be cleaned up.

[Slack
context](https://bedfordlab.slack.com/archives/C0K3GS3J8/p1716315967004439)
with discussion of different ways to accomplish this.

I think overall this approach is better; it does cause an extremely
tight coupling between the two parts of the config, but that coupling
was already present in the old `VIRUSES` global in the Snakemake
files; this mainly changes where that list lives.
@genehack
Copy link
Contributor Author

Blocked on nextstrain/.github#89

@genehack genehack force-pushed the add-ci-8 branch 6 times, most recently from aff4512 to fdfc343 Compare May 31, 2024 20:12
@genehack genehack requested a review from a team June 4, 2024 19:05
@genehack
Copy link
Contributor Author

genehack commented Jun 7, 2024

This has been pointed at the master version of .github/pathogen-repo-ci, and some of the in-flight temporary work cleaned up.

It is ready for another look.

@genehack genehack merged commit 166576a into main Jun 11, 2024
6 checks passed
@genehack genehack deleted the add-ci-8 branch June 11, 2024 15:56
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

Successfully merging this pull request may close these issues.

3 participants