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(e2e): wait for leader election & measure timing for better monitoring #1676

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

camilamacedo86
Copy link
Contributor

TestClusterExtensionAfterOLMUpgrade was failing due to increased leader election timeouts, causing reconciliation checks to run before leadership was acquired.

This fix ensures the test explicitly waits for leader election logs ("successfully acquired lease") before verifying reconciliation.

Additionally, the test now measures and logs the leader election duration to help monitor election timing.

Example: https://github.com/operator-framework/operator-controller/actions/runs/13047935813/job/36401741998

Logs from operator-controller;

I0130 08:12:51.290826       1 main.go:427] "starting manager" logger="setup"
I0130 08:12:51.291050       1 server.go:208] "Starting metrics server" logger="controller-runtime.metrics"
I0130 08:12:51.291109       1 server.go:83] "starting server" name="health probe" addr="[::]:8081"
I0130 08:12:51.291121       1 server.go:247] "Serving metrics server" logger="controller-runtime.metrics" bindAddress=":8443" secure=true
I0130 08:12:51.291209       1 leaderelection.go:257] attempting to acquire leader lease olmv1-system/9c4404e7.operatorframework.io...


@camilamacedo86 camilamacedo86 requested a review from a team as a code owner January 31, 2025 03:42
Copy link

netlify bot commented Jan 31, 2025

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 4238c2b
🔍 Latest deploy log https://app.netlify.com/sites/olmv1/deploys/679c5a887a66960008f0397f
😎 Deploy Preview https://deploy-preview-1676--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@camilamacedo86 camilamacedo86 force-pushed the fix-test-leader-election branch 4 times, most recently from a96e69f to 6b04b01 Compare January 31, 2025 04:09
Copy link

codecov bot commented Jan 31, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 67.50%. Comparing base (c3a4406) to head (4238c2b).

Files with missing lines Patch % Lines
catalogd/cmd/catalogd/main.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1676   +/-   ##
=======================================
  Coverage   67.50%   67.50%           
=======================================
  Files          57       57           
  Lines        4632     4632           
=======================================
  Hits         3127     3127           
  Misses       1278     1278           
  Partials      227      227           
Flag Coverage Δ
e2e 53.40% <100.00%> (ø)
unit 54.29% <0.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.

@camilamacedo86
Copy link
Contributor Author

@camilamacedo86 camilamacedo86 force-pushed the fix-test-leader-election branch 2 times, most recently from 196b973 to 0ee61e2 Compare January 31, 2025 05:03
…ring

TestClusterExtensionAfterOLMUpgrade was failing due to increased leader
election timeouts, causing reconciliation checks to run before leadership
was acquired.

This fix ensures the test explicitly waits for leader election logs
(`"successfully acquired lease"`) before verifying reconciliation.

Additionally, the test now measures and logs the leader election duration
to help monitor election timing.
@camilamacedo86 camilamacedo86 force-pushed the fix-test-leader-election branch from 0ee61e2 to 4238c2b Compare January 31, 2025 05:07
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.

1 participant