Skip to content

Conversation

afarntrog
Copy link
Contributor

Description of changes:

This pull request updates the initialization logic for the AgentCoreMemorySessionManager to support setting the AWS region from the AWS_REGION environment variable, and adds a corresponding unit test to ensure this behavior works as expected.

Configuration improvements:

  • Updated the __init__ method in session_manager.py to set region_name from the AWS_REGION environment variable if it is present, improving flexibility for deployment environments.

Testing enhancements:

  • Added a new test test_init_with_aws_region_env_var in test_agentcore_memory_session_manager.py to verify that the session manager correctly uses the AWS_REGION environment variable during initialization.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@afarntrog
Copy link
Contributor Author

╰─± uv run pre-commit run --all-files                        
uv-lock..................................................................Passed
ruff (legacy alias)......................................................Passed
ruff format..............................................................Passed
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check toml...............................................................Passed
check json...........................................(no files to check)Skipped
check for merge conflicts................................................Passed
check for added large files..............................................Passed
debug statements (python)................................................Passed
bandit...................................................................Passed
pytest with coverage.....................................................Passed

@codecov-commenter
Copy link

codecov-commenter commented Sep 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@114a670). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #77   +/-   ##
=======================================
  Coverage        ?   88.70%           
=======================================
  Files           ?       20           
  Lines           ?     1859           
  Branches        ?      278           
=======================================
  Hits            ?     1649           
  Misses          ?      104           
  Partials        ?      106           
Flag Coverage Δ
unittests 88.70% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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