feat(sfs): add labels to sfs resources#1430
Conversation
942fc7e to
6b8c3f8
Compare
| } | ||
|
|
||
| modelLabels := model.Labels.Elements() | ||
| labels, err := conversion.ToOptStringMap(modelLabels) |
There was a problem hiding this comment.
When setting labels to an empty map or null for an update, the update results in an state drift because in the api the labels aren't removed. The reason is, that conversion.ToOptStringMap(modelLabels) returns a nil pointer and not an empty map in case the length == 0. This results in different payloads.
Please cover your fix also by an unit test in TestToUpdatePayload(), to ensure an correct behavior in the future
Merging this branch will increase overall coverage
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files
|
|
This PR was marked as stale after 7 days of inactivity and will be closed after another 7 days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it. |
Description
relates to STACKITTPR-525
Checklist
make fmtexamples/directory)make generate-docs(will be checked by CI)make test(will be checked by CI)make lint(will be checked by CI)