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

Always use production config.json in index-resources GH Action #983

Merged
merged 3 commits into from
Aug 14, 2024

Conversation

joverlee521
Copy link
Contributor

@joverlee521 joverlee521 commented Aug 13, 2024

Description of proposed changes

Ensures that the index-resource workflow always uses the production config as our Heroku apps default to NODE_ENV=production.¹

¹ https://docs.nextstrain.org/projects/nextstrain-dot-org/en/latest/infrastructure.html#environment-or-config-variables

Related issue(s)

Resolves #980

Checklist

Add reminder to also update revision number in `env/testing/config.json`
Ensures that the index-resource workflow always uses the production
config as our Heroku apps default to NODE_ENV=production.¹

¹ <https://docs.nextstrain.org/projects/nextstrain-dot-org/en/latest/infrastructure.html#environment-or-config-variables>
@nextstrain-bot nextstrain-bot temporarily deployed to nextstrain-s-production-wydqbw August 13, 2024 20:20 Inactive
@@ -22,7 +22,8 @@ The nextstrain.org testing & production configs currently set this to
``s3://nextstrain-inventories/resources/v<revision_number>.json.gz``.

If you make any updates that changes the structure or the contents of the resource
index JSON, then bump the ``<revision_number>`` within the configs (``env/production/config.json``)
index JSON, then bump the ``<revision_number>`` within the configs
(``env/testing/config.json`` and ``env/production/config.json``)
Copy link
Member

Choose a reason for hiding this comment

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

Is there a situation where the <revision_number> should differ in these files?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, env/testing/config.json is only used for local testing right now so I don't think so?
(Maybe if we ever set up a completely separate testing instance on AWS there would be reason for them to differ?)

Copy link
Member

Choose a reason for hiding this comment

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

Ok - in this case I continue to think that we should add a check in CI that they are the same. Otherwise it's too easy to overlook the docs, get things working locally, and then overwrite the production version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good suggestion! I added in 9d45dd0

Based on feedback from @jameshadfield
<#983 (comment)>

Ensure that the testing and production configs have matching
RESOURCE_INDEX so that we don't accidentally upload an expected
resource index version.
@joverlee521 joverlee521 temporarily deployed to nextstrain-s-production-wydqbw August 13, 2024 23:30 Inactive
@joverlee521 joverlee521 merged commit 1a01f08 into master Aug 14, 2024
7 checks passed
@joverlee521 joverlee521 deleted the production-indexer branch August 14, 2024 22:28
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.

./scripts/get-resource-index-ref-matrix not producing the correct matrix
4 participants