You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cd /home/abuild/rpmbuild/BUILD
cd cli-2.72.0
GOFLAGS='-buildmode=pie -trimpath -mod=vendor -modcacherw'
make test
Expected vs actual behavior
The previous version (v2.70.0 in our case) passed the tests just fine.
I'm aware that this is new functionality and that the error might be specific to Open Build Service which we use for packaging.
Documenting the cause of the problem and follow ups
Testing routine race condition
Credit to @BagToad, @babakks, and @williammartin for putting heads together here as the problem is a race condition where the test is sending the password and auth token back faster than huh accessible prompter can disable echo mode:
To elaborate, the asynchronous function is already waiting for Enter password: prompt when it is received and sends the dummy password before the prompter can disable echo mode. This results in password being in plaintext.
We are working on a PR to avoid the flaky tests by introducing a wait
Ideas for improving virtual terminal testing setup
Separately, we also realized that both our newTestVirtualTerminal testing harness and [netflix/go-expect] are creating PTYs for testing purposes, which we should follow up in another issue to address:
Activity
BagToad commentedon May 2, 2025
👋 Hey @pdostal, thanks for writing this up! ✨ Also, apologies for this friction.
We did see this flakey test once in our CI too and it has been on our mind to investigate - we'll take a look!
Could you let me know if this is blocking your build & distribution?
andyfeller commentedon May 2, 2025
Documenting the cause of the problem and follow ups
Testing routine race condition
Credit to @BagToad, @babakks, and @williammartin for putting heads together here as the problem is a race condition where the test is sending the password and auth token back faster than
huhaccessible prompter can disable echo mode:cli/internal/prompter/accessible_prompter_test.go
Lines 140 to 163 in 7b86830
To elaborate, the asynchronous function is already waiting for
Enter password:prompt when it is received and sends the dummy password before the prompter can disable echo mode. This results in password being in plaintext.Source:
field_input.goincharmbracelet/huhWe are working on a PR to avoid the flaky tests by introducing a
waitIdeas for improving virtual terminal testing setup
Separately, we also realized that both our
newTestVirtualTerminaltesting harness and [netflix/go-expect] are creating PTYs for testing purposes, which we should follow up in another issue to address:Source:
console.goinnetflix/go-expect:cli/internal/prompter/accessible_prompter_test.go
Lines 433 to 457 in 7b86830