Skip to content

Commit 5fd8236

Browse files
build(deps): Bump docker/build-push-action from 6 to 7 (#3151)
* build(deps): Bump docker/build-push-action from 6 to 7 Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6 to 7. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](docker/build-push-action@v6...v7) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * fix flaky test --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Julien Robert <julien@rbrt.fr>
1 parent 34db946 commit 5fd8236

4 files changed

Lines changed: 37 additions & 43 deletions

File tree

‎.github/workflows/docker-build-push.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
password: ${{ secrets.GITHUB_TOKEN }}
4242

4343
- name: Build and push ${{ matrix.app.name }} Docker image
44-
uses: docker/build-push-action@v6
44+
uses: docker/build-push-action@v7
4545
with:
4646
context: .
4747
file: ${{ matrix.app.dockerfile }}

‎.github/workflows/release-apps.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888
password: ${{ secrets.GITHUB_TOKEN }}
8989

9090
- name: Build and push Docker image
91-
uses: docker/build-push-action@v6
91+
uses: docker/build-push-action@v7
9292
with:
9393
context: .
9494
file: ${{ needs.parse-tag.outputs.dockerfile }}

‎.github/workflows/test.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
- name: Set up Docker Buildx
9393
uses: docker/setup-buildx-action@v3
9494
- name: Build evstack:local-dev (cached)
95-
uses: docker/build-push-action@v6
95+
uses: docker/build-push-action@v7
9696
with:
9797
context: .
9898
file: apps/testapp/Dockerfile

‎types/state_test.go‎

Lines changed: 34 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -111,46 +111,7 @@ func TestAssertValidForNextState(t *testing.T) {
111111
data: &Data{},
112112
expectedError: "dataHash from the header does not match with hash",
113113
},
114-
"last header hash mismatch (first time)": {
115-
state: State{
116-
ChainID: "test-chain",
117-
LastHeaderHash: []byte("hash"),
118-
LastBlockHeight: 1,
119-
LastBlockTime: now,
120-
},
121-
header: &SignedHeader{
122-
Header: Header{
123-
BaseHeader: BaseHeader{
124-
ChainID: "test-chain", Height: 2,
125-
Time: nowUnixNano,
126-
},
127-
DataHash: dataHashForEmptyTxs,
128-
LastHeaderHash: []byte("other-hash"),
129-
},
130-
},
131-
data: &Data{},
132-
expectedError: "",
133-
},
134-
"last header hash mismatch (second time)": {
135-
state: State{
136-
ChainID: "test-chain",
137-
LastHeaderHash: []byte("hash"),
138-
LastBlockHeight: 1,
139-
LastBlockTime: now,
140-
},
141-
header: &SignedHeader{
142-
Header: Header{
143-
BaseHeader: BaseHeader{
144-
ChainID: "test-chain", Height: 2,
145-
Time: nowUnixNano,
146-
},
147-
DataHash: dataHashForEmptyTxs,
148-
LastHeaderHash: []byte("other-hash"),
149-
},
150-
},
151-
data: &Data{},
152-
expectedError: "invalid last header hash",
153-
},
114+
154115
"app hash mismatch": {
155116
state: State{
156117
ChainID: "test-chain",
@@ -184,4 +145,37 @@ func TestAssertValidForNextState(t *testing.T) {
184145
assert.ErrorContains(t, err, tc.expectedError)
185146
})
186147
}
148+
149+
// The last-header-hash grace period is stateful: the first mismatch is
150+
// tolerated (based-sequencer transition), the second is an error.
151+
// These two calls must run in order on the same global state, so they
152+
// cannot be independent map entries.
153+
t.Run("last header hash mismatch grace period", func(t *testing.T) {
154+
state := State{
155+
ChainID: "test-chain",
156+
LastHeaderHash: []byte("hash"),
157+
LastBlockHeight: 1,
158+
LastBlockTime: now,
159+
}
160+
header := &SignedHeader{
161+
Header: Header{
162+
BaseHeader: BaseHeader{
163+
ChainID: "test-chain", Height: 2,
164+
Time: nowUnixNano,
165+
},
166+
DataHash: dataHashForEmptyTxs,
167+
LastHeaderHash: []byte("other-hash"),
168+
},
169+
}
170+
data := &Data{}
171+
172+
// First mismatch: tolerated (based-sequencer grace period).
173+
err := state.AssertValidForNextState(header, data)
174+
assert.NoError(t, err, "first last-header-hash mismatch should be tolerated")
175+
176+
// Second mismatch on the same state: must be an error.
177+
err = state.AssertValidForNextState(header, data)
178+
assert.ErrorContains(t, err, "invalid last header hash",
179+
"second last-header-hash mismatch should be rejected")
180+
})
187181
}

0 commit comments

Comments
 (0)