[ui, tests] Various acceptance test fixups (v main) (#25031)

* Add factory hooks for jobs to have previously stable versions and stopped status

* Since #24973 node-read isn't presupposed and so should regex match only on the common url parts

* Job detail tests for title buttons are now bimodal and default to having previously-stable version in history

* prettier plz

* Breaking a thing on purpose to see if my other broken thing is broken

* continue-on-error set to false to get things red when appropriate

* OK what if continue-on-error=true but we do a separate failure reporting after the fact

* fail-fast are you the magic incantation that I need?

* Re-fix my test now that fast-fail is off

* Fix to server-leader by adding a region first, and always()-append to uploading partition results

* Express failure step lists failing tests so you don't have to click back into ember-exam step

* temporary snapshot and logging for flakey test in service job detail

* Bunch of region and tasklogs test fixups

* using allocStatusDistribution to ensure service job always has a non-queued alloc
This commit is contained in:
Phil Renaud
2025-02-20 16:56:14 -05:00
committed by GitHub
parent d63c1d0bad
commit 3f764a21bc
10 changed files with 106 additions and 20 deletions

View File

@@ -40,6 +40,7 @@ jobs:
run:
working-directory: ui
strategy:
fail-fast: false
matrix:
partition: [1, 2, 3, 4]
split: [4]
@@ -61,17 +62,28 @@ jobs:
secrets: |-
kv/data/teams/nomad/ui PERCY_TOKEN ;
- name: ember exam
id: ember_exam
env:
PERCY_TOKEN: ${{ env.PERCY_TOKEN || secrets.PERCY_TOKEN }}
PERCY_PARALLEL_NONCE: ${{ needs.pre-test.outputs.nonce }}
run: |
yarn exam:parallel --split=${{ matrix.split }} --partition=${{ matrix.partition }} --json-report=test-results/test-results.json
continue-on-error: true
- name: Express timeout failure
if: ${{ failure() }}
run: exit 1
- name: Express failure
if: steps.ember_exam.outcome == 'failure'
run: |
echo "Tests failed in ember-exam for partition ${{ matrix.partition }}"
echo "Failed tests:"
node -e "
const results = JSON.parse(require('fs').readFileSync('test-results/test-results.json'));
results.tests.filter(t => !t.passed).forEach(test => {
console.error('\n❌ ' + test.name);
if (test.error) console.error(test.error);
});
"
exit 1
- name: Upload partition test results
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
if: always() && github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: test-results-${{ matrix.partition }}