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

chore: test migration backward compatibility #5492

Merged
merged 24 commits into from
Nov 30, 2023
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
10ebf2e
chore: test migration backward compatibility
gastonfournier Nov 29, 2023
e65dd53
Make sure we run the tests for this PR
gastonfournier Nov 29, 2023
2288754
Add OSS UI tests
gastonfournier Nov 29, 2023
33bef39
Run with ts-node
gastonfournier Nov 29, 2023
9dee268
Conditional click
gastonfournier Nov 29, 2023
19111d4
Ignore build-scripts
gastonfournier Nov 29, 2023
dbb7ca6
Use db-migrate
gastonfournier Nov 29, 2023
86d27c0
Fixes
gastonfournier Nov 29, 2023
5e66382
Yeet the segments splash
gastonfournier Nov 29, 2023
31282b3
Test without env variables in docker compose
gastonfournier Nov 29, 2023
1bc7e9b
Envs in docker and step
gastonfournier Nov 29, 2023
52d62d5
Verify tip of main broke backward compatibility with 5.6.9
gastonfournier Nov 29, 2023
6b4105f
Verify 5.6.10 restores backward compatibility after tip of main migra…
gastonfournier Nov 29, 2023
cb96c25
Try using db-migrate script with env variables
gastonfournier Nov 29, 2023
a58156c
Attempt to fix cypress test
gastonfournier Nov 29, 2023
9ca252d
Migrate up
gastonfournier Nov 29, 2023
70399a7
Remove unneeded changes
gastonfournier Nov 29, 2023
8f18e07
Attempt to fix cypress tests
gastonfournier Nov 29, 2023
3829ca3
chore: keeping UI test simple and testing it fails in 5.6.9
gastonfournier Nov 30, 2023
a0c3b6a
Check that 5.6.10 does not have problems after migration
gastonfournier Nov 30, 2023
60d03f5
Keep things simple in the UI tests
gastonfournier Nov 30, 2023
36e8263
Verify tests fail in 5.6.9
gastonfournier Nov 30, 2023
bdaab84
Verify tests succeed with latest: 5.7.0
gastonfournier Nov 30, 2023
1e538d4
Remove splash close and add always pull policy
gastonfournier Nov 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Conditional click
gastonfournier committed Nov 29, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 9dee2680388bea6cd970fd4d670c1e58a04965bd
5 changes: 4 additions & 1 deletion .github/workflows/validate-migrations.yaml
Original file line number Diff line number Diff line change
@@ -34,7 +34,10 @@ jobs:
run: docker compose up unleash -d --wait -t 90
# add some data with terraform
- name: Apply migrations
run: yarn migrate
run: |
yarn install --frozen-lockfile
yarn build:backend
yarn migrate
# run ui tests against previous version of Unleash
- name: Run Cypress
uses: cypress-io/github-action@v5
4 changes: 3 additions & 1 deletion frontend/cypress/support/UI.ts
Original file line number Diff line number Diff line change
@@ -46,7 +46,9 @@ export const login_UI = (
cy.get("[data-testid='CLOSE_SPLASH']").click();
}

cy.get("[data-testid='CloseIcon']").click();
if (document.querySelector("[data-testid='CloseIcon']")) {
cy.get("[data-testid='CloseIcon']").click();
}
});
};

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@
"main": "./dist/lib/server-impl.js",
"scripts": {
"start": "TZ=UTC node ./dist/server.js",
"migrate": "TZ=UTC ts-node ./src/migrate-db.ts",
"migrate": "TZ=UTC node ./dist/migrate-db.js",
"copy-templates": "copyfiles -u 1 src/mailtemplates/**/*.mustache dist/",
"build:backend": "tsc --pretty --strictNullChecks false",
"build:frontend": "yarn --cwd ./frontend run build",