Skip to content

Conversation

@kthhrv
Copy link
Contributor

@kthhrv kthhrv commented Nov 6, 2025

This PR adds support for configurations without locations, allowing the envars tool to work in scenarios where location-based scoping is not needed.

  • Made the --loc parameter optional in the init command
  • Updated location validation logic to handle cases where no locations are configured
  • Added conditional rendering of the locations field in YAML output

in AWS we have prod, staging in Master and Sandbox
but in GCP data-platform we only have prod, staging

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for configurations without locations, allowing the envars tool to work in scenarios where location-based scoping is not needed.

  • Made the --loc parameter optional in the init command
  • Updated location validation logic to handle cases where no locations are configured
  • Added conditional rendering of the locations field in YAML output

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/envars/cli.py Made --loc parameter optional; added validation to prevent using --loc when no locations configured; updated location resolution logic
src/envars/main.py Updated YAML serialization to conditionally include locations field; added null-safety checks for location operations
tests/test_cli.py Added tests for init and output commands without locations; added test for error when using --loc with no configured locations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants