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

secrets/ldap: return error on read #2156

Merged
merged 3 commits into from
Feb 26, 2024

Conversation

fairclothjm
Copy link
Contributor

@fairclothjm fairclothjm commented Feb 26, 2024

Description

We are swallowing errors which results in incorrect and confusing behavior when Vault returns an error on Read.

Relates #2155

Checklist

  • Added CHANGELOG entry (only for user-facing changes)
  • Acceptance tests where run against all supported Vault Versions

@fairclothjm fairclothjm added this to the 3.26.0 milestone Feb 26, 2024
@fairclothjm fairclothjm requested a review from a team February 26, 2024 16:16
@@ -305,7 +305,7 @@ func TestReadEntity(t *testing.T) {
expectedRetries: 5,
wantError: fmt.Errorf(`failed reading %q`,
entity.JoinEntityID("retry-exhausted-custom-max-412")),
retryWait: time.Millisecond,
retryWait: 500 * time.Millisecond,
Copy link
Contributor Author

@fairclothjm fairclothjm Feb 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is flaky so I am bumping this up to see if it will fix it. Not related to this PR at all but I couldn't help myself.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, things look a lot more robust under stress testing 👍🏼

Copy link
Contributor

@raymonstah raymonstah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thoughts on having a lint workflow that catches missed error handling? https://golangci-lint.run/usage/linters/#errcheck

@@ -305,7 +305,7 @@ func TestReadEntity(t *testing.T) {
expectedRetries: 5,
wantError: fmt.Errorf(`failed reading %q`,
entity.JoinEntityID("retry-exhausted-custom-max-412")),
retryWait: time.Millisecond,
retryWait: 500 * time.Millisecond,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, things look a lot more robust under stress testing 👍🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants