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

v3: acl bug fix removing the "omitempty" tag from the acl DBAASOpensearchAclConfigAcl list #677

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

elkezza
Copy link

@elkezza elkezza commented Dec 29, 2024

Description

Removing the omitempty tag from the acl DBAASOpensearchAclConfigAcls list, because it will remove the acl: [] from the payload if the list is empty therefore it will trigger api error if someone tried to delete the last acl user from the list.

with the omitempty the payload with an empty list will look like this:

2024/12/29 14:10:43 Payload Sent to API: {
  "acl-enabled": false,
  "extended-acl-enabled": false
}

which will trigger an error
Bad Request: Invalid value in [3].acls - should be a Collection

Without the omitempty the payload with an empty list will look like this:

2024/12/29 14:10:43 Payload Sent to API: {
  "acl-enabled": false,
  "acls": [],
  "extended-acl-enabled": false
}

Which will not trigger any error.

Checklist

(For exoscale contributors)

  • Changelog updated (under Unreleased block)
  • For a new resource or new attributes: test added/updated

…s list, because it will remove the `acl: []` from the payload if the list is empty therefore it will trigger api error if someone tried to delete last acl user from the list.
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.

1 participant