-
Notifications
You must be signed in to change notification settings - Fork 221
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
Watch for the service account token to be ready #668
base: main
Are you sure you want to change the base?
Watch for the service account token to be ready #668
Conversation
0b37616
to
cbe20c0
Compare
Hi @nitishm. Sorry for the late response. Generally speaking we ask for unit tests to accompany any changes. That way we can ensure future changes won't introduce a code regression, and we have some context around why certain changes were made in the past. Would you mind writing some tests? Thanks! |
Looking at this closer... It might be too difficult to implement tests for the tests. I think we can make an exception here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great, just one minor change to remove old commented out code and the associated TODO
Looks like tests are failing due to |
Looks like you have a compilation error (and some warnings) in the new tests you added:
|
Go for it! I don't mind you force pushing |
Instead of using a sleep use an actual watcher to ensure that the token is ready before proceeding. Closes krustlet#403 Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>
Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>
Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>
Signed-off-by: Nitish Malhotra <nitish.malhotra@gmail.com>
64638b4
to
f0042bc
Compare
Signed-off-by: Taylor Thomas <taylor@oftaylor.com>
f0042bc
to
b656d58
Compare
|
||
while let Some(event) = watcher.try_next().await? { | ||
if let watcher::Event::Applied(o) = event { | ||
let secret = o.secrets.unwrap_or_default().first().unwrap().clone(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this is causing e2e test failures. Maybe this should retry for up to 10s before erroring
Instead of using a sleep use an actual watcher to ensure that the token
is ready before proceeding.
Closes #403
Signed-off-by: Nitish Malhotra nitish.malhotra@gmail.com