Skip to content

Conversation

@lukebakken
Copy link
Collaborator

Fixes #7678

References:

PR #2396 preserved the old behavior where definitions import took priority over the default data and environment data that may be present. This behavior continues to confuse users where they expect RABBITMQ_DEFAULT_USER / RABBITMQ_DEFAULT_PASS to be imported, especially if there is no users data in the definitions file.

This PR allows default data and the environment to be imported first, then possibly overwritten by the definitions file.

Fixes #7678

References:
* #2384
* #2396

PR #2396 preserved the old behavior where definitions import took
priority over the default data and environment data that may be present.
This behavior continues to confuse users where they expect
`RABBITMQ_DEFAULT_USER` / `RABBITMQ_DEFAULT_PASS` to be imported,
especially if there is no `users` data in the definitions file.

This PR allows default data and the environment to be imported first,
then possibly overwritten by the definitions file.
@lukebakken lukebakken self-assigned this Mar 22, 2023
@dumbbell
Copy link
Collaborator

dumbbell commented Mar 22, 2023

Can this be broken down per type of default data?

  1. Import definitions
  2. If there are no virtual hosts (which means there are no imported queues/exchanges), create the default virtual host
  3. If there are no users, create the default user

Instead of treating the default user and the default virtual host as an atomic thing.

@lukebakken lukebakken closed this Mar 22, 2023
@lukebakken lukebakken deleted the rabbitmq-server-7678 branch March 22, 2023 14:52
@lukebakken
Copy link
Collaborator Author

@dumbbell that's not a bad idea. I didn't like the way I was approaching in this PR anyway!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RABBITMQ_DEFAULT_USER / RABBITMQ_DEFAULT_PASS behavior continues to confuse users

3 participants