Skip to content

Commit 51bcb12

Browse files
committed
test v2026.6.1 for regression
1 parent fffbc89 commit 51bcb12

3 files changed

Lines changed: 57 additions & 6 deletions

File tree

.github/workflows/test-all-custom-flags.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,16 @@ jobs:
154154
- name: Build and start the test vault
155155
run: docker compose up -d --build --remove-orphans --wait --wait-timeout 60
156156

157+
- name: Wait for admin DB migrations to complete
158+
run: |
159+
echo "Waiting for admin DB migrations..."
160+
timeout 180 sh -c '
161+
until docker compose exec -T bitwarden sh -c "grep -q \"Migration successful\" /etc/bitwarden/logs/admin-*.log 2>/dev/null"; do
162+
sleep 2
163+
done
164+
'
165+
echo "Migrations complete."
166+
157167
- name: Generate crypto values
158168
run: npm run setup:crypto
159169

.github/workflows/test-all.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,45 @@ jobs:
155155
- name: Build and start the test vault
156156
run: docker compose up -d --build --remove-orphans --wait --wait-timeout 60
157157

158+
- name: Wait for admin DB migrations to complete
159+
run: |
160+
echo "Waiting for admin DB migrations..."
161+
timeout 180 sh -c '
162+
until docker compose exec -T bitwarden sh -c "grep -q \"Migration successful\" /etc/bitwarden/logs/admin-*.log 2>/dev/null"; do
163+
sleep 2
164+
done
165+
'
166+
echo "Migrations complete."
167+
158168
- name: Generate crypto values
159169
run: npm run setup:crypto
160170

161171
- name: Setup the vault test account
162172
run: npm run seed:vault:account
163173

174+
- name: Dump bitwarden container logs on failure
175+
if: failure()
176+
run: docker compose logs bitwarden --tail=500
177+
178+
- name: Dump db container logs on failure
179+
if: failure()
180+
run: docker compose logs db --tail=500
181+
182+
- name: Dump bitwarden internal app logs on failure
183+
if: failure()
184+
run: |
185+
docker compose exec -T bitwarden sh -c '
186+
echo "=== /etc/bitwarden contents ==="
187+
ls -la /etc/bitwarden 2>/dev/null || true
188+
echo "=== finding log files ==="
189+
find /etc/bitwarden /var/log -name "*.log" -type f 2>/dev/null
190+
echo "=== dumping each ==="
191+
find /etc/bitwarden /var/log -name "*.log" -type f 2>/dev/null | while read f; do
192+
echo "--- $f ---"
193+
tail -200 "$f" 2>/dev/null || true
194+
done
195+
' || true
196+
164197
- name: Setup the vault test account ciphers
165198
run: npm run seed:vault:ciphers
166199

scripts/create-account.ts

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import fetch from "cross-fetch";
21
import { configDotenv } from "dotenv";
32

43
configDotenv({ quiet: true });
@@ -39,7 +38,7 @@ async function createAccount() {
3938
const vaultHost = `${VAULT_HOST_URL}:${VAULT_HOST_PORT}`;
4039

4140
try {
42-
const requestOptions = {
41+
const requestOptions: RequestInit = {
4342
headers: {
4443
accept: "application/json",
4544
"content-type": "application/json; charset=utf-8",
@@ -55,8 +54,13 @@ async function createAccount() {
5554
},
5655
);
5756

58-
const preCreationResponseData =
59-
(await preCreationResponse.json()) as PreAccountCreateResponseData;
57+
const rawText1 = await preCreationResponse.text();
58+
console.log(
59+
`[debug] step1 status=${preCreationResponse.status} body=${rawText1.slice(0, 500)}`,
60+
);
61+
const preCreationResponseData = JSON.parse(
62+
rawText1,
63+
) as PreAccountCreateResponseData;
6064

6165
if (
6266
typeof preCreationResponseData !== "string" &&
@@ -117,14 +121,18 @@ async function createAccount() {
117121
},
118122
);
119123

120-
const responseData = (await response.json()) as AccountCreationResponseData;
124+
const rawText2 = await response.text();
125+
console.log(
126+
`[debug] step2 status=${response.status} body=${rawText2.slice(0, 500)}`,
127+
);
128+
const responseData = JSON.parse(rawText2) as AccountCreationResponseData;
121129

122130
if (responseData.object === "registerFinish") {
123131
emitSuccessMessage(vaultHost);
124132
return;
125133
}
126134
} catch (error) {
127-
// Server isn't ready yet
135+
console.log("[debug] caught:", error);
128136
}
129137

130138
console.log(`Retrying account creation at ${vaultHost}...`);

0 commit comments

Comments
 (0)