hotfix: repair Docker release publishing

Refs #1400
This commit is contained in:
Kai (Tam Nhu) Tran authored and GitHub committed 2026-05-29 10:19:38 -04:00
1 parent c21f589247
commit d49bbdaec3
5 files changed
+92 -15

No files matched your search

+3 -2
View File
@@ -106,8 +106,9 @@ assert_case "skips at the larger configured window boundary" 0 false 3 \
assert_failure "rejects prerelease target tags" \
--target "v7.80.0-rc.1" --baseline "7.80.0" --window "2"
assert_failure "fails loudly when baseline tag is unavailable after baseline" \
--target "v7.81.2" --baseline "7.81.0" --window "2"
assert_case "skips deprecated publish when baseline tag is unavailable after baseline" 0 false 2 \
"v7.81.2" "7.81.0" "2" \
$'v7.80.0'
echo ""
echo "Dashboard sunset guard tests complete: ${PASS} passed, ${FAIL} failed."
@@ -0,0 +1,38 @@
import { describe, expect, test } from 'bun:test';
import { existsSync, readFileSync } from 'node:fs';
import { join } from 'node:path';
const repoRoot = join(import.meta.dir, '../../..');
describe('docker release workflow context', () => {
test('builds the integrated Dockerfile with the context its COPY paths expect', () => {
const workflow = readFileSync(join(repoRoot, '.github/workflows/docker-release.yml'), 'utf8');
const dockerfile = readFileSync(join(repoRoot, 'docker/Dockerfile.integrated'), 'utf8');
expect(workflow).toMatch(
/Build and push integrated image[\s\S]*context: docker[\s\S]*file: docker\/Dockerfile\.integrated/,
);
expect(dockerfile).toContain('COPY supervisord.conf /etc/supervisord.conf');
expect(dockerfile).toContain('COPY entrypoint-integrated.sh /entrypoint-integrated.sh');
expect(existsSync(join(repoRoot, 'docker/supervisord.conf'))).toBe(true);
expect(existsSync(join(repoRoot, 'docker/entrypoint-integrated.sh'))).toBe(true);
});
test('keeps integrated smoke tests independent from legacy dashboard publish', () => {
const workflow = readFileSync(join(repoRoot, '.github/workflows/docker-release.yml'), 'utf8');
expect(workflow).not.toMatch(/publish-integrated:[\s\S]*?needs:\s*\[?publish-dashboard/);
expect(workflow).toMatch(/smoke-test:[\s\S]*?needs:\s*\[publish-integrated\]/);
});
test('verifies immutable and promoted tags without registry credentials', () => {
const workflow = readFileSync(join(repoRoot, '.github/workflows/docker-release.yml'), 'utf8');
expect(workflow).toMatch(
/Verify anonymous pull access[\s\S]*DOCKER_CONFIG="\$\{CLEAN_DOCKER_CONFIG\}" docker pull/
);
expect(workflow).toMatch(
/Verify promoted tags are anonymously pullable[\s\S]*DOCKER_CONFIG="\$\{CLEAN_DOCKER_CONFIG\}" docker pull/
);
});
});
@@ -45,14 +45,18 @@ describe('docker dashboard sunset guard', () => {
});
});
test('fails loudly if the baseline tag is missing after the baseline', () => {
expect(() =>
evaluateDashboardSunset({
targetTag: 'v7.81.2',
baselineVersion: '7.81.0',
releaseWindow: 2,
stableTags: ['v7.80.0'],
}),
).toThrow('baseline tag v7.81.0 is missing');
test('skips deprecated publish if the baseline tag is missing after the baseline', () => {
const result = evaluateDashboardSunset({
targetTag: 'v7.81.2',
baselineVersion: '7.81.0',
releaseWindow: 2,
stableTags: ['v7.80.0'],
});
expect(result).toMatchObject({
elapsed: 2,
publish: false,
});
expect(result.reason).toContain('baseline v7.81.0 is missing');
});
});