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 the test custom-domain flakyness #2544

Merged

Conversation

juanluisvaladas
Copy link
Contributor

@juanluisvaladas juanluisvaladas commented Dec 21, 2022

Description

The test custom-domain has become flaky. I'm not quite sure when did this happen, but it was recently. We can see in many executions such as:

https://github.com/k0sproject/k0s/actions/runs/3742332086/jobs/6359020341
https://github.com/k0sproject/k0s/actions/runs/3740780796/jobs/6349616080
https://github.com/k0sproject/k0s/actions/runs/3731323166/attempts/2

We can solve this simply by waiting for konnectivity to be ready before actually starting the test.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

  • Manual test
  • Auto test added

Checklist:

  • My code follows the style guidelines of this project
  • My commit messages are signed-off
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@mikhail-sakhnov
Copy link
Contributor

By the way, there is a way to check if agent is ready (like actually ready), but it is a little bit awkard. The konnectivity-server (the process on the controller node) has /ready endpoint which gives a list of registred agents, IIRC.

The test custom-domain has become flaky. I'm not quite sure when did
this happen, but it was recently. We can see in many executions such as:
https://github.com/k0sproject/k0s/actions/runs/3742332086/jobs/6359020341
https://github.com/k0sproject/k0s/actions/runs/3740780796/jobs/6349616080
https://github.com/k0sproject/k0s/actions/runs/3731323166/attempts/2

We can solve this simply by waiting for pod logs as this guarantees that
konnectivity is actually working. It's worth noting that if there were
more controllers waiting for pod logs wouldn't be 100% reliable.

Signed-off-by: Juan Luis de Sousa-Valadas Castaño <[email protected]>
@juanluisvaladas
Copy link
Contributor Author

juanluisvaladas commented Dec 21, 2022

By the way, there is a way to check if agent is ready (like actually ready), but it is a little bit awkard. The konnectivity-server (the process on the controller node) has /ready endpoint which gives a list of registred agents, IIRC.

I don't think we need to think about this that much because in this test it's guaranteed to be only one controller and therefore if we get pod logs, Konnectivity is working for the only controller.

@juanluisvaladas juanluisvaladas merged commit e79910d into k0sproject:main Dec 23, 2022
@juanluisvaladas juanluisvaladas deleted the fix-customdomain-flaky branch December 23, 2022 00:02
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