Add full list of active member states for all compacts#852
Conversation
WalkthroughThis change updates configuration files to expand and update the lists of active compact member jurisdictions and their associated resource server scopes. The modifications affect the jurisdiction membership arrays and access control scopes, reflecting a broad extension of compact coverage and permissions across multiple states and compacts. Additionally, sandbox environment handling for active jurisdictions was introduced in backend logic. Changes
Sequence Diagram(s)sequenceDiagram
participant Env as Environment (Sandbox or Prod)
participant PersistentStack as PersistentStack
participant Context as CDK Context
Env->>PersistentStack: Request active jurisdictions for compact
PersistentStack->>Context: Check if sandbox environment
alt Sandbox
PersistentStack->>Context: Retrieve sandbox_active_compact_member_jurisdictions
else Non-sandbox
PersistentStack->>Context: Retrieve active_compact_member_jurisdictions
end
Context-->>PersistentStack: Return jurisdictions list
PersistentStack-->>Env: Provide jurisdictions list
sequenceDiagram
participant ConfigFile as Configuration File
participant CDK as CDK Deployment
participant Cognito as AWS Cognito
participant ResourceServer as Resource Server
ConfigFile->>CDK: Provide updated active_compact_member_jurisdictions
CDK->>Cognito: Deploy resource servers for each jurisdiction in updated lists
Cognito->>ResourceServer: Create/Update resource servers and scopes
ResourceServer-->>Cognito: Confirm setup for each jurisdiction
Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes found. Poem
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
backend/compact-connect/stacks/persistent_stack/__init__.py (1)
534-542: Conditional logic is correct but consider consistency in context retrieval.The sandbox detection and conditional configuration retrieval logic is implemented correctly. However, there's an inconsistency in context retrieval methods:
try_get_contextis used for sandbox-specific jurisdictions whileget_contextis used for regular jurisdictions.Consider using consistent context retrieval methods for clarity:
if is_sandbox: # Try to get sandbox-specific configuration - active_member_jurisdictions = self.node.try_get_context('sandbox_active_compact_member_jurisdictions') + active_member_jurisdictions = self.node.get_context('sandbox_active_compact_member_jurisdictions') else: # Use regular configuration for non-sandbox environments active_member_jurisdictions = self.node.get_context('active_compact_member_jurisdictions')Or document why
try_get_contextis intentionally used for sandbox configurations if this is the desired behavior.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
backend/compact-connect/cdk.context.sandbox-example.json(1 hunks)backend/compact-connect/stacks/persistent_stack/__init__.py(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- backend/compact-connect/cdk.context.sandbox-example.json
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: TestPython
🔇 Additional comments (1)
backend/compact-connect/stacks/persistent_stack/__init__.py (1)
527-533: Documentation clearly explains the sandbox rationale.The added documentation effectively explains why sandbox environments need separate jurisdiction configuration due to Cognito's 25 resource server limit.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
backend/compact-connect/requirements-dev.txt (1)
68-71: Align comment indentation for pygments dependency.
The expanded# vialines forpytestandrichuse inconsistent indentation. Normalizing these to match the surrounding style will improve readability.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (19)
backend/compact-connect/cdk.context.sandbox-example.json(1 hunks)backend/compact-connect/lambdas/python/common/requirements-dev.txt(4 hunks)backend/compact-connect/lambdas/python/common/requirements.txt(2 hunks)backend/compact-connect/lambdas/python/compact-configuration/requirements-dev.txt(4 hunks)backend/compact-connect/lambdas/python/custom-resources/requirements-dev.txt(4 hunks)backend/compact-connect/lambdas/python/data-events/requirements-dev.txt(4 hunks)backend/compact-connect/lambdas/python/provider-data-v1/requirements-dev.txt(4 hunks)backend/compact-connect/lambdas/python/provider-data-v1/requirements.txt(1 hunks)backend/compact-connect/lambdas/python/purchases/requirements-dev.txt(4 hunks)backend/compact-connect/lambdas/python/purchases/requirements.txt(1 hunks)backend/compact-connect/lambdas/python/staff-user-pre-token/requirements-dev.txt(4 hunks)backend/compact-connect/lambdas/python/staff-users/requirements-dev.txt(4 hunks)backend/compact-connect/requirements-dev.txt(3 hunks)backend/compact-connect/requirements.txt(2 hunks)backend/compact-connect/stacks/persistent_stack/__init__.py(1 hunks)backend/multi-account/control-tower/requirements-dev.txt(1 hunks)backend/multi-account/control-tower/requirements.txt(2 hunks)backend/multi-account/log-aggregation/requirements-dev.txt(1 hunks)backend/multi-account/log-aggregation/requirements.txt(2 hunks)
✅ Files skipped from review due to trivial changes (6)
- backend/compact-connect/lambdas/python/provider-data-v1/requirements.txt
- backend/compact-connect/lambdas/python/purchases/requirements.txt
- backend/multi-account/control-tower/requirements.txt
- backend/multi-account/log-aggregation/requirements.txt
- backend/compact-connect/requirements.txt
- backend/compact-connect/lambdas/python/common/requirements.txt
🚧 Files skipped from review as they are similar to previous changes (2)
- backend/compact-connect/cdk.context.sandbox-example.json
- backend/compact-connect/stacks/persistent_stack/init.py
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: landonshumway-ia
PR: csg-org/CompactConnect#852
File: backend/compact-connect/stacks/persistent_stack/__init__.py:545-549
Timestamp: 2025-06-09T22:03:03.204Z
Learning: In the CompactConnect codebase, production active_compact_member_jurisdictions configurations are very stable and unlikely to be removed. The vast majority of configuration errors in get_list_of_active_jurisdictions_for_compact_environment() will occur when developers are deploying sandbox environments, so error messages that primarily reference sandbox configuration are appropriate for the typical use case.
🪛 LanguageTool
backend/compact-connect/lambdas/python/common/requirements-dev.txt
[duplication] ~57-~57: Possible typo: you repeated a word.
Context: ...via # docker # moto # responses responses==0.25.7 # via moto s3transfer==0.13...
(ENGLISH_WORD_REPEAT_RULE)
backend/compact-connect/lambdas/python/compact-configuration/requirements-dev.txt
[duplication] ~54-~54: Possible typo: you repeated a word.
Context: ...via # docker # moto # responses responses==0.25.7 # via moto s3transfer==0.13...
(ENGLISH_WORD_REPEAT_RULE)
backend/compact-connect/lambdas/python/custom-resources/requirements-dev.txt
[duplication] ~54-~54: Possible typo: you repeated a word.
Context: ...via # docker # moto # responses responses==0.25.7 # via moto s3transfer==0.13...
(ENGLISH_WORD_REPEAT_RULE)
backend/compact-connect/lambdas/python/data-events/requirements-dev.txt
[duplication] ~54-~54: Possible typo: you repeated a word.
Context: ...via # docker # moto # responses responses==0.25.7 # via moto s3transfer==0.13...
(ENGLISH_WORD_REPEAT_RULE)
backend/compact-connect/lambdas/python/provider-data-v1/requirements-dev.txt
[duplication] ~57-~57: Possible typo: you repeated a word.
Context: ...via # docker # moto # responses responses==0.25.7 # via moto s3transfer==0.13...
(ENGLISH_WORD_REPEAT_RULE)
backend/compact-connect/lambdas/python/purchases/requirements-dev.txt
[duplication] ~54-~54: Possible typo: you repeated a word.
Context: ...via # docker # moto # responses responses==0.25.7 # via moto s3transfer==0.13...
(ENGLISH_WORD_REPEAT_RULE)
backend/compact-connect/lambdas/python/staff-user-pre-token/requirements-dev.txt
[duplication] ~54-~54: Possible typo: you repeated a word.
Context: ...via # docker # moto # responses responses==0.25.7 # via moto s3transfer==0.13...
(ENGLISH_WORD_REPEAT_RULE)
backend/compact-connect/lambdas/python/staff-users/requirements-dev.txt
[duplication] ~61-~61: Possible typo: you repeated a word.
Context: ...via # docker # moto # responses responses==0.25.7 # via moto s3transfer==0.13...
(ENGLISH_WORD_REPEAT_RULE)
backend/compact-connect/requirements-dev.txt
[duplication] ~80-~80: Possible typo: you repeated a word.
Context: ...act-connect/requirements-dev.in # pytest-cov pytest-cov==6.1.1 # via -r compact-connect/req...
(ENGLISH_WORD_REPEAT_RULE)
backend/multi-account/control-tower/requirements-dev.txt
[duplication] ~14-~14: Possible typo: you repeated a word.
Context: ...# via pytest pygments==2.19.1 # via pytest pytest==8.4.0 # via -r multi-account/contr...
(ENGLISH_WORD_REPEAT_RULE)
backend/multi-account/log-aggregation/requirements-dev.txt
[duplication] ~14-~14: Possible typo: you repeated a word.
Context: ...# via pytest pygments==2.19.1 # via pytest pytest==8.4.0 # via -r multi-account/log-a...
(ENGLISH_WORD_REPEAT_RULE)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: TestPython
🔇 Additional comments (30)
backend/multi-account/control-tower/requirements-dev.txt (1)
11-15: Approve dependency upgrades.The updates to
pluggy,pygments, andpytestare consistent with other multi-account modules and match the pip-compile output.🧰 Tools
🪛 LanguageTool
[duplication] ~14-~14: Possible typo: you repeated a word.
Context: ...# via pytest pygments==2.19.1 # via pytest pytest==8.4.0 # via -r multi-account/contr...(ENGLISH_WORD_REPEAT_RULE)
backend/multi-account/log-aggregation/requirements-dev.txt (1)
11-15: Approve dependency upgrades.The updates to
pluggy,pygments, andpytestalign with other log-aggregation modules and follow pip-compile changes.🧰 Tools
🪛 LanguageTool
[duplication] ~14-~14: Possible typo: you repeated a word.
Context: ...# via pytest pygments==2.19.1 # via pytest pytest==8.4.0 # via -r multi-account/log-a...(ENGLISH_WORD_REPEAT_RULE)
backend/compact-connect/lambdas/python/data-events/requirements-dev.txt (5)
7-9: Approve AWS SDK version bumps.The bump for
boto3andbotocoreensures consistent AWS SDK versions across lambda environments.
20-20: Approve cryptography version update.The
cryptographypatch version bump matches other lambdas and addresses minor fixes.
36-36: Approve moto version bump.Updating
moto[dynamodb,s3]to 5.1.5 keeps test dependencies in sync across modules.
50-50: Approve requests version bump.The
requestsupgrade to 2.32.4 is consistent across compact-connect lambdas.
57-57: Approve s3transfer version bump.Aligns
s3transferwith the updatedboto3requirements.backend/compact-connect/lambdas/python/compact-configuration/requirements-dev.txt (5)
7-9: Approve AWS SDK version bumps.The updates to
boto3andbotocorematch other lambda modules, maintaining consistency.
20-20: Approve cryptography version update.Aligns
cryptographywith updated test stack versions across modules.
36-36: Approve moto version bump.The
motobump ensures parity in mock AWS services across lambda tests.
50-50: Approve requests version bump.Consistent upgrade of
requestskeeps HTTP utilities up-to-date.
57-57: Approve s3transfer version bump.Matches the
boto3changes and maintains upload/download compatibility.backend/compact-connect/lambdas/python/common/requirements-dev.txt (6)
7-9: Approve AWS SDK version bumps.
boto3andbotocoreupdates maintain version harmony across compact-connect lambdas.
20-20: Approve cryptography version bump.The
cryptographyupdate addresses patch-level fixes and aligns with other modules.
24-24: Approve faker addition.Adding
fakersupports test data generation and matches the pip-compile source.
38-38: Approve moto version bump.The
motobump to 5.1.5 keeps mock libraries consistent across tests.
53-53: Approve requests version bump.Upgrading
requeststo 2.32.4 ensures consistency in HTTP libraries.
60-60: Approve s3transfer version bump.Aligns the S3 transfer utility with the updated AWS SDK versions.
backend/compact-connect/lambdas/python/custom-resources/requirements-dev.txt (1)
7-57: Consistent dependency version bump
All development dependencies (boto3,botocore,cryptography,moto[dynamodb,s3],requests, ands3transfer) have been uniformly upgraded to newer patch/minor releases in line with the coordinated, project-wide update. These are non-functional version bumps with no backward-compatibility or syntax impact.🧰 Tools
🪛 LanguageTool
[duplication] ~54-~54: Possible typo: you repeated a word.
Context: ...via # docker # moto # responses responses==0.25.7 # via moto s3transfer==0.13...(ENGLISH_WORD_REPEAT_RULE)
backend/compact-connect/lambdas/python/staff-user-pre-token/requirements-dev.txt (1)
7-57: Consistent dependency version bump
All development dependencies (boto3,botocore,cryptography,moto[dynamodb,s3],requests, ands3transfer) have been upgraded to match the unified version scheme applied across lambdas. No functional changes or compatibility risks introduced.🧰 Tools
🪛 LanguageTool
[duplication] ~54-~54: Possible typo: you repeated a word.
Context: ...via # docker # moto # responses responses==0.25.7 # via moto s3transfer==0.13...(ENGLISH_WORD_REPEAT_RULE)
backend/compact-connect/lambdas/python/purchases/requirements-dev.txt (1)
7-57: Consistent dependency version bump
Development dependencies (boto3,botocore,cryptography,moto[dynamodb,s3],requests, ands3transfer) have been bumped to the latest patch/minor versions in accordance with the cross-lambda standardization. No issues detected.🧰 Tools
🪛 LanguageTool
[duplication] ~54-~54: Possible typo: you repeated a word.
Context: ...via # docker # moto # responses responses==0.25.7 # via moto s3transfer==0.13...(ENGLISH_WORD_REPEAT_RULE)
backend/compact-connect/lambdas/python/provider-data-v1/requirements-dev.txt (1)
7-60: Consistent dependency version bump
All core and test dependencies (boto3,botocore,cryptography,moto[dynamodb,s3],requests, ands3transfer) have been aligned to the same patched versions used across other lambdas. This purely updates patch/minor releases—no API or compatibility changes.🧰 Tools
🪛 LanguageTool
[duplication] ~57-~57: Possible typo: you repeated a word.
Context: ...via # docker # moto # responses responses==0.25.7 # via moto s3transfer==0.13...(ENGLISH_WORD_REPEAT_RULE)
backend/compact-connect/lambdas/python/staff-users/requirements-dev.txt (1)
7-64: Consistent dependency version bump
Development dependencies—includingboto3,botocore,cryptography,joserfc,moto[cognitoidp,dynamodb,s3],requests, ands3transfer—have been updated to new patch/minor versions to mirror the coordinated project-wide upgrade. No functional or compatibility concerns.🧰 Tools
🪛 LanguageTool
[duplication] ~61-~61: Possible typo: you repeated a word.
Context: ...via # docker # moto # responses responses==0.25.7 # via moto s3transfer==0.13...(ENGLISH_WORD_REPEAT_RULE)
backend/compact-connect/requirements-dev.txt (7)
19-19: Approve click version bump.
Patch upgrade toclick==8.2.1is minor and safe.
21-21: Approve coverage version bump.
Updating tocoverage[toml]==7.8.2is a backwards-compatible patch.
45-45: Approve packageurl-python version bump.
Moving topackageurl-python==0.17.1aligns with upstream releases.
63-63: Approve pluggy version bump.
Updating topluggy==1.6.0is a minor release for plugin hooks; no concerns.
78-78: Approve pytest version bump.
Bumping topytest==8.4.0is a patch release; backward-compatible.
85-85: Verify the new requests version for compatibility and security.
Please confirm thatrequests==2.32.4does not introduce breaking changes in cachecontrol or pip-audit, and has no known vulnerabilities. Consider runningpip-auditagainst your test environment.
91-91: Approve ruff version bump.
Updating toruff==0.11.13is a minor linter update; safe to merge.
|
@jlkravitz This is ready for your review. We want to get this in relatively soon so the Counseling compact can add staff users from these listed states. Thanks |
jlkravitz
left a comment
There was a problem hiding this comment.
Looks good! @isabeleliassen good to merge
Now that the Cognito service team has increased our quota for the number of resource servers within a user pool, we can set the resource servers for all the active member states for each compact.
Closes #808
Summary by CodeRabbit