Skip to content

Commit 7938040

Browse files
authored
direct: Start serial with 1 not 0 in new state files (#4051)
## Why 1 is more intentional, 0 is default in go structs.
1 parent f2003de commit 7938040

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

acceptance/bundle/resources/jobs/update/out.state.direct.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"lineage": "[UUID]",
3-
"serial": 0,
3+
"serial": 1,
44
"state": {
55
"resources.jobs.foo": {
66
"__id__": "[JOB_ID]",

acceptance/bundle/user_agent/simple/out.requests.deploy.direct.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@
221221
},
222222
"body": {
223223
"lineage": "[UUID]",
224-
"serial": 0,
224+
"serial": 1,
225225
"state": {
226226
"resources.schemas.foo": {
227227
"__id__": "mycatalog.myschema",

bundle/direct/dstate/state.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func (db *DeploymentState) Open(path string) error {
8888
if err != nil {
8989
if os.IsNotExist(err) {
9090
db.Data = Database{
91-
Serial: 0,
91+
Serial: 1,
9292
Lineage: uuid.New().String(),
9393
State: make(map[string]ResourceEntry),
9494
}

0 commit comments

Comments
 (0)