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

Add CreateSnapshot handler for VolumeSnapshot support #38

Merged
merged 6 commits into from
Dec 11, 2024

Conversation

hlts2
Copy link
Member

@hlts2 hlts2 commented Dec 9, 2024

WHAT

@Praveen005 have implemented CreateSnapshot handler.

This PR is mirror of #31

CreateSnapshot handler was previously developed as a forked repository, but the CI wasn't working due to a credential issue. Therefore, I temporarily created a new PR. I will fix the credential issue in a separate PR in the future. Sorry 🙏

Base code is cherry-picked from forked PR, so code author is not changed.

WHY

We plan to add support for VolumeSnapshot in the civo-csi driver.
To achieve this, we need to implement the following handlers.

FYI

⚠️ The client-side implementation is not yet complete, so some parts are impelemented with comments. Once all the implementations are finished, I will uncomment the code.

@hlts2 hlts2 marked this pull request as ready for review December 9, 2024 08:00
@hlts2 hlts2 requested a review from DMajrekar December 9, 2024 08:00
Copy link
Member

@rytswd rytswd left a comment

Choose a reason for hiding this comment

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

Minor suggestion but otherwise LGTM!

Comment on lines 606 to 607
// snapshotName := req.GetName()
// sourceVolID := req.GetSourceVolumeId()
Copy link
Member

Choose a reason for hiding this comment

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

I think this line can move further up even before the log line, and reuse the variable snapshotName and sourceVolID everywhere, rather than calling req.GetName() multiple times

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you for catching it! After I fix it, I will merge this PR! 🚀

Copy link
Member Author

Choose a reason for hiding this comment

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

I have fixed it: d12f0e8

@hlts2
Copy link
Member Author

hlts2 commented Dec 11, 2024

@rytswd Thank you for your review! I will merge this PR 🚀

@hlts2 hlts2 merged commit 431c439 into master Dec 11, 2024
6 checks passed
@hlts2 hlts2 deleted the feat/add-create-snapshot-handler branch December 11, 2024 03:27
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.

3 participants