Skip to content
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

fix(pam/integration-tests/gdm): Handle broker selection when on such stage #603

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

3v1n0
Copy link
Collaborator

@3v1n0 3v1n0 commented Oct 23, 2024

We have some races in gdm tests caused by the fact we may send the
brokerSelected event too late, in particular when we received the
broker list, but at that point we may be have done other steps already.

Instead, handle the broker selection only when we're in broker selection
stage, and not too early or too late.

@3v1n0 3v1n0 requested a review from a team as a code owner October 23, 2024 13:58
@3v1n0 3v1n0 force-pushed the gdm-tests-broker-selection-race branch 3 times, most recently from 2f51fec to edd7cdd Compare October 24, 2024 10:25
@codecov-commenter
Copy link

codecov-commenter commented Oct 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.04%. Comparing base (36f3d0a) to head (48db852).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #603      +/-   ##
==========================================
+ Coverage   82.99%   83.04%   +0.05%     
==========================================
  Files          80       80              
  Lines        8584     8589       +5     
  Branches       75       75              
==========================================
+ Hits         7124     7133       +9     
+ Misses       1129     1126       -3     
+ Partials      331      330       -1     

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

Copy link
Member

@denisonbarbosa denisonbarbosa left a comment

Choose a reason for hiding this comment

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

One "small" request, but the changes look good!

internal/brokers/broker.go Outdated Show resolved Hide resolved
Copy link
Member

@denisonbarbosa denisonbarbosa left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thanks for figuring out a way to not expose the ID generation.

We have some races in gdm tests caused by the fact we may send the
brokerSelection event too late, in particular when we received the
broker list, but at that point we may be have done other steps already.

Instead, handle the broker selection only when we're in broker selection
stage, and not too early or too late.
@3v1n0 3v1n0 force-pushed the gdm-tests-broker-selection-race branch from 205df3c to 48db852 Compare November 12, 2024 21:04
@3v1n0 3v1n0 merged commit d527cf1 into ubuntu:main Nov 12, 2024
8 checks passed
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.

3 participants