Skip to content

Eventstudio: Move fixtures to make them available in Pro #12962

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

maxhoheiser
Copy link
Member

Motivation

This PR moves several fixtures from eventbridge conftest to the globally defined fixtures to make them available in pro.

Changes

  • move create_role_event_bus_source_to_bus_target
  • move get_primary_secondary_client
  • allow for custom aws client for sqs_as_events_target required if sqs is in separate region / account
  • return queue_name for sqs_as_events_target

@maxhoheiser maxhoheiser self-assigned this Aug 6, 2025
@maxhoheiser maxhoheiser added aws:events Amazon EventBridge semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases labels Aug 6, 2025
Copy link

github-actions bot commented Aug 6, 2025

Test Results - Preflight, Unit

22 063 tests  ±0   20 329 ✅ ±0   6m 32s ⏱️ +15s
     1 suites ±0    1 734 💤 ±0 
     1 files   ±0        0 ❌ ±0 

Results for commit 9667e96. ± Comparison against base commit 29690c2.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Aug 6, 2025

Test Results (amd64) - Acceptance

7 tests  ±0   5 ✅ ±0   3m 12s ⏱️ -7s
1 suites ±0   2 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit 9667e96. ± Comparison against base commit 29690c2.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@bentsku bentsku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition, I just have a few nits and one fixture is not properly cleaning up, once this is addressed we can merge!

Comment on lines +2674 to +2682
if cross_scenario not in ["region", "account", "region_account"]:
raise ValueError(f"cross_scenario {cross_scenario} not supported")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: seems like we are validating twice the value of cross_scenario

Comment on lines +2663 to +2670
def get_primary_secondary_client(
aws_client_factory,
secondary_aws_client_factory,
region_name,
secondary_region_name,
account_id,
secondary_account_id,
):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as this now part of the global fixtures, it would be good to add a bit of documentation about what this does and the possible values

Comment on lines +2592 to +2595
if custom_aws_client:
sqs_client = custom_aws_client.sqs
else:
sqs_client = aws_client.sqs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's a problem with this fixture: it doesn't clean up properly when passing a custom client, because you'll try deleting the queue with the regular aws_client.sqs instead of the custom client you passed.

You'd need to store the client to the queue_urls list as well:
queue_urls.append((sqs_client, queue_url))

and then

for sqs_client, queue_url in queue_urls:
        try:
            sqs_client.delete_queue(QueueUrl=queue_url)
        except Exception as e:
            LOG.debug("error cleaning up queue %s: %s", queue_url, e)

Copy link

github-actions bot commented Aug 6, 2025

Test Results (amd64) - Integration, Bootstrap

    5 files      5 suites   2h 19m 53s ⏱️
4 966 tests 4 384 ✅ 582 💤 0 ❌
4 972 runs  4 384 ✅ 588 💤 0 ❌

Results for commit 9667e96.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Aug 6, 2025

LocalStack Community integration with Pro

    2 files  ±0      2 suites  ±0   1h 42m 26s ⏱️ +58s
4 607 tests ±0  4 177 ✅ ±0  430 💤 ±0  0 ❌ ±0 
4 609 runs  ±0  4 177 ✅ ±0  432 💤 ±0  0 ❌ ±0 

Results for commit 9667e96. ± Comparison against base commit 29690c2.

♻️ This comment has been updated with latest results.

@maxhoheiser maxhoheiser force-pushed the eventstudio/eventstudio-add-service-and-extend-repository branch from 03813fc to 34f9905 Compare August 6, 2025 11:32
@maxhoheiser maxhoheiser force-pushed the eventstudio/eventstudio-add-service-and-extend-repository branch from 34f9905 to b56cebd Compare August 6, 2025 11:56
@maxhoheiser maxhoheiser requested a review from bentsku August 6, 2025 13:57
@bentsku bentsku marked this pull request as ready for review August 6, 2025 14:09
Copy link
Contributor

@bentsku bentsku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for addressing the comments! 🚀

@maxhoheiser maxhoheiser merged commit ac8897e into main Aug 6, 2025
40 checks passed
@maxhoheiser maxhoheiser deleted the eventstudio/eventstudio-add-service-and-extend-repository branch August 6, 2025 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws:events Amazon EventBridge semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants