Add latest AWS regions and partitions with infrastructure fixes #867
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.
Add support for latest AWS regions and partitions with infrastructure fixes
This update ensures taskcat supports all publicly available AWS regions and partitions by updating region mappings and adding critical missing infrastructure that was causing runtime errors when using newer regions and partitions.
Changes Summary
Region/Partition Mappings Updated
regions_to_partitions.py:ap-southeast-6(Thailand) in aws partitionus-isob-west-1(US ISO-B West) in aws-iso-b partitionCritical Infrastructure Fixes
Fixed missing support infrastructure that was causing taskcat to fail when using certain commercial regions (mx-central-1, ap-east-2) and would prevent usage of newer isolated partitions (aws-iso-e, aws-iso-f, aws-eusc):
S3 Domain Mappings (
_common_utils.py):TaskCatException: cannot find the S3 hostname for regionerrors experienced with commercial regionsBucket Region Mappings (
_config.py):Partition Detection (
_client_factory.py):Local Zones (
local_zones.py):Build System Improvements
pyproject.toml Configuration:
packages = [{ include = "taskcat" }]to specify only taskcat package should be included[build-system]section for PEP 517/518 compliancesetup.cfg Deprecation Fix:
description-filetodescription_fileException Handling Fix:
InvalidActionErrorto pass arguments to parentExceptionclassPre-commit Configuration Fix:
pbras additional dependency for bandit hookpbrmodule error in CI environmentFiles Modified
taskcat/_client_factory.py- Partition detectiontaskcat/_common_utils.py- S3 domain mappingstaskcat/_config.py- Bucket region mappingstaskcat/regions_to_partitions.py- Region/partition mappingstaskcat/local_zones.py- Availability zone mappings (with Black formatting)taskcat/exceptions.py- Exception handling fix for flake8-bugbear compliancepyproject.toml- Build system and package configurationsetup.cfg- Deprecation warning fix.pre-commit-config.yaml- Updated bandit version to fix CItaskcat/_dataclasses.py- Minor formattingtaskcat/cfg/config_schema.json- Schema updatesTesting
Unit Tests
Integration Testing
Key Test Coverage
test_client_factory.py)test_common_utils.py)test_config.py)test_config.py)Requirements Addressed
✅ All regions from AWS botocore endpoints.json included
✅ Correct partition identification for all valid regions
✅ Isolated partitions (aws-iso-e, aws-iso-f, aws-eusc) fully supported
✅ Changes testable via fork installation
✅ No breaking changes to existing functionality
Backward Compatibility
Installation from Fork
Users can now install directly from git forks without setup.py:
This enables easier testing of contributions before merging.
Impact
Before this fix:
TaskCatException: cannot find the S3 hostname for region Xerrors when using certain commercial regions (mx-central-1, ap-east-2)After this fix: