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

Avoid applying lisence on every init #994

Merged
merged 1 commit into from
Oct 23, 2023
Merged

Avoid applying lisence on every init #994

merged 1 commit into from
Oct 23, 2023

Conversation

annakhm
Copy link
Collaborator

@annakhm annakhm commented Oct 6, 2023

Previous code assumed GetChange SDK routine works for provider attributes, which it doesn't (provider attributes are not stored in state).
In order to avoid reapplying licenses on every init, this change pulls license keys from backend and only applies/removes the diff.

@ksamoray
Copy link
Collaborator

Do we support a case where a user adds a license via UI? I think that in this case, this license will be removed.

@annakhm
Copy link
Collaborator Author

annakhm commented Oct 11, 2023

Do we support a case where a user adds a license via UI? I think that in this case, this license will be removed.

Good point Kobi. I was contemplating doing nothing if license is not specified. This will cause an issue when removing licenses that were specified earlier..

Previous code assumed GetChange SDK routine works for provider
attributes, which it doesn't (provider attributes are not stored in
state).
In order to avoid reapplying licenses on every init, this change
pulls license keys from backend and only applies the diff.
The provider will never remove licenses, this is to avoid scenario
when provider removes license that was manually applied on NSX.

Signed-off-by: Anna Khmelnitsky <[email protected]>
Copy link
Collaborator

@ksamoray ksamoray left a comment

Choose a reason for hiding this comment

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

LGTM. Maybe the removal note should be more visible?

@annakhm
Copy link
Collaborator Author

annakhm commented Oct 19, 2023

/test-all

@annakhm annakhm merged commit 3f052cb into master Oct 23, 2023
2 checks passed
@annakhm annakhm deleted the license-diff-fix branch February 5, 2024 18:44
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.

2 participants