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

Allow Updates to template Attribute in opennebula_service_template Resource Without Forcing New Resource #551

Merged
merged 2 commits into from
Oct 17, 2024

Conversation

shurkys
Copy link
Contributor

@shurkys shurkys commented May 23, 2024

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for PR followers and do not help prioritize the request

Description

This pull request modifies the opennebula_service_template resource to allow updates to the template attribute without forcing the resource to be recreated. The following changes were made:

  • Set ForceNew to false for the template attribute.
  • Added logic to handle updates to the template attribute in the resourceOpennebulaServiceTemplateUpdate function.

These changes enable updating the template attribute and applying changes without recreating the entire resource.

New or Affected Resource(s)

  • opennebula_service_template

Checklist

  • I have created an issue and I have mentioned it in References
  • My code follows the style guidelines of this project (use go fmt)
  • My changes generate no new warnings or errors
  • I have updated the unit tests and they pass successfully
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation (if needed)
  • I have updated the changelog file

Copy link

This pull request is stale because it has been open for 30 days with no activity and it is not in a milestone. Remove 'status: stale' label or comment, or this will be closed in 5 days.

@treywelsh
Copy link
Collaborator

treywelsh commented Aug 29, 2024

Could you @vickmp or @sk4zuzu take this one and review it please ?
I didn't really worked on service and service template resources so it would take me more time to onboard on this part and currently I don't have so much time to spend here :s

If nobody can I'll do it but I'll need to read the doc, make some tests etc.
Could you provide some acceptance tests to be run by the CI @shurkys please ?

Copy link

This pull request is stale because it has been open for 30 days with no activity and it is not in a milestone. Remove 'status: stale' label or comment, or this will be closed in 5 days.

@sk4zuzu sk4zuzu self-assigned this Oct 16, 2024
@sk4zuzu
Copy link
Collaborator

sk4zuzu commented Oct 16, 2024

Could you @vickmp or @sk4zuzu take this one and review it please ?

Hi @treywelsh,

so the change from this PR looks good, you could argue it's critical for service support to merge this really. Otherwise altering a service template causes complete recreation of services created from that template, which is unacceptable.. 🥹

Could you provide some acceptance tests to be run by the CI @shurkys please ?

What kind of test would you like to see? Create + update + confirmation template is updated in OpenNebula? I think the test should also double check nothing gets destroyed unnecessarily. 🤔

@sk4zuzu sk4zuzu merged commit 5d906d1 into OpenNebula:master Oct 17, 2024
7 checks passed
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.

4 participants