-
Notifications
You must be signed in to change notification settings - Fork 110
improvement(xcloud): add update_cluster_name method #13191
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
base: master
Are you sure you want to change the base?
Conversation
71433bd to
50c6788
Compare
| self.log.info("Resizing cluster to add %s nodes", count) | ||
| raise NotImplementedError("Not yet implemented in POC") | ||
|
|
||
| def update_cluster_name(self, new_name: str) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would assume we now can implement those two ?
# For cloud clusters, the keep duration is calculated and set during cluster creation.
# _set_keep_alive and _set_keep_duration methods in base classes are invoked after cluster
# creation, during nodes init, when it is already late to modify cluster details.
# The basic implementations of these methods remain here for backward compatibility.
def _set_keep_alive(self) -> bool:
return True
def _set_keep_duration(self, duration_in_hours: int) -> None:
pass
since we are using are using poorsman tagging within the name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should touch these.
first - these methods are on the node level in base classes, and for xcloud cluster we do not / cannot manage names of individual nodes, only of the whole cluster.
If we implement these helpers somehow for cluster level, it would not bring much value - it would rather add additional API requests, as cluster name is set during initial cloud cluster create API request anyway. With these 2 implemented for xcloud we would be doing extra API requests to achieve the same result we have now.
but the main concern - it's better to set keep-Nh tag earlier in the test, so that if something bad happens between cluster creation (that would interrupt the test completely) and the moment we run init on SCT objects (like these 2 methods are used now in the base classes), we already have cluster prepared/named for automated cleanup
Added update_cluster_name method to ScyllaCloudCluster class that allows modifying the cluster name after deployment. This is useful for adding or removing keep and owner tags information. Closes: scylladb/qa-tasks#2007
50c6788 to
c6304a1
Compare
Description
Adds ability to modify cluster name after deployment for managing keep/owner tags.
Changes
ScyllaCloudCluster.update_cluster_name(new_name: str)cluster.nameattributeUsage
Uses updateClusterName API endpoint.
Testing
test_cluster_cloud.py::TestScyllaCloudClusterUpdateName)PR pre-checks (self review)
backportlabelsReminders
sdcm/sct_config.py)unit-test/folder)Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.