Skip to content

Conversation

@licjun
Copy link
Contributor

@licjun licjun commented Nov 20, 2025

We saw several integ test failures when merging in the change for multi-tenancy.

Failure #1 Resource Conflict
In remote invoke integ test, we saw failure like this.
tests/integration/remote/invoke/test_remote_invoke.py::TestSingleLambdaInvoke::test_invoke_asynchronous_using_boto_parameter@sam_remote_invoke_single_lambda_resource - AssertionError: 0 != 1

This is due to we added a MultiTenantFunction in the existing template which has a HelloWorldFunction, and when doing remote invoke, we use command like this sam remote invoke --stack-name TestSingleLambdaInvoke-abc123, sam can't decide which function to invoke, so it failed. The solution is to create a separate template for multi-tenant test.

Failure #2 Line number mismatch
in test_integrations_cli.py, we saw error like this
Error: tests/integration/local/invoke/test_integrations_cli.py::TestInvokeFunctionWithError::test_function_exception - AssertionError: '\xa0\xa0File "/var/task/main.py", line 51, in raise_exception' not found in '2025-11-20 00:45:25 Attaching import module proxy for analyzing dynamic imports\nInvoking main.raise_exception (python3.11)\nLocal image is up-to-date\nUsing local image: public.ecr.aws/lambda/python:3.11-rapid-x86_64.\n\nMounting /home/runner/work/aws-sam-cli/aws-sam-cli/tests/integration/testdata/invoke as /var/task:ro,delegated, the reason is multi-tenancy change added code to the tests/integration/testdata/invoke/main.py file, which shifted the line numbers.

Failure #3
In test_start_api.py, we saw error like
tests/integration/local/start_api/test_start_api.py::TestStartApiWithStage::test_default_stage_name - AssertionError: None != 'Prod', this is due to we added a new MultiTenantFunction with its own Type: Api in the existing template which has global Api configuration, this conflict causes the failure, the fix is to create a separate template for multi-tenant tests.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@licjun licjun requested a review from a team as a code owner November 20, 2025 03:02
@roger-zhangg
Copy link
Member

@roger-zhangg roger-zhangg added this pull request to the merge queue Nov 20, 2025
@roger-zhangg roger-zhangg removed this pull request from the merge queue due to a manual request Nov 20, 2025
@roger-zhangg roger-zhangg added this pull request to the merge queue Nov 20, 2025
@roger-zhangg roger-zhangg removed this pull request from the merge queue due to the queue being cleared Nov 20, 2025
@roger-zhangg roger-zhangg merged commit e05d666 into develop Nov 20, 2025
61 of 71 checks passed
@licjun licjun deleted the integfaiurefix branch December 1, 2025 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants