Skip to content

Conversation

mateigrigore
Copy link
Contributor

@mateigrigore mateigrigore commented Jul 26, 2024

Summary:

I have noticed a small mistake in the controllers/validation/validation.go file. It seems like the logic to check for collisions in the name of scram secretes was making use of the map for connection string secret names.

Initial behaviour

When a MongoDBCommunity resource was deployed with 2 users using the same scram secret name the resource would be stuck in the Pending phase

Behaviour after change

When a MongoDBCommunity resource was deployed with 2 users using the same scram secret name the resource would fail with the following error message scram credential secret names collision, update at least one of the users: %s

This PR adds:

  • scramSecretNameMap instead of connectionStringSecretNameMap for checking collisions as the later was already used for checking connection string secrets collisions
  • Changes made automatically by the pre-commit hook to the CRD
  • Removed GO111MODULE=off from the pre-commit hook
  • Update go dependencies
  • Change command in pre commit hook to go install instead of go get

All Submissions:

  • Have you signed our CLA?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

@nammn nammn added the safe-to-test Add this label to PRs from forks to trigger E2E tests label Jul 26, 2024
@mateigrigore mateigrigore changed the title Bug fix Fixing validation of collisions in scram secret's name Jul 26, 2024
@nammn nammn added safe-to-test Add this label to PRs from forks to trigger E2E tests and removed safe-to-test Add this label to PRs from forks to trigger E2E tests labels Jul 26, 2024
@nammn nammn merged commit 1f36c73 into mongodb:master Jul 29, 2024
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe-to-test Add this label to PRs from forks to trigger E2E tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants