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

Fix incorrect print commands in spreaper #1299

Merged
merged 2 commits into from
Jul 18, 2023
Merged

Conversation

adejanovski
Copy link
Contributor

Fixes #1282

The print commands in spreaper's take-snapshot method (and a few others) was not built correctly and had misplaced closing parenthesis.

@adejanovski adejanovski marked this pull request as ready for review May 30, 2023 13:02
Copy link
Contributor

@Miles-Garnsey Miles-Garnsey left a comment

Choose a reason for hiding this comment

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

Some requested changes...

reply = reaper.post("snapshot/cluster/{0}".format(args.cluster_name),
keyspace=args.keyspace,
owner=args.owner, cause=args.cause,
snapshot_name=args.name)
else:
if args.node:
print ("# Taking a snapshot on cluster '{0}' and node '{1}', "
).format(args.cluster_name, args.node)
.format(args.cluster_name, args.node))
reply = reaper.post("snapshot/{0}/{1}".format(args.cluster_name, args.node),
keyspace=args.keyspace,
owner=args.owner, cause=args.cause,
snapshot_name=args.name)
else:
print ("# Taking a snapshot on cluster '{0}', "
Copy link
Contributor

Choose a reason for hiding this comment

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

Extra comma here.

Copy link
Contributor

Choose a reason for hiding this comment

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

This prints

# Taking a snapshot on cluster 'cname', 

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

@@ -638,11 +638,11 @@ class ReaperCLI(object):

if args.node:
print ("# Deleting snapshot '{1}' on cluster '{0}' and node '{2}'"
Copy link
Contributor

Choose a reason for hiding this comment

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

Please check the ordering of arguments for this one. I think you've reversed cluster name and snapshot name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

right 👍

"targeting tables: {2}").format(args.cluster_name, args.keyspace_name,
",".join(args.tables.split(',')))
"targeting tables: {2}".format(args.cluster_name, args.keyspace_name,
",".join(args.tables.split(','))))
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you split and then rejoin? Seems redundant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The hell if I know 😅 so weird...

Copy link
Contributor

@Miles-Garnsey Miles-Garnsey left a comment

Choose a reason for hiding this comment

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

Looks better now!

@adejanovski adejanovski merged commit 92f624e into master Jul 18, 2023
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.

Unable to create snapshot with spreaper
2 participants