-
Notifications
You must be signed in to change notification settings - Fork 154
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
[flakiness]: utilise socket helper funcs in unit-tests #7058
Merged
pkoutsovasilis
merged 1 commit into
elastic:main
from
pkoutsovasilis:fix/TestConnInfoConnCloseThenAnotherConn
Mar 4, 2025
Merged
[flakiness]: utilise socket helper funcs in unit-tests #7058
pkoutsovasilis
merged 1 commit into
elastic:main
from
pkoutsovasilis:fix/TestConnInfoConnCloseThenAnotherConn
Mar 4, 2025
+3
−2
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildkite test this |
b1bdfb1
to
2c0aa7a
Compare
💛 Build succeeded, but was flaky
Failed CI StepsHistory
|
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
swiatekm
approved these changes
Feb 28, 2025
mergify bot
pushed a commit
that referenced
this pull request
Mar 4, 2025
(cherry picked from commit d7225b2)
mergify bot
pushed a commit
that referenced
this pull request
Mar 4, 2025
(cherry picked from commit d7225b2)
mergify bot
pushed a commit
that referenced
this pull request
Mar 4, 2025
(cherry picked from commit d7225b2)
This was referenced Mar 4, 2025
8 tasks
mergify bot
pushed a commit
that referenced
this pull request
Mar 4, 2025
(cherry picked from commit d7225b2)
mergify bot
pushed a commit
that referenced
this pull request
Mar 4, 2025
(cherry picked from commit d7225b2)
This was referenced Mar 4, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport-active-all
Automated backport with mergify to all the active branches
flaky-test
Unstable or unreliable test cases.
skip-changelog
Team:Elastic-Agent-Control-Plane
Label for the Agent Control Plane team
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR fixes a failing test case,
TestConnInfoConnCloseThenAnotherConn
, which was caused by the generation of overly long Unix socket paths. On macOS, UNIX-domain addresses are limited to 104 characters, while Linux imposes a 108-character limit. The previous implementation ingetAddress
did not validate or handle excessive path lengths, causing the test to fail on macOS and occasionally on Linux.To resolve this, the PR updates
getAddress
to utilize the existingSocketURLWithFallback
helper function frompkg/utils/socket_unix.go
, which ensures that socket paths remain within system limits.Why is it important?
This change is essential to prevent flakiness in the test suite and ensure that the test runs reliably across different platforms. By leveraging the existing socket utility functions, we ensure that socket paths adhere to OS-imposed constraints, reducing test failures and improving CI stability.
Checklist
./changelog/fragments
using the changelog tool.Disruptive User Impact
This change only affects the test suite and does not impact users.
How to test this PR locally
Run the following test command locally and verify that it no longer fails due to socket path length issues:
Related issues
failed to start connection credentials listener: listen unix ...: bind: invalid argument
#6977