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

BCDA hotfix: remove relative path for sourcing .env files #157

Closed
wants to merge 1 commit into from

Conversation

alex-dzeda
Copy link
Contributor

🎫 Ticket

No associated ticket

🛠 Changes

Removed reliance on gopath for sourcing env file.

ℹ️ Context for reviewers

Due to some change in the virtual machine configuration where BCDA is deployed, paths no longer aligned in the production environment. This takes the guess-work out of any path work, and uses strictly absolute paths in copying the files in the correct spot.

✅ Acceptance Validation

Building and sourcing now comes from a single directory regardless of configuration (via docker or bare metal).

🔒 Security Implications

  • This PR adds a new software dependency or dependencies.
  • This PR modifies or invalidates one or more of our security controls.
  • This PR stores or transmits data that was not stored or transmitted before.
  • This PR requires additional review of its security implications for other reasons.

If any security implications apply, add Jason Ashbaugh (GitHub username: StewGoin) as a reviewer and do not merge this PR without his approval.

@kyeah
Copy link
Contributor

kyeah commented Feb 16, 2024

@alex-dzeda @laurenkrugen-navapbc Just seeing this PR. Is it still needed?

On a related note, I ran into some issues running individual tests in vscode (not in docker-compose) when pairing with @karinamzalez. I think it would still be good to make this change with an adjustment to support an environment variable that overrides the path for local development, something like:

configBasePath := "/go/src/github.com/CMSgov/bcda-ssas-app/ssas/cfg/configs"
if cpath := os.Getenv("CONFIG_BASE_PATH"); cpath != "" {
  configBasePath = cpath
}

envPath := fmt.Sprintf(%s/%s.env", configBasePath, env)

That way we can set vscode to ensure the base path is correct.

# repo vscode settings
"CONFIG_BASE_PATH": "${workspaceFolder}/ssas/cfg/configs"

@carlpartridge
Copy link
Contributor

@kyeah @laurenkrugen-navapbc Should we close this PR? Worth spinning off a new ticket for your related local dev testing fix?

@laurenkrugen-navapbc
Copy link
Contributor

This is no longer needed! There was an issue sourcing an environment variable and it was resolved by updating an environment variable vs making the change here.

@bhagatparwinder bhagatparwinder deleted the alex/hotfix-prod-2/3/24 branch September 10, 2024 18:51
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.

4 participants