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

Make poetry venv path static #356

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

whabanks
Copy link
Contributor

Summary | Résumé

Similar to the work done in Admin and API this PR makes our poetry dev container venv paths static so vscode consistently picks up and automatically uses the correct venv when switching between or rebuilding containers.

Related Issues | Cartes liées

Test instructions | Instructions pour tester la modification

  1. In vscode - ctrl + shift + p and select Python: clear workspace interpreter setting
  2. Rebuild the dev container
  3. Once the container is built, you may need to select the interpreter again
  4. Open a new terminal / shell
  5. Note that the virtual environment is automatically activated

Ensure venv path is maintained across separate container builds

  1. Check out this admin PR
  2. Rebuild the container without cache
  3. Note that the interpreter is automatically selected
  4. Open a terminal, note that the correct venv is automatically activated

Release Instructions | Instructions pour le déploiement

None.

Reviewer checklist | Liste de vérification du réviseur

  • This PR does not break existing functionality.
  • This PR does not violate GCNotify's privacy policies.
  • This PR does not raise new security concerns. Refer to our GC Notify Risk Register document on our Google drive.
  • This PR does not significantly alter performance.
  • Additional required documentation resulting of these changes is covered (such as the README, setup instructions, a related ADR or the technical documentation).

⚠ If boxes cannot be checked off before merging the PR, they should be moved to the "Release Instructions" section with appropriate steps required to verify before release. For example, changes to celery code may require tests on staging to verify that performance has not been affected.

whabanks and others added 2 commits February 28, 2025 12:25
- Disable auto venv creation for dev containers
- Manually create the poetry venv with a static path
- Set vscode default interpreter path to the static venv
- Ensure all shells started post container creation auto-activate the venv
@whabanks whabanks requested a review from a team March 3, 2025 15:26
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.

1 participant