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

CSI spec v1.1.0 #144

Merged
merged 14 commits into from
Apr 29, 2019
Merged

CSI spec v1.1.0 #144

merged 14 commits into from
Apr 29, 2019

Conversation

fatih
Copy link
Contributor

@fatih fatih commented Apr 22, 2019

This PR updates the CSI spec to v1.1.0 and the sidecars to their respective largest versions.

Vendoring the code separately is a breaking change, hence it had to be here. Each commit is self contained, to review, read them one by one.

  • Update the CSI version to v1.1.0 and the csi-test library to v2.0.0
  • Satisfy the new controller interface
  • Fix/improve the code according to the new additions in the csi-test

Copy link
Collaborator

@jcodybaker jcodybaker left a comment

Choose a reason for hiding this comment

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

LGTM

ll.WithField("snapshot_id", snapshot.GetSnapshotId()).Info("using snapshot as volume source")
volumeReq.SnapshotID = snapshot.GetSnapshotId()
if contentSource != nil && contentSource.GetSnapshot() != nil {
snapshotID := contentSource.GetSnapshot().GetSnapshotId()
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we validate that the snapshot ID is not empty? Not sure whether the API call below will return a NotFound or some other status when passed an empty ID.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good poing @adamwg. I think it'll be already validated but I'll make sure to test that as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed with: 46155ff

Make sure we catch it and return a proper error instead of relying on
the API behavior.
@fatih fatih merged commit 532691c into master Apr 29, 2019
@fatih fatih deleted the csi-spec-v1.1.0 branch April 29, 2019 16:28
@@ -790,6 +810,10 @@ func (d *Driver) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsReques
return listResp, nil
}

func (d *Driver) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error) {
return nil, errors.New("not implemented yet")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this return codes.Unimplemented rather than a generic go error?

cfg := &sanity.Config{
StagingPath: mntStageDir,
TargetPath: mntDir,
TargetPath: os.TempDir() + "/csi-target",
Copy link
Collaborator

Choose a reason for hiding this comment

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

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