Skip to content

Commit

Permalink
Replace ErrorContains checks with Error checks before running upgrade…
Browse files Browse the repository at this point in the history
… downgrade (vitessio#16688)

Signed-off-by: Manan Gupta <[email protected]>
  • Loading branch information
GuptaManan100 authored Sep 2, 2024
1 parent 03c4aed commit caf39ed
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,12 @@ jobs:
cp -R bin /tmp/vitess-build-other/
rm -Rf bin/*
- name: Convert ErrorContains checks to Error checks
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
run: |
find ./go/test/endtoend -name '*.go' -exec sed -i 's/ErrorContains/Error/g' {} +
find ./go/test/endtoend -name '*.go' -exec sed -i 's/EqualError/Error/g' {} +
# Swap the binaries in the bin. Use vtgate version n-1 and keep vttablet at version n
- name: Use last release's VTGate
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@ jobs:
cp -R bin /tmp/vitess-build-other/
rm -Rf bin/*
- name: Convert ErrorContains checks to Error checks
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
run: |
find ./go/test/endtoend -name '*.go' -exec sed -i 's/ErrorContains/Error/g' {} +
find ./go/test/endtoend -name '*.go' -exec sed -i 's/EqualError/Error/g' {} +
# Swap the binaries in the bin. Use vtgate version n+1 and keep vttablet at version n
- name: Use next release's VTGate
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ jobs:
mkdir -p /tmp/vitess-build-current/
cp -R bin /tmp/vitess-build-current/
- name: Convert ErrorContains checks to Error checks
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
run: |
find ./go/test/endtoend -name '*.go' -exec sed -i 's/ErrorContains/Error/g' {} +
find ./go/test/endtoend -name '*.go' -exec sed -i 's/EqualError/Error/g' {} +
# Swap the binaries in the bin. Use vtgate version n-1 and keep vttablet at version n
- name: Use last release's VTGate
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ jobs:
mkdir -p /tmp/vitess-build-current/
cp -R bin /tmp/vitess-build-current/
- name: Convert ErrorContains checks to Error checks
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
run: |
find ./go/test/endtoend -name '*.go' -exec sed -i 's/ErrorContains/Error/g' {} +
find ./go/test/endtoend -name '*.go' -exec sed -i 's/EqualError/Error/g' {} +
# Swap the binaries in the bin. Use vtgate version n+1 and keep vttablet at version n
- name: Use next release's VTGate
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true'
Expand Down

0 comments on commit caf39ed

Please sign in to comment.