Draft
Conversation
d468780 to
445b9a0
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the CLI bats test connect helpers to reduce flakiness when validating boundary connect by avoiding sending unexpected data to SSH targets.
Changes:
- Stop piping
"foo"intoboundary connect/ncduring connect tests. - Switch
ncinvocation to a port-open check using-zand a connect timeout via-w 3.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1b18ed6 to
80afc1d
Compare
8a625d8 to
2d79c72
Compare
2d79c72 to
4ecd438
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR attempts to address a flaky bats test after several PRs that added additional debug
The interesting bit is
It seems like, on occasion, the existing
connectcommand would send some string to the server that it doesn't expect. The current theory is that it's some race condition between thenccommand connecting to the target sending "foo" to stdin and the target server sending the SSH banner and waiting for input. It seems like, most of the time,nclikely sends "foo" before the SSH banner is sent. This only occurs in Github runners as the default target we're connecting to has an address of 127.0.01:22, and runners likely have an ssh service listening on that port.This PR modifies the connect command in a few ways
-w 5to allow enough time for the boundary proxy to establish.https://hashicorp.atlassian.net/browse/ICU-18860
Testing
PCI review checklist
Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.