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

Refactor/rename environment configuration #391

Open
2 tasks
jsstevenson opened this issue Jan 2, 2025 · 0 comments
Open
2 tasks

Refactor/rename environment configuration #391

jsstevenson opened this issue Jan 2, 2025 · 0 comments
Labels
enhancement New feature or request priority:low Low priority

Comments

@jsstevenson
Copy link
Member

jsstevenson commented Jan 2, 2025

Feature description

We currently do two kinds of environment configuration

  1. AWS-oriented, in database.py. Possible values are Dev, Staging, and Prod
  2. Testing-oriented, in tests. Basically a boolean for whether to inject test data.

I think this could be one big thing. That's how it's handled in more traditional all-in-one backend frameworks (eg Rails) -- you'd have dev (for local dev)/test (for local test data)/staging/prod. I also think we could abstract it slightly, maybe it doesn't explicitly need to be for just AWS.

  • This might entail some name changes for our current lambda functions, which use dev for something like a temp or sandbox env. It might be very annoying to do this, so maybe we could just tack on local_dev for now.

Use case

  • The GA4GH service info spec includes a place to include an environment name, which is what got me thinking about this. They recommend dev, staging, and prod but emphasize that it's up to the implementer
  • I think it'd be nice to unify these settings for other simplicity reasons
  • I think it'd be nice to make them a little more consistent with how other people (e.g. new hires, potential external devs) might expect them to be named

Acceptance Criteria

  • Collapse checks in tests for GENE_TEST and all uses of AwsEnvName into a single enum
    • It should still be possible to run tests against a local DB and against a DB populated with test data
    • There's some confirmation requirements for running in certain environments, we should think about how to retain those smartly
  • Consider changing env name values where necessary

Proposed solution

No response

Alternatives considered

No response

Implementation details

No response

Potential Impact

No response

Additional context

No response

Contribution

Yes, I can create a PR for this feature.

@jsstevenson jsstevenson added enhancement New feature or request priority:low Low priority labels Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority:low Low priority
Projects
None yet
Development

No branches or pull requests

1 participant