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

Auto deploy public builds #114

Merged
merged 4 commits into from
Aug 9, 2023
Merged

Auto deploy public builds #114

merged 4 commits into from
Aug 9, 2023

Conversation

joverlee521
Copy link
Contributor

@joverlee521 joverlee521 commented Aug 2, 2023

Description of proposed changes

Deploy the public builds to s3://nextstrain-data as part of the automated public workflow.
The public builds should no longer have to be manually inspected since outliers are now automatically removed as of #110.

Related issue(s)

Follow up to #106

Testing

  • Checks pass
  • To test w/ @j23414 as part of our weekly builds

Uses the Nextstrain CLI to upload all inputs for `all_public` in
rename.smk to the provided URL.
Use the new `all_deploy` rule to automatically deploy all builds
as the last step of the public builds pipeline.

The public builds should no longer have to be manually inspected since
outliers are now automatically removed.¹

¹ #110
@joverlee521 joverlee521 requested a review from a team August 2, 2023 23:09
@joverlee521
Copy link
Contributor Author

Hmm, the test run started through the GH Action workflow did not work as expected...

From the logs

[batch] [2023-08-04T15:13:48-07:00] + snakemake --printshellcmds all_deploy -p --configfile profiles/nextstrain-public.yaml --cores=36 --resources=mem_mb=73728
[batch] [2023-08-04T15:13:50-07:00] Building DAG of jobs...
[batch] [2023-08-04T15:13:51-07:00] Nothing to be done (all requested files are present and up to date).

However, I was able to run the build on AWS Batch manually with:

envdir ../env.d/personal-aws/ nextstrain build --aws-batch --detach --cpus 36 --memory 72gib . all_deploy -p --configfile profiles/nextstrain-public.yaml

And see the build is running as expected when I re-attach to the job:

nextstrain build --aws-batch --attach ded63513-183b-4e1d-9fbc-5d51721bb8c1 . 

@joverlee521
Copy link
Contributor Author

Oh, the upload would have failed anyways because I didn't update the AWS IAM user permissions for nextstrain-seasonal-flu-uploader. Updated permissions to allow editing of s3://nextstrain-data and allow CloudFront invalidations.

@joverlee521
Copy link
Contributor Author

Still have no idea why the GH Action triggered run didn't work as intended, but the AWS Batch run that I triggered locally completed successfully and the live builds at https://nextstrain.org/flu/seasonal have been updated.

@joverlee521
Copy link
Contributor Author

Huh okay, so I get the same "Nothing to be done" message if I run the build command a brand new clone of the repo. So something in my local repo is influencing the DAG 🤦‍♀️

We were running into the Snakemake issue where the log directive in
the default rule causes it to skip tasks.¹ This issue has been fixed
since Snakemake 7.25.1, but we are still pinned to 7.24.1 in
nextstrain/docker-base.²

Just removing the log directive here is the simplest fix for this
particular issue. We'll still be able to see the upload logs in
the AWS Batch logs.

¹ snakemake/snakemake#2142
² https://github.com/nextstrain/docker-base/blob/95cea4f44a803ce27992706c87a7237492dbb083/Dockerfile#L277
@joverlee521
Copy link
Contributor Author

Confirmed that 087558c fixed the issue for me in a newly cloned repo.

@joverlee521 joverlee521 merged commit 65df517 into master Aug 9, 2023
6 checks passed
@joverlee521 joverlee521 deleted the auto-deploy-public-builds branch August 9, 2023 22:13
@joverlee521
Copy link
Contributor Author

@j23414 With this merged, the public builds should automatically deploy in tomorrow's run.

You won't have to download the build from AWS Batch anymore, but I would definitely check on Friday that the builds at nextstrain.org/flu/seasonal have been updated.

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

Successfully merging this pull request may close these issues.

1 participant