Skip to content

Commit 6e3c9dc

Browse files
authored
Merge branch 'master' into tag-snapshots
2 parents 3f26f3d + fb1c08d commit 6e3c9dc

File tree

4 files changed

+27
-9
lines changed

4 files changed

+27
-9
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
[[GH-143]](https://github.com/digitalocean/csi-digitalocean/pull/143)
2020
* Add tagging support for Volume snapshots via the new `--do-tag` flag
2121
[[GH-145]](https://github.com/digitalocean/csi-digitalocean/pull/145)
22+
* Fix race in snapshot integration test.
23+
[[GH-146]](https://github.com/digitalocean/csi-digitalocean/pull/146)
2224

2325
## v1.0.0 - 2018.12.19
2426

Makefile

+2-4
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
1010
LDFLAGS ?= -X github.com/digitalocean/csi-digitalocean/driver.version=${VERSION} -X github.com/digitalocean/csi-digitalocean/driver.commit=${COMMIT} -X github.com/digitalocean/csi-digitalocean/driver.gitTreeState=${GIT_TREE_STATE}
1111
PKG ?= github.com/digitalocean/csi-digitalocean/cmd/do-csi-plugin
1212

13-
## Bump the version in the version file. Set BUMP to [ major | minor | patch ]
14-
BUMP := patch
1513
VERSION ?= $(shell cat VERSION)
1614

1715
all: test
@@ -20,8 +18,8 @@ publish: compile build push clean
2018

2119
.PHONY: bump-version
2220
bump-version:
23-
@go get -u github.com/jessfraz/junk/sembump # update sembump tool
24-
$(eval NEW_VERSION = $(shell sembump --kind $(BUMP) $(VERSION)))
21+
@[ "${NEW_VERSION}" ] || ( echo "NEW_VERSION must be set (ex. make NEW_VERSION=v1.x.x bump-version)"; exit 1 )
22+
@(echo ${NEW_VERSION} | grep -E "^v") || ( echo "NEW_VERSION must be a semver ('v' prefix is required)"; exit 1 )
2523
@echo "Bumping VERSION from $(VERSION) to $(NEW_VERSION)"
2624
@echo $(NEW_VERSION) > VERSION
2725
@cp deploy/kubernetes/releases/csi-digitalocean-${VERSION}.yaml deploy/kubernetes/releases/csi-digitalocean-${NEW_VERSION}.yaml

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,19 @@ bumped following the rules below:
3636
</thead>
3737
<tbody>
3838
<tr>
39-
<td>v0.1.0 - v0.2.x</td>
39+
<td>v0.1.x - v0.2.x</td>
4040
<td>yes</td>
4141
<td>no</td>
4242
<td>no</td>
4343
</tr>
4444
<tr>
45-
<td>v0.3.0 - v0.4.x</td>
45+
<td>v0.3.x - v0.4.x</td>
4646
<td>no</td>
4747
<td>yes</td>
4848
<td>no</td>
4949
</tr>
5050
<tr>
51-
<td>v1.0.0 - v1.0.x</td>
51+
<td>v1.0.x - v1.0.x</td>
5252
<td>no</td>
5353
<td>no</td>
5454
<td>yes</td>
@@ -226,7 +226,7 @@ Dependencies are managed via [Go modules](https://github.com/golang/go/wiki/Modu
226226
To release a new version bump first the version:
227227

228228
```
229-
$ make bump-version
229+
$ make NEW_VERSION=v1.0.0 bump-version
230230
```
231231

232232
Make sure everything looks good. Create a new branch with all changes:

test/kubernetes/integration_test.go

+19-1
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,24 @@ func TestSnapshot_Create(t *testing.T) {
358358
Name: "my-csi-app-2",
359359
},
360360
Spec: v1.PodSpec{
361+
// Write the data in an InitContainer so that we can guarantee
362+
// it's been written before we reach running in the main container.
363+
InitContainers: []v1.Container{
364+
{
365+
Name: "my-csi",
366+
Image: "busybox",
367+
VolumeMounts: []v1.VolumeMount{
368+
{
369+
MountPath: "/data",
370+
Name: volumeName,
371+
},
372+
},
373+
Command: []string{
374+
"sh", "-c",
375+
"echo testcanary > /data/canary && sync",
376+
},
377+
},
378+
},
361379
Containers: []v1.Container{
362380
{
363381
Name: "my-csi-app",
@@ -370,7 +388,7 @@ func TestSnapshot_Create(t *testing.T) {
370388
},
371389
Command: []string{
372390
"sh", "-c",
373-
"echo testcanary > /data/canary && sleep 1000000",
391+
"sleep 1000000",
374392
},
375393
},
376394
},

0 commit comments

Comments
 (0)