feat: Add organization region selectors#37
Merged
Conversation
Clarify region-selection behavior and task interface across docs and examples. Added a Region Selection section to YAML validation reference and README, noting that organizations can use explicit regions, `all`, globs, or mixed selectors while account configs require explicit region names. Expanded docs/README.md with detailed CLI examples (auth, graph, run output) and moved large output examples out of the top-level README. Updated task contract docs to show ActionRecorder usage, stricter typing for metadata, actions parameter type, and that sessions are scoped to account+region. Minor example YAMLs updated with comments demonstrating region selector rules.
Introduce a new anvil.regions module to manage region selectors, globs and AWS region opt-in statuses. Add resolution logic (resolve_region_selectors), bootstrap region selection for preflight calls, and helpers to classify selectors. Update TargetDescriptor validation to forbid mixing 'all' with other regions and to reject selectors for ACCOUNTS branch. Replace discovery of a simple enabled-region list with discover_region_statuses returning a dict of region -> opt-in status; OrganizationResolver and runner plumbing now pass and consume this map and resolve selectors against it. Update JSON schemas to document selectors for orgs and restrict account configs to explicit regions. Add and adjust tests to cover selector expansion, error cases, warnings for unavailable regions, and use of bootstrap region during preflight.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds organization region selectors for YAML configs.
us-*, including mixed glob and explicit regions.Implementation Notes
Checklist
ruffandpytest) were successful.