-
Notifications
You must be signed in to change notification settings - Fork 2
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
fix: always use API_V3_URL environment variable #2178
Conversation
Seems odd that we have two ways of doing this. If we have |
@digitalcora that's a great point! we do have this as an environment variable in prod, dev, and dev-green. i'll go ahead and refactor this code to always use the signs_ui s3 bucket is also configured based on Lines 28 to 34 in c7d9904
|
I suppose we could also say that |
eeaaaa4
to
a30d15d
Compare
a30d15d
to
2fbcc20
Compare
@digitalcora my preference is to always use the environment variables for each individual parameter. this keeps that kind of configuration in terraform as a single source of truth for connections between applications |
Our ECS tasks all set a `API_V3_URL` pointing to the desired V3 API environment but we were ignoring that value and instead deriving the V3 API URL based on `ENVIRONMENT_NAME`. This is confusing. With this change the URL used for the V3 API is always fetched from the environment as `API_V3_URL` (unless `MIX_ENV=test`). This has the added benefit of picking up the changes in mbta/devops#2122
2fbcc20
to
a2b08dc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for missing what Cora caught. And thanks for fixing it.
Our ECS tasks all set a
API_V3_URL
pointing to the desired V3 API environment but we were ignoring that value and instead deriving the V3 API URL based onENVIRONMENT_NAME
. This is confusing.With this change the URL used for the V3 API is always fetched from the environment as
API_V3_URL
(unlessMIX_ENV=test
).This has the added benefit of picking up the changes in https://github.com/mbta/devops/pull/2122
Asana task: Point screens-dev-green at api-dev-blue