diff --git a/.changelog/24415.txt b/.changelog/24415.txt deleted file mode 100644 index 2d158f8581c..00000000000 --- a/.changelog/24415.txt +++ /dev/null @@ -1,3 +0,0 @@ -```release-note:bug -client: fixed a bug where AMD CPUs were not correctly fingerprinting base speed -``` diff --git a/.changelog/24668.txt b/.changelog/24668.txt deleted file mode 100644 index 68bb9efc157..00000000000 --- a/.changelog/24668.txt +++ /dev/null @@ -1,3 +0,0 @@ -```release-note:bug -ui: Fix an issue where 2 parent jobs would see the others dispatches if it were otherwise empty -``` diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index 6f45b095e98..00000000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,35 +0,0 @@ -### Description - - -### Testing & Reproduction steps - - -### Links - - -### Contributor Checklist -- [ ] **Changelog Entry** If this PR changes user-facing behavior, please generate and add a - changelog entry using the `make cl` command. -- [ ] **Testing** Please add tests to cover any new functionality or to demonstrate bug fixes and - ensure regressions will be caught. -- [ ] **Documentation** If the change impacts user-facing functionality such as the CLI, API, UI, - and job configuration, please update the Nomad website documentation to reflect this. Refer to - the [website README](../website/README.md) for docs guidelines. Please also consider whether the - change requires notes within the [upgrade guide](../website/content/docs/upgrade/upgrade-specific.mdx). - -### Reviewer Checklist -- [ ] **Backport Labels** Please add the correct backport labels as described by the internal - backporting document. -- [ ] **Commit Type** Ensure the correct merge method is selected which should be "squash and merge" - in the majority of situations. The main exceptions are long-lived feature branches or merges where - history should be preserved. -- [ ] **Enterprise PRs** If this is an enterprise only PR, please add any required changelog entry - within the public repository. diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fc64826b838..e2da17aca4f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -90,7 +90,7 @@ jobs: with: ref: ${{ github.event.inputs.build-ref }} - name: Setup go - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: ${{ needs.get-go-version.outputs.go-version }} @@ -98,7 +98,7 @@ jobs: run: make deps - name: Setup node and yarn - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 with: node-version: "18" cache-dependency-path: "ui/yarn.lock" @@ -142,7 +142,7 @@ jobs: with: ref: ${{ github.event.inputs.build-ref }} - name: Setup go - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: ${{ needs.get-go-version.outputs.go-version }} @@ -150,7 +150,7 @@ jobs: run: make deps - name: Setup node and yarn - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 with: node-version: "18" cache-dependency-path: "ui/yarn.lock" @@ -265,7 +265,7 @@ jobs: run: git config --global url.'https://${{ env.ELEVATED_GITHUB_TOKEN }}@github.com'.insteadOf 'https://github.com' - name: Setup go - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: ${{ needs.get-go-version.outputs.go-version }} @@ -273,7 +273,7 @@ jobs: run: make deps - name: Setup node and yarn - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 with: node-version: "18" cache-dependency-path: "ui/yarn.lock" @@ -356,7 +356,7 @@ jobs: goos: [linux] goarch: [amd64] steps: - - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: ${{needs.get-go-version.outputs.go-version}} - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index edfc984c173..ccb948ce35c 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -41,9 +41,9 @@ jobs: - name: Git config token if: endsWith(github.repository, '-enterprise') run: git config --global url.'https://${{ env.ELEVATED_GITHUB_TOKEN }}@github.com'.insteadOf 'https://github.com' - - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: - cache: ${{ contains(runner.name, 'Github Actions') }} + cache: true go-version-file: .go-version cache-dependency-path: '**/go.sum' - name: Run make check diff --git a/.github/workflows/ember-test-audit.yml b/.github/workflows/ember-test-audit.yml new file mode 100644 index 00000000000..6c1dce0a8c4 --- /dev/null +++ b/.github/workflows/ember-test-audit.yml @@ -0,0 +1,87 @@ +name: Ember test audit comparison +on: + pull_request: + paths: + - '.github/workflows/ember*' + - 'ui/**' + +defaults: + run: + working-directory: ui + +# There’s currently no way to share steps between jobs so there’s a lot of duplication +# for running the audit for the base and PR. +jobs: + time-base: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + ref: ${{ github.event.pull_request.base.sha }} + - uses: nanasess/setup-chromedriver@42cc2998329f041de87dc3cfa33a930eacd57eaa # v2.2.2 + - name: Use Node.js + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 + with: + node-version: '18' + - run: yarn --frozen-lockfile + - run: mkdir -p /tmp/test-reports + - run: npx ember-test-audit 1 --json --output ../base-audit.json + - name: Upload result + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + with: + name: base-audit + path: base-audit.json + time-pr: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: nanasess/setup-chromedriver@42cc2998329f041de87dc3cfa33a930eacd57eaa # v2.2.2 + - name: Use Node.js + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 + with: + node-version: '18' + - run: yarn --frozen-lockfile + - run: mkdir -p /tmp/test-reports + - run: npx ember-test-audit 1 --json --output ../pr-audit.json + - name: Upload result + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + with: + name: pr-audit + path: pr-audit.json + compare: + needs: [time-base, time-pr] + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: base-audit + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: pr-audit + - uses: backspace/ember-test-audit-comparison-action@21e9492d0033bc7e84b6189ae94537a6ed045cfa # v2 + with: + base-report-path: base-audit.json + comparison-report-path: pr-audit.json + base-identifier: ${{ github.event.pull_request.base.ref }} + comparison-identifier: ${{ github.event.pull_request.head.sha }} + timing-output-path: audit-diff.md + flakiness-output-path: flakiness-report.md + - uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # v2.9.0 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + path: audit-diff.md + - name: Check for existence of flakiness report + id: check_file + uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0 + with: + files: "flakiness-report.md" + - name: comment PR + if: steps.check_file.outputs.files_exists == 'true' + uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2.8.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + message-path: flakiness-report.md +permissions: + contents: read + pull-requests: write diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 435986e6678..cab2b6062de 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -82,12 +82,12 @@ jobs: echo "go-version=$(cat .go-version)" >> "$GITHUB_OUTPUT" - name: Setup go - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: ${{ steps.get-go-version.outputs.go-version }} - name: Setup node and yarn - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 + uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 with: node-version: "18" cache-dependency-path: "ui/yarn.lock" diff --git a/.github/workflows/security-scan.yml b/.github/workflows/security-scan.yml index a458be15f76..0b32e1e0601 100644 --- a/.github/workflows/security-scan.yml +++ b/.github/workflows/security-scan.yml @@ -37,7 +37,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: cache: ${{ contains(runner.name, 'Github Actions') }} go-version-file: .go-version diff --git a/.github/workflows/test-core.yaml b/.github/workflows/test-core.yaml index 9b006697d10..56972391358 100644 --- a/.github/workflows/test-core.yaml +++ b/.github/workflows/test-core.yaml @@ -59,7 +59,7 @@ jobs: timeout-minutes: 20 steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: cache: ${{ contains(runner.name, 'Github Actions') }} go-version-file: .go-version @@ -74,7 +74,7 @@ jobs: timeout-minutes: 8 steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: cache: true go-version-file: .go-version @@ -102,7 +102,7 @@ jobs: - quick steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: cache: ${{ contains(runner.name, 'Github Actions') }} go-version-file: .go-version diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index 10a5dbc195d..ab08c3047b3 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -53,7 +53,7 @@ jobs: - name: Git config token if: endsWith(github.repository, '-enterprise') run: git config --global url.'https://${{ env.ELEVATED_GITHUB_TOKEN }}@github.com'.insteadOf 'https://github.com' - - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: cache: ${{ contains(runner.name, 'Github Actions') }} go-version-file: .go-version @@ -70,7 +70,7 @@ jobs: - name: Git config token if: endsWith(github.repository, '-enterprise') run: git config --global url.'https://${{ secrets.ELEVATED_GITHUB_TOKEN }}@github.com'.insteadOf 'https://github.com' - - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: cache: ${{ contains(runner.name, 'Github Actions') }} go-version-file: .go-version diff --git a/.github/workflows/test-ui.yml b/.github/workflows/test-ui.yml index 5478460877c..f52096c47ab 100644 --- a/.github/workflows/test-ui.yml +++ b/.github/workflows/test-ui.yml @@ -2,14 +2,14 @@ name: test-ui on: pull_request: paths: - - "ui/**" + - 'ui/**' push: branches: - main - release/** - test-ui paths: - - "ui/**" + - 'ui/**' jobs: pre-test: @@ -36,6 +36,7 @@ jobs: - pre-test runs-on: ${{ endsWith(github.repository, '-enterprise') && fromJSON('["self-hosted", "ondemand", "linux", "type=m7a.2xlarge;m6a.2xlarge"]') || 'ubuntu-latest' }} timeout-minutes: 30 + continue-on-error: true defaults: run: working-directory: ui @@ -43,8 +44,6 @@ jobs: matrix: partition: [1, 2, 3, 4] split: [4] - # Note: If we ever change the number of partitions, we'll need to update the - # finalize.combine step to match steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: ./.github/actions/setup-js @@ -64,19 +63,8 @@ jobs: 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: Upload partition test results - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 - with: - name: test-results-${{ matrix.partition }} - path: ui/test-results/test-results.json - retention-days: 90 + run: yarn exam:parallel --split=${{ matrix.split }} --partition=${{ matrix.partition }} + finalize: needs: - pre-test @@ -100,24 +88,6 @@ jobs: jwtGithubAudience: ${{ vars.CI_VAULT_AUD }} secrets: |- kv/data/teams/nomad/ui PERCY_TOKEN ; - - name: Download all test results - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 - with: - pattern: test-results-* - path: test-results - - - name: Combine test results for comparison - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - run: node ../scripts/combine-ui-test-results.js - - name: Upload combined results for comparison - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 - with: - name: test-results-${{ github.sha }} - path: ui/combined-test-results.json - retention-days: 90 - - name: finalize env: PERCY_TOKEN: ${{ env.PERCY_TOKEN || secrets.PERCY_TOKEN }} diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 39dc4d93007..7d908185f65 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -52,7 +52,7 @@ jobs: - run: git config --global core.autocrlf false - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Setup go - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: ".go-version" - name: Show installed Go version diff --git a/.gitignore b/.gitignore index 2fc7f49083f..995fa494afc 100644 --- a/.gitignore +++ b/.gitignore @@ -137,10 +137,3 @@ tools/missing/missing # allow security scanner file !scan.hcl - -# generated variables for upgrade tests -enos.vars.hcl -enos/modules/*/*.tfvars - -# local license files -*.hclic diff --git a/CHANGELOG.md b/CHANGELOG.md index 3806cbb6e13..5c04911b4e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -94,18 +94,6 @@ BUG FIXES: * template: Fixed a panic on client restart when using change_mode=script [[GH-24057](https://github.com/hashicorp/nomad/issues/24057)] * ui: Fixes an issue where variables paths would not let namespaced users write variables unless they also had wildcard namespace variable write permissions [[GH-24073](https://github.com/hashicorp/nomad/issues/24073)] -## 1.8.7 Enterprise (November 8, 2024) - -SECURITY: - -* csi: Fixed a bug where a user with csi-write-volume permissions to one namespace can create volumes in another namespace (CVE-2024-10975) [[GH-24396](https://github.com/hashicorp/nomad/issues/24396)] - -BUG FIXES: - -* connect: add validation to ensure that connect native services specify a port [[GH-24329](https://github.com/hashicorp/nomad/issues/24329)] -* keyring: Fixed a panic on server startup when decrypting AEAD key data with empty RSA block [[GH-24383](https://github.com/hashicorp/nomad/issues/24383)] -* scheduler: fixed a bug where resource calculation did not account correctly for poststart tasks [[GH-24297](https://github.com/hashicorp/nomad/issues/24297)] - ## 1.8.6 Enterprise(October 21, 2024) IMPROVEMENTS: @@ -245,7 +233,7 @@ BUG FIXES: * server: Fixed a bug where expiring heartbeats for garbage collected nodes could panic the server [[GH-23383](https://github.com/hashicorp/nomad/issues/23383)] * template: Fix template rendering on Windows [[GH-23432](https://github.com/hashicorp/nomad/issues/23432)] * ui: Actions run from jobs with explicit name properties now work from the web UI [[GH-23553](https://github.com/hashicorp/nomad/issues/23553)] -* ui: Don't show keyboard nav hints when taking a screenshot [[GH-23365](https://github.com/hashicorp/nomad/issues/23365)] +* ui: Dont show keyboard nav hints when taking a screenshot [[GH-23365](https://github.com/hashicorp/nomad/issues/23365)] * ui: Fix an issue where a remotely purged job would prevent redirect from taking place in the web UI [[GH-23492](https://github.com/hashicorp/nomad/issues/23492)] * ui: Fix an issue where access to Job Templates in the UI was restricted to variable.write access [[GH-23458](https://github.com/hashicorp/nomad/issues/23458)] * ui: Fix the Upload Jobspec button on the Run Job page [[GH-23548](https://github.com/hashicorp/nomad/issues/23548)] @@ -342,18 +330,6 @@ BUG FIXES: * ui: Show the namespace in the web UI exec command hint [[GH-20218](https://github.com/hashicorp/nomad/issues/20218)] * windows: Fixed a regression where scanning task processes was inefficient [[GH-20619](https://github.com/hashicorp/nomad/issues/20619)] -## 1.7.15 (November 8, 2024) - -SECURITY: - -* csi: Fixed a bug where a user with csi-write-volume permissions to one namespace can create volumes in another namespace (CVE-2024-10975) [[GH-24396](https://github.com/hashicorp/nomad/issues/24396)] - -BUG FIXES: - -* connect: add validation to ensure that connect native services specify a port [[GH-24329](https://github.com/hashicorp/nomad/issues/24329)] -* deps: Fixed a bug where restarting Nomad could cause an unrelated process with the same PID as a failed executor to be killed [[GH-24265](https://github.com/hashicorp/nomad/issues/24265)] -* scheduler: fixed a bug where resource calculation did not account correctly for poststart tasks [[GH-24297](https://github.com/hashicorp/nomad/issues/24297)] - ## 1.7.14 Enterprise (October 21, 2024) IMPROVEMENTS: @@ -645,7 +621,7 @@ IMPROVEMENTS: * audit (Enterprise): Added ACL token role links to audit log auth objects [[GH-19415](https://github.com/hashicorp/nomad/issues/19415)] * ui: Added a new example template with Task Actions [[GH-19153](https://github.com/hashicorp/nomad/issues/19153)] -* ui: Don't allow new jobspec download until template is populated, and remove group count from jobs index [[GH-19377](https://github.com/hashicorp/nomad/issues/19377)] +* ui: dont allow new jobspec download until template is populated, and remove group count from jobs index [[GH-19377](https://github.com/hashicorp/nomad/issues/19377)] * ui: make the exec window look nicer on mobile screens [[GH-19332](https://github.com/hashicorp/nomad/issues/19332)] BUG FIXES: @@ -720,7 +696,7 @@ IMPROVEMENTS: * ui: for system and sysbatch jobs, now show client name on hover in job panel [[GH-19051](https://github.com/hashicorp/nomad/issues/19051)] * ui: nicer comment styles in UI example jobs [[GH-19037](https://github.com/hashicorp/nomad/issues/19037)] * ui: show plan output warnings alongside placement failures and dry-run info when running a job through the web ui [[GH-19225](https://github.com/hashicorp/nomad/issues/19225)] -* ui: simplify presentation of task event times (10m2.230948s becomes 10m2s etc.) [[GH-18595](https://github.com/hashicorp/nomad/issues/18595)] +* ui: simplify presentation of task event times (10m2.230948s bceomes 10m2s etc.) [[GH-18595](https://github.com/hashicorp/nomad/issues/18595)] * vars: Added a locking feature for Nomad Variables [[GH-18520](https://github.com/hashicorp/nomad/issues/18520)] DEPRECATIONS: diff --git a/CODEOWNERS b/CODEOWNERS index b74635d29a1..73cfb9f9e0d 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -2,11 +2,3 @@ /.release/ @hashicorp/github-nomad-core @hashicorp/nomad-eng /.github/workflows/build.yml @hashicorp/github-nomad-core @hashicorp/nomad-eng - -# codeowner default -* @hashicorp/github-nomad-core @hashicorp/nomad-eng - - -# web presence and education - -/website/ @hashicorp/nomad-docs @hashicorp/web-presence @hashicorp/github-nomad-core @hashicorp/nomad-eng diff --git a/client/allocrunner/networking_iptables_test.go b/client/allocrunner/networking_iptables_test.go index fc9d4ce3fb5..c7751892cb9 100644 --- a/client/allocrunner/networking_iptables_test.go +++ b/client/allocrunner/networking_iptables_test.go @@ -1,8 +1,6 @@ // Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 -//go:build linux - package allocrunner import ( diff --git a/client/allocrunner/taskrunner/sids_hook_test.go b/client/allocrunner/taskrunner/sids_hook_test.go index 35d0b88294c..0df13f3cb5d 100644 --- a/client/allocrunner/taskrunner/sids_hook_test.go +++ b/client/allocrunner/taskrunner/sids_hook_test.go @@ -1,8 +1,8 @@ // Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 -//go:build linux -// +build linux +//go:build !windows +// +build !windows // todo(shoenig): Once Connect is supported on Windows, we'll need to make this // set of tests work there too. diff --git a/client/allocrunner/taskrunner/task_runner_test.go b/client/allocrunner/taskrunner/task_runner_test.go index 645b33c3bdd..3430e3a3e80 100644 --- a/client/allocrunner/taskrunner/task_runner_test.go +++ b/client/allocrunner/taskrunner/task_runner_test.go @@ -1,8 +1,6 @@ // Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 -//go:build linux - package taskrunner import ( diff --git a/client/lib/numalib/detect_linux.go b/client/lib/numalib/detect_linux.go index aacb0bc6c31..1c697127953 100644 --- a/client/lib/numalib/detect_linux.go +++ b/client/lib/numalib/detect_linux.go @@ -30,18 +30,16 @@ func PlatformScanners() []SystemScanner { } const ( - sysRoot = "/sys/devices/system" - nodeOnline = sysRoot + "/node/online" - cpuOnline = sysRoot + "/cpu/online" - distanceFile = sysRoot + "/node/node%d/distance" - cpulistFile = sysRoot + "/node/node%d/cpulist" - cpuDriverFile = sysRoot + "/cpu/cpu%d/cpufreq/scaling_driver" - cpuMaxFile = sysRoot + "/cpu/cpu%d/cpufreq/cpuinfo_max_freq" - cpuCpccNominalFile = sysRoot + "/cpu/cpu%d/acpi_cppc/nominal_freq" - cpuIntelBaseFile = sysRoot + "/cpu/cpu%d/cpufreq/base_frequency" - cpuSocketFile = sysRoot + "/cpu/cpu%d/topology/physical_package_id" - cpuSiblingFile = sysRoot + "/cpu/cpu%d/topology/thread_siblings_list" - deviceFiles = "/sys/bus/pci/devices" + sysRoot = "/sys/devices/system" + nodeOnline = sysRoot + "/node/online" + cpuOnline = sysRoot + "/cpu/online" + distanceFile = sysRoot + "/node/node%d/distance" + cpulistFile = sysRoot + "/node/node%d/cpulist" + cpuMaxFile = sysRoot + "/cpu/cpu%d/cpufreq/cpuinfo_max_freq" + cpuBaseFile = sysRoot + "/cpu/cpu%d/cpufreq/base_frequency" + cpuSocketFile = sysRoot + "/cpu/cpu%d/topology/physical_package_id" + cpuSiblingFile = sysRoot + "/cpu/cpu%d/topology/thread_siblings_list" + deviceFiles = "/sys/bus/pci/devices" ) // pathReaderFn is a path reader function, injected into all value getters to @@ -133,8 +131,8 @@ func (*Sysfs) discoverCores(st *Topology, readerFunc pathReaderFn) { st.nodeIDs = idset.From[hw.NodeID]([]hw.NodeID{0}) const node = 0 const socket = 0 - - base, cpuMax := discoverCoreSpeeds(core, readerFunc) + cpuMax, _ := getNumeric[hw.KHz](cpuMaxFile, 64, readerFunc, core) + base, _ := getNumeric[hw.KHz](cpuBaseFile, 64, readerFunc, core) st.insert(node, socket, core, Performance, cpuMax, base) st.Nodes = st.nodeIDs.Slice() return nil @@ -151,8 +149,9 @@ func (*Sysfs) discoverCores(st *Topology, readerFunc pathReaderFn) { _ = cores.ForEach(func(core hw.CoreID) error { // best effort, zero values are defaults socket, _ := getNumeric[hw.SocketID](cpuSocketFile, 8, readerFunc, core) + cpuMax, _ := getNumeric[hw.KHz](cpuMaxFile, 64, readerFunc, core) + base, _ := getNumeric[hw.KHz](cpuBaseFile, 64, readerFunc, core) siblings, _ := getIDSet[hw.CoreID](cpuSiblingFile, readerFunc, core) - base, cpuMax := discoverCoreSpeeds(core, readerFunc) // if we get an incorrect core number, this means we're not getting the right // data from SysFS. In this case we bail and set default values. @@ -168,28 +167,6 @@ func (*Sysfs) discoverCores(st *Topology, readerFunc pathReaderFn) { } } -func discoverCoreSpeeds(core hw.CoreID, readerFunc pathReaderFn) (hw.KHz, hw.KHz) { - baseSpeed := hw.KHz(0) - maxSpeed := hw.KHz(0) - - driver, _ := getString(cpuDriverFile, readerFunc, core) - - switch driver { - case "acpi-cpufreq": - // Indicates the highest sustained performance level of the processor - baseSpeedMHz, _ := getNumeric[hw.MHz](cpuCpccNominalFile, 64, readerFunc, core) - baseSpeed = baseSpeedMHz.KHz() - default: - // COMPAT(1.9.x): while the `base_frequency` file is specific to the `intel_pstate` scaling driver, we should - // preserve the default while we may uncover more scaling driver specific implementations. - baseSpeed, _ = getNumeric[hw.KHz](cpuIntelBaseFile, 64, readerFunc, core) - } - - maxSpeed, _ = getNumeric[hw.KHz](cpuMaxFile, 64, readerFunc, core) - - return baseSpeed, maxSpeed -} - func getIDSet[T idset.ID](path string, readerFunc pathReaderFn, args ...any) (*idset.Set[T], error) { path = fmt.Sprintf(path, args...) s, err := readerFunc(path) diff --git a/client/lib/numalib/detect_linux_test.go b/client/lib/numalib/detect_linux_test.go index ceffd02c5c2..e253cacb622 100644 --- a/client/lib/numalib/detect_linux_test.go +++ b/client/lib/numalib/detect_linux_test.go @@ -68,37 +68,6 @@ func goodSysData(path string) ([]byte, error) { }[path], nil } -func goodSysDataAMD(path string) ([]byte, error) { - return map[string][]byte{ - "/sys/devices/system/node/online": []byte("0-1"), - "/sys/devices/system/cpu/online": []byte("0-3"), - "/sys/devices/system/node/node0/distance": []byte("10"), - "/sys/devices/system/node/node0/cpulist": []byte("0-3"), - "/sys/devices/system/node/node1/distance": []byte("10"), - "/sys/devices/system/node/node1/cpulist": []byte("0-3"), - "/sys/devices/system/cpu/cpu0/acpi_cppc/nominal_freq": []byte("2450"), - "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq": []byte("3500000"), - "/sys/devices/system/cpu/cpu0/cpufreq/scaling_driver": []byte("acpi-cpufreq"), - "/sys/devices/system/cpu/cpu0/topology/physical_package_id": []byte("0"), - "/sys/devices/system/cpu/cpu0/topology/thread_siblings_list": []byte("0,2"), - "/sys/devices/system/cpu/cpu1/acpi_cppc/nominal_freq": []byte("2450"), - "/sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_max_freq": []byte("3500000"), - "/sys/devices/system/cpu/cpu1/cpufreq/scaling_driver": []byte("acpi-cpufreq"), - "/sys/devices/system/cpu/cpu1/topology/physical_package_id": []byte("0"), - "/sys/devices/system/cpu/cpu1/topology/thread_siblings_list": []byte("1,3"), - "/sys/devices/system/cpu/cpu2/acpi_cppc/nominal_freq": []byte("2450"), - "/sys/devices/system/cpu/cpu2/cpufreq/cpuinfo_max_freq": []byte("3500000"), - "/sys/devices/system/cpu/cpu2/cpufreq/scaling_driver": []byte("acpi-cpufreq"), - "/sys/devices/system/cpu/cpu2/topology/physical_package_id": []byte("0"), - "/sys/devices/system/cpu/cpu2/topology/thread_siblings_list": []byte("0,2"), - "/sys/devices/system/cpu/cpu3/acpi_cppc/nominal_freq": []byte("2450"), - "/sys/devices/system/cpu/cpu3/cpufreq/cpuinfo_max_freq": []byte("3500000"), - "/sys/devices/system/cpu/cpu3/cpufreq/scaling_driver": []byte("acpi-cpufreq"), - "/sys/devices/system/cpu/cpu3/topology/physical_package_id": []byte("0"), - "/sys/devices/system/cpu/cpu3/topology/thread_siblings_list": []byte("1,3"), - }[path], nil -} - func TestSysfs_discoverOnline(t *testing.T) { st := MockTopology(&idset.Set[hw.NodeID]{}, SLIT{}, []Core{}) goodIDSet := idset.From[hw.NodeID]([]uint8{0, 1}) @@ -226,44 +195,6 @@ func TestSysfs_discoverCores(t *testing.T) { }, }, }}, - {"two nodes and good sys AMD data", twoNodes, goodSysDataAMD, &Topology{ - nodeIDs: twoNodes, - Nodes: twoNodes.Slice(), - Cores: []Core{ - { - SocketID: 1, - NodeID: 0, - ID: 0, - Grade: Performance, - BaseSpeed: 2450, - MaxSpeed: 3500, - }, - { - SocketID: 1, - NodeID: 0, - ID: 1, - Grade: Performance, - BaseSpeed: 2450, - MaxSpeed: 3500, - }, - { - SocketID: 1, - NodeID: 0, - ID: 2, - Grade: Performance, - BaseSpeed: 2450, - MaxSpeed: 3500, - }, - { - SocketID: 1, - NodeID: 0, - ID: 3, - Grade: Performance, - BaseSpeed: 2450, - MaxSpeed: 3500, - }, - }, - }}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { diff --git a/client/lib/numalib/hw/speeds.go b/client/lib/numalib/hw/speeds.go index c3b1a029253..23bd010a86c 100644 --- a/client/lib/numalib/hw/speeds.go +++ b/client/lib/numalib/hw/speeds.go @@ -16,10 +16,6 @@ func (khz KHz) MHz() MHz { return MHz(khz / 1000) } -func (mhz MHz) KHz() KHz { - return KHz(mhz * 1000) -} - func (khz KHz) String() string { return strconv.FormatUint(uint64(khz.MHz()), 10) } diff --git a/dev/hooks/pre-push b/dev/hooks/pre-push index 2a62a40f335..0f6cc35f4be 100755 --- a/dev/hooks/pre-push +++ b/dev/hooks/pre-push @@ -31,7 +31,6 @@ if [ -f version/version_ent.go ]; then fi # do not push directly to main, stable-*, release/* -# do not push Enterprise tags # ==================== while read local_ref local_sha remote_ref remote_sha do @@ -46,13 +45,5 @@ do if echo "$remote_ref"|grep -q 'refs/heads/release/.*'; then fail "refusing to push directly to a branch prefixed \`release/\`" fi - - if echo "$remote_ref" | grep -q 'refs/tags/v.*\+ent'; then - fail "refusing to push Nomad Enterprise tag" - fi - - if echo "$remote_ref" | grep -q 'refs/tags/v.*\+pro'; then - fail "refusing to push Nomad Enterprise (pro) tag" - fi - done + diff --git a/drivers/shared/executor/executor_test.go b/drivers/shared/executor/executor_test.go index 6c21a9a9a9f..a0e17e66696 100644 --- a/drivers/shared/executor/executor_test.go +++ b/drivers/shared/executor/executor_test.go @@ -1,7 +1,7 @@ // Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: MPL-2.0 -//go:build linux +//go:build !windows package executor diff --git a/e2e/allocexec/docker_exec_test.go b/e2e/allocexec/docker_exec_test.go index 17c165af4ba..2956d700d81 100644 --- a/e2e/allocexec/docker_exec_test.go +++ b/e2e/allocexec/docker_exec_test.go @@ -7,7 +7,6 @@ import ( "archive/tar" "bytes" "context" - "fmt" "strings" "testing" "time" @@ -28,14 +27,13 @@ func TestDockerAllocExec(t *testing.T) { } func testDockerExecStdin(t *testing.T) { - sub, cleanup := jobs3.Submit(t, "./input/sleepytar.hcl") + _, cleanup := jobs3.Submit(t, "./input/sleepytar.hcl") t.Cleanup(cleanup) client, err := nomadapi.NewClient(nomadapi.DefaultConfig()) must.NoError(t, err) - filter := fmt.Sprintf("JobID == \"%s\"", sub.JobID()) - allocations, _, err := client.Allocations().List(&nomadapi.QueryOptions{Filter: filter}) + allocations, _, err := client.Allocations().List(nil) must.NoError(t, err) must.SliceLen(t, 1, allocations) @@ -87,7 +85,7 @@ func testDockerExecStdin(t *testing.T) { nil, nil, ) - must.NoError(t, err, must.Sprintf("error executing command inside the container: %v", err)) + must.NoError(t, err) must.Zero(t, exitCode) // check the output of tar diff --git a/e2e/terraform/README.md b/e2e/terraform/README.md index a5785654557..b7d77a22bde 100644 --- a/e2e/terraform/README.md +++ b/e2e/terraform/README.md @@ -55,26 +55,18 @@ client_count_ubuntu_jammy_amd64 = "4" client_count_windows_2016_amd64 = "1" ``` -You will also need a Consul Enterprise license file and a Nomad Enterprise license file. +You will also need a Consul Enterprise license file. Optionally, edit the `nomad_local_binary` variable in the `terraform.tfvars` file to change the path to the local binary of -Nomad you'd like to upload, but keep in mind it has to match the OS and the CPU architecture of the nodes (amd64 linux). +Nomad you'd like to upload. Run Terraform apply to deploy the infrastructure: ```sh cd e2e/terraform/ terraform init -terraform apply -var="consul_license=$(cat full_path_to_consul.hclic)" -var="nomad_license=$(cat full_path_to_nomad.hclic)" -``` - -Alternative you can also run `make apply_full` from the terraform directory: - -``` -export NOMAD_LICENSE_PATH=./nomad.hclic -export CONSUL_LICENSE_PATH=./consul.hclic -make apply_full +terraform apply ``` > Note: You will likely see "Connection refused" or "Permission denied" errors diff --git a/e2e/terraform/compute.tf b/e2e/terraform/compute.tf index 9788ae17dbf..af4254825a9 100644 --- a/e2e/terraform/compute.tf +++ b/e2e/terraform/compute.tf @@ -39,8 +39,6 @@ resource "aws_instance" "client_ubuntu_jammy_amd64" { } } - - resource "aws_instance" "client_windows_2016_amd64" { ami = data.aws_ami.windows_2016_amd64[0].image_id instance_type = var.instance_type @@ -50,7 +48,7 @@ resource "aws_instance" "client_windows_2016_amd64" { iam_instance_profile = data.aws_iam_instance_profile.nomad_e2e_cluster.name availability_zone = var.availability_zone - user_data = file("${path.module}/userdata/windows-2016.ps1") + user_data = file("${path.root}/userdata/windows-2016.ps1") # Instance tags tags = { diff --git a/e2e/terraform/consul-clients.tf b/e2e/terraform/consul-clients.tf index 2d6501c9600..33a59e8cb42 100644 --- a/e2e/terraform/consul-clients.tf +++ b/e2e/terraform/consul-clients.tf @@ -48,7 +48,7 @@ resource "local_sensitive_file" "consul_agents_cert" { resource "random_uuid" "consul_agent_token" {} resource "local_sensitive_file" "consul_agent_config_file" { - content = templatefile("${path.module}/provision-nomad/etc/consul.d/clients.hcl", { + content = templatefile("etc/consul.d/clients.hcl", { token = "${random_uuid.consul_agent_token.result}" autojoin_value = "auto-join-${local.random_name}" }) @@ -61,7 +61,7 @@ resource "local_sensitive_file" "consul_agent_config_file" { resource "random_uuid" "consul_token_for_nomad" {} resource "local_sensitive_file" "nomad_client_config_for_consul" { - content = templatefile("${path.module}/provision-nomad/etc/nomad.d/client-consul.hcl", { + content = templatefile("etc/nomad.d/client-consul.hcl", { token = "${random_uuid.consul_token_for_nomad.result}" client_service_name = "client-${local.random_name}" server_service_name = "server-${local.random_name}" @@ -71,7 +71,7 @@ resource "local_sensitive_file" "nomad_client_config_for_consul" { } resource "local_sensitive_file" "nomad_server_config_for_consul" { - content = templatefile("${path.module}/provision-nomad/etc/nomad.d/server-consul.hcl", { + content = templatefile("etc/nomad.d/server-consul.hcl", { token = "${random_uuid.consul_token_for_nomad.result}" client_service_name = "client-${local.random_name}" server_service_name = "server-${local.random_name}" diff --git a/e2e/terraform/consul-servers.tf b/e2e/terraform/consul-servers.tf index a0fbfdb98e2..eaffbc65697 100644 --- a/e2e/terraform/consul-servers.tf +++ b/e2e/terraform/consul-servers.tf @@ -15,7 +15,7 @@ resource "local_sensitive_file" "consul_initial_management_token" { } resource "local_sensitive_file" "consul_server_config_file" { - content = templatefile("${path.module}/provision-nomad/etc/consul.d/servers.hcl", { + content = templatefile("etc/consul.d/servers.hcl", { management_token = "${random_uuid.consul_initial_management_token.result}" token = "${random_uuid.consul_agent_token.result}" nomad_token = "${random_uuid.consul_token_for_nomad.result}" @@ -69,7 +69,7 @@ resource "local_sensitive_file" "consul_server_cert" { # if consul_license is unset, it'll be a harmless empty license file resource "local_sensitive_file" "consul_environment" { - content = templatefile("${path.module}/provision-nomad/etc/consul.d/.environment", { + content = templatefile("etc/consul.d/.environment", { license = var.consul_license }) filename = "uploads/shared/consul.d/.environment" @@ -117,7 +117,7 @@ resource "null_resource" "upload_consul_server_configs" { destination = "/tmp/consul_server.hcl" } provisioner "file" { - source = "${path.module}/provision-nomad/etc/consul.d/consul-server.service" + source = "etc/consul.d/consul-server.service" destination = "/tmp/consul.service" } } diff --git a/e2e/terraform/ecs.tf b/e2e/terraform/ecs.tf index 98ea555548d..9c1c27e72ca 100644 --- a/e2e/terraform/ecs.tf +++ b/e2e/terraform/ecs.tf @@ -8,7 +8,7 @@ resource "aws_ecs_cluster" "nomad_rtd_e2e" { resource "aws_ecs_task_definition" "nomad_rtd_e2e" { family = "nomad-rtd-e2e" - container_definitions = file("${path.module}/ecs-task.json") + container_definitions = file("ecs-task.json") # Don't need a network for e2e tests network_mode = "awsvpc" diff --git a/e2e/terraform/provision-nomad/etc/acls/consul/consul-agent-policy.hcl b/e2e/terraform/etc/acls/consul/consul-agent-policy.hcl similarity index 100% rename from e2e/terraform/provision-nomad/etc/acls/consul/consul-agent-policy.hcl rename to e2e/terraform/etc/acls/consul/consul-agent-policy.hcl diff --git a/e2e/terraform/provision-nomad/etc/acls/consul/nomad-client-policy.hcl b/e2e/terraform/etc/acls/consul/nomad-client-policy.hcl similarity index 100% rename from e2e/terraform/provision-nomad/etc/acls/consul/nomad-client-policy.hcl rename to e2e/terraform/etc/acls/consul/nomad-client-policy.hcl diff --git a/e2e/terraform/provision-nomad/etc/acls/consul/nomad-server-policy.hcl b/e2e/terraform/etc/acls/consul/nomad-server-policy.hcl similarity index 100% rename from e2e/terraform/provision-nomad/etc/acls/consul/nomad-server-policy.hcl rename to e2e/terraform/etc/acls/consul/nomad-server-policy.hcl diff --git a/e2e/terraform/provision-nomad/etc/acls/vault/nomad-policy.hcl b/e2e/terraform/etc/acls/vault/nomad-policy.hcl similarity index 100% rename from e2e/terraform/provision-nomad/etc/acls/vault/nomad-policy.hcl rename to e2e/terraform/etc/acls/vault/nomad-policy.hcl diff --git a/e2e/terraform/provision-nomad/etc/consul.d/.environment b/e2e/terraform/etc/consul.d/.environment similarity index 100% rename from e2e/terraform/provision-nomad/etc/consul.d/.environment rename to e2e/terraform/etc/consul.d/.environment diff --git a/e2e/terraform/provision-nomad/etc/consul.d/clients.hcl b/e2e/terraform/etc/consul.d/clients.hcl similarity index 100% rename from e2e/terraform/provision-nomad/etc/consul.d/clients.hcl rename to e2e/terraform/etc/consul.d/clients.hcl diff --git a/e2e/terraform/provision-nomad/etc/consul.d/consul-server.service b/e2e/terraform/etc/consul.d/consul-server.service similarity index 100% rename from e2e/terraform/provision-nomad/etc/consul.d/consul-server.service rename to e2e/terraform/etc/consul.d/consul-server.service diff --git a/e2e/terraform/provision-nomad/etc/consul.d/consul.service b/e2e/terraform/etc/consul.d/consul.service similarity index 100% rename from e2e/terraform/provision-nomad/etc/consul.d/consul.service rename to e2e/terraform/etc/consul.d/consul.service diff --git a/e2e/terraform/provision-nomad/etc/consul.d/servers.hcl b/e2e/terraform/etc/consul.d/servers.hcl similarity index 100% rename from e2e/terraform/provision-nomad/etc/consul.d/servers.hcl rename to e2e/terraform/etc/consul.d/servers.hcl diff --git a/e2e/terraform/provision-nomad/etc/nomad.d/.environment b/e2e/terraform/etc/nomad.d/.environment similarity index 100% rename from e2e/terraform/provision-nomad/etc/nomad.d/.environment rename to e2e/terraform/etc/nomad.d/.environment diff --git a/e2e/terraform/provision-nomad/etc/nomad.d/base.hcl b/e2e/terraform/etc/nomad.d/base.hcl similarity index 100% rename from e2e/terraform/provision-nomad/etc/nomad.d/base.hcl rename to e2e/terraform/etc/nomad.d/base.hcl diff --git a/e2e/terraform/provision-nomad/etc/nomad.d/client-consul.hcl b/e2e/terraform/etc/nomad.d/client-consul.hcl similarity index 100% rename from e2e/terraform/provision-nomad/etc/nomad.d/client-consul.hcl rename to e2e/terraform/etc/nomad.d/client-consul.hcl diff --git a/e2e/terraform/provision-nomad/etc/nomad.d/client-linux-0.hcl b/e2e/terraform/etc/nomad.d/client-linux-0.hcl similarity index 100% rename from e2e/terraform/provision-nomad/etc/nomad.d/client-linux-0.hcl rename to e2e/terraform/etc/nomad.d/client-linux-0.hcl diff --git a/e2e/terraform/provision-nomad/etc/nomad.d/client-linux-1.hcl b/e2e/terraform/etc/nomad.d/client-linux-1.hcl similarity index 100% rename from e2e/terraform/provision-nomad/etc/nomad.d/client-linux-1.hcl rename to e2e/terraform/etc/nomad.d/client-linux-1.hcl diff --git a/e2e/terraform/provision-nomad/etc/nomad.d/client-linux-2.hcl b/e2e/terraform/etc/nomad.d/client-linux-2.hcl similarity index 100% rename from e2e/terraform/provision-nomad/etc/nomad.d/client-linux-2.hcl rename to e2e/terraform/etc/nomad.d/client-linux-2.hcl diff --git a/e2e/terraform/provision-nomad/etc/nomad.d/client-linux-3.hcl b/e2e/terraform/etc/nomad.d/client-linux-3.hcl similarity index 100% rename from e2e/terraform/provision-nomad/etc/nomad.d/client-linux-3.hcl rename to e2e/terraform/etc/nomad.d/client-linux-3.hcl diff --git a/e2e/terraform/provision-nomad/etc/nomad.d/client-linux.hcl b/e2e/terraform/etc/nomad.d/client-linux.hcl similarity index 100% rename from e2e/terraform/provision-nomad/etc/nomad.d/client-linux.hcl rename to e2e/terraform/etc/nomad.d/client-linux.hcl diff --git a/e2e/terraform/provision-nomad/etc/nomad.d/client-windows.hcl b/e2e/terraform/etc/nomad.d/client-windows.hcl similarity index 100% rename from e2e/terraform/provision-nomad/etc/nomad.d/client-windows.hcl rename to e2e/terraform/etc/nomad.d/client-windows.hcl diff --git a/e2e/terraform/provision-nomad/etc/nomad.d/index.hcl b/e2e/terraform/etc/nomad.d/index.hcl similarity index 100% rename from e2e/terraform/provision-nomad/etc/nomad.d/index.hcl rename to e2e/terraform/etc/nomad.d/index.hcl diff --git a/e2e/terraform/provision-nomad/etc/nomad.d/nomad-client.service b/e2e/terraform/etc/nomad.d/nomad-client.service similarity index 100% rename from e2e/terraform/provision-nomad/etc/nomad.d/nomad-client.service rename to e2e/terraform/etc/nomad.d/nomad-client.service diff --git a/e2e/terraform/provision-nomad/etc/nomad.d/nomad-server.service b/e2e/terraform/etc/nomad.d/nomad-server.service similarity index 100% rename from e2e/terraform/provision-nomad/etc/nomad.d/nomad-server.service rename to e2e/terraform/etc/nomad.d/nomad-server.service diff --git a/e2e/terraform/provision-nomad/etc/nomad.d/server-consul.hcl b/e2e/terraform/etc/nomad.d/server-consul.hcl similarity index 100% rename from e2e/terraform/provision-nomad/etc/nomad.d/server-consul.hcl rename to e2e/terraform/etc/nomad.d/server-consul.hcl diff --git a/e2e/terraform/provision-nomad/etc/nomad.d/server-linux.hcl b/e2e/terraform/etc/nomad.d/server-linux.hcl similarity index 100% rename from e2e/terraform/provision-nomad/etc/nomad.d/server-linux.hcl rename to e2e/terraform/etc/nomad.d/server-linux.hcl diff --git a/e2e/terraform/provision-nomad/etc/nomad.d/tls.hcl b/e2e/terraform/etc/nomad.d/tls.hcl similarity index 100% rename from e2e/terraform/provision-nomad/etc/nomad.d/tls.hcl rename to e2e/terraform/etc/nomad.d/tls.hcl diff --git a/e2e/terraform/provision-nomad/etc/nomad.d/vault.hcl b/e2e/terraform/etc/nomad.d/vault.hcl similarity index 100% rename from e2e/terraform/provision-nomad/etc/nomad.d/vault.hcl rename to e2e/terraform/etc/nomad.d/vault.hcl diff --git a/e2e/terraform/hcp_vault.tf b/e2e/terraform/hcp_vault.tf index 4bfbe9efcb3..b148f25ef99 100644 --- a/e2e/terraform/hcp_vault.tf +++ b/e2e/terraform/hcp_vault.tf @@ -16,7 +16,7 @@ data "hcp_vault_cluster" "e2e_shared_vault" { # between concurrent E2E clusters resource "vault_policy" "nomad" { name = "${local.random_name}-nomad-server" - policy = templatefile("${path.module}/provision-nomad/etc/acls/vault/nomad-policy.hcl", { + policy = templatefile("${path.root}/etc/acls/vault/nomad-policy.hcl", { role = "nomad-tasks-${local.random_name}" }) } @@ -42,7 +42,7 @@ resource "vault_token_auth_backend_role" "nomad_cluster" { # Nomad agent configuration for Vault resource "local_sensitive_file" "nomad_config_for_vault" { - content = templatefile("${path.module}/provision-nomad/etc/nomad.d/vault.hcl", { + content = templatefile("etc/nomad.d/vault.hcl", { token = vault_token.nomad.client_token url = data.hcp_vault_cluster.e2e_shared_vault.vault_private_endpoint_url namespace = var.hcp_vault_namespace diff --git a/e2e/terraform/nomad-acls.tf b/e2e/terraform/nomad-acls.tf index b5cce557f3e..fbe3d7651b9 100644 --- a/e2e/terraform/nomad-acls.tf +++ b/e2e/terraform/nomad-acls.tf @@ -23,7 +23,7 @@ resource "null_resource" "bootstrap_nomad_acls" { data "local_sensitive_file" "nomad_token" { depends_on = [null_resource.bootstrap_nomad_acls] - filename = "${path.module}/keys/nomad_root_token" + filename = "${path.root}/keys/nomad_root_token" } # push the token out to the servers for humans to use. @@ -36,8 +36,8 @@ locals { cat < /tmp/resolv.conf nameserver 127.0.0.1 nameserver $DOCKER_BRIDGE_IP_ADDRESS @@ -30,7 +30,7 @@ cp /tmp/resolv.conf /etc/resolv.conf # need to get the interface for dnsmasq config so that we can # accomodate both "predictable" and old-style interface names -IFACE=$(ip route | grep default | awk '{print $5}') +IFACE=$(/usr/local/bin/sockaddr eval 'GetDefaultInterfaces | attr "Name"') cat < /tmp/dnsmasq port=53 diff --git a/e2e/terraform/packer/ubuntu-jammy-amd64/setup.sh b/e2e/terraform/packer/ubuntu-jammy-amd64/setup.sh index 87d556e272a..e3646693d9f 100755 --- a/e2e/terraform/packer/ubuntu-jammy-amd64/setup.sh +++ b/e2e/terraform/packer/ubuntu-jammy-amd64/setup.sh @@ -36,6 +36,11 @@ sudo apt-get install -y \ curl -o /tmp/hc-install.zip https://releases.hashicorp.com/hc-install/0.9.0/hc-install_0.9.0_linux_amd64.zip sudo unzip -d /usr/local/bin /tmp/hc-install.zip +# Install sockaddr +aws s3 cp "s3://nomad-team-dev-test-binaries/tools/sockaddr_linux_amd64" /tmp/sockaddr +sudo mv /tmp/sockaddr /usr/local/bin +sudo chmod +x /usr/local/bin/sockaddr +sudo chown root:root /usr/local/bin/sockaddr # Disable the firewall sudo ufw disable || echo "ufw not installed" @@ -164,3 +169,14 @@ echo "Updating boot parameters" # enable cgroup_memory and swap sudo sed -i 's/GRUB_CMDLINE_LINUX="[^"]*/& cgroup_enable=memory swapaccount=1/' /etc/default/grub sudo update-grub + +echo "Configuring user shell" +sudo tee -a /home/ubuntu/.bashrc << 'EOF' +IP_ADDRESS=$(/usr/local/bin/sockaddr eval 'GetPrivateIP') +export CONSUL_RPC_ADDR=$IP_ADDRESS:8400 +export CONSUL_HTTP_ADDR=$IP_ADDRESS:8500 +export VAULT_ADDR=http://$IP_ADDRESS:8200 +export NOMAD_ADDR=http://$IP_ADDRESS:4646 +export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64/bin + +EOF diff --git a/e2e/terraform/provision-nomad/install-linux.tf b/e2e/terraform/provision-nomad/install-linux.tf index fd85b8bb367..1c25683d188 100644 --- a/e2e/terraform/provision-nomad/install-linux.tf +++ b/e2e/terraform/provision-nomad/install-linux.tf @@ -2,7 +2,7 @@ # SPDX-License-Identifier: BUSL-1.1 resource "local_sensitive_file" "nomad_systemd_unit_file" { - content = templatefile("${path.module}/etc/nomad.d/nomad-${var.role}.service", {}) + content = templatefile("etc/nomad.d/nomad-${var.role}.service", {}) filename = "${local.upload_dir}/nomad.d/nomad.service" file_permission = "0600" } diff --git a/e2e/terraform/provision-nomad/main.tf b/e2e/terraform/provision-nomad/main.tf index 43e8b5c1b70..342ccd2fa36 100644 --- a/e2e/terraform/provision-nomad/main.tf +++ b/e2e/terraform/provision-nomad/main.tf @@ -4,12 +4,13 @@ locals { upload_dir = "uploads/${var.instance.public_ip}" - indexed_config_path = fileexists("${path.module}/etc/nomad.d/${var.role}-${var.platform}-${var.index}.hcl") ? "${path.module}/etc/nomad.d/${var.role}-${var.platform}-${var.index}.hcl" : "${path.module}/etc/nomad.d/index.hcl" + indexed_config_path = fileexists("etc/nomad.d/${var.role}-${var.platform}-${var.index}.hcl") ? "etc/nomad.d/${var.role}-${var.platform}-${var.index}.hcl" : "etc/nomad.d/index.hcl" + } # if nomad_license is unset, it'll be a harmless empty license file resource "local_sensitive_file" "nomad_environment" { - content = templatefile("${path.module}/etc/nomad.d/.environment", { + content = templatefile("etc/nomad.d/.environment", { license = var.nomad_license }) filename = "${local.upload_dir}/nomad.d/.environment" @@ -17,6 +18,7 @@ resource "local_sensitive_file" "nomad_environment" { } resource "local_sensitive_file" "nomad_base_config" { + data_dir = var.platform != "windows" ? "/opt/nomad/data" : "C://opt/nomad/data" content = templatefile("${path.module}/etc/nomad.d/base.hcl", { data_dir = var.platform != "windows" ? "/opt/nomad/data" : "C://opt/nomad/data" nomad_region = var.nomad_region @@ -26,7 +28,7 @@ resource "local_sensitive_file" "nomad_base_config" { } resource "local_sensitive_file" "nomad_role_config" { - content = templatefile("${path.module}/etc/nomad.d/${var.role}-${var.platform}.hcl", { + content = templatefile("etc/nomad.d/${var.role}-${var.platform}.hcl", { aws_region = var.aws_region aws_kms_key_id = var.aws_kms_key_id }) @@ -41,7 +43,7 @@ resource "local_sensitive_file" "nomad_indexed_config" { } resource "local_sensitive_file" "nomad_tls_config" { - content = templatefile("${path.module}/etc/nomad.d/tls.hcl", {}) + content = templatefile("etc/nomad.d/tls.hcl", {}) filename = "${local.upload_dir}/nomad.d/tls.hcl" file_permission = "0600" } @@ -75,7 +77,7 @@ resource "null_resource" "upload_consul_configs" { destination = "/tmp/consul_client.hcl" } provisioner "file" { - source = "${path.module}/etc/consul.d/consul.service" + source = "etc/consul.d/consul.service" destination = "/tmp/consul.service" } } diff --git a/e2e/ui/run.sh b/e2e/ui/run.sh index a2f5980cef1..a976393c786 100755 --- a/e2e/ui/run.sh +++ b/e2e/ui/run.sh @@ -33,7 +33,7 @@ EOF } -IMAGE="mcr.microsoft.com/playwright:v1.49.0-jammy" +IMAGE="mcr.microsoft.com/playwright:v1.48.0-noble" pushd $(dirname "${BASH_SOURCE[0]}") > /dev/null run_tests() { diff --git a/nomad/periodic_test.go b/nomad/periodic_test.go index 62a9dd68291..1718c434ca9 100644 --- a/nomad/periodic_test.go +++ b/nomad/periodic_test.go @@ -19,7 +19,6 @@ import ( "github.com/hashicorp/nomad/nomad/mock" "github.com/hashicorp/nomad/nomad/structs" "github.com/hashicorp/nomad/testutil" - "github.com/shoenig/test/must" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -89,13 +88,6 @@ func (m *MockJobEvalDispatcher) dispatchedJobs(parent *structs.Job) []*structs.J return jobs } -func (m *MockJobEvalDispatcher) hasJob(id structs.NamespacedID) bool { - m.lock.Lock() - defer m.lock.Unlock() - _, ok := m.Jobs[id] - return ok -} - type times []time.Time func (t times) Len() int { return len(t) } @@ -270,32 +262,39 @@ func TestPeriodicDispatch_Add_TriggersUpdate(t *testing.T) { job := testPeriodicJob(time.Now().Add(10 * time.Second)) // Add it. - must.NoError(t, p.Add(job)) + if err := p.Add(job); err != nil { + t.Fatalf("Add failed %v", err) + } // Update it to be sooner and re-add. expected := time.Now().Round(1 * time.Second).Add(1 * time.Second) - job = job.Copy() job.Periodic.Spec = fmt.Sprintf("%d", expected.Unix()) - must.NoError(t, p.Add(job)) + if err := p.Add(job); err != nil { + t.Fatalf("Add failed %v", err) + } // Check that nothing is created. tuple := structs.NamespacedID{ ID: job.ID, Namespace: job.Namespace, } - must.False(t, m.hasJob(tuple), - must.Sprint("periodic dispatcher created eval too early")) + if _, ok := m.Jobs[tuple]; ok { + t.Fatalf("periodic dispatcher created eval at the wrong time") + } time.Sleep(2 * time.Second) // Check that job was launched correctly. times, err := m.LaunchTimes(p, job.Namespace, job.ID) - must.NoError(t, err, - must.Sprint("failed to get launch times for job")) - must.Len(t, 1, times, - must.Sprint("incorrect number of launch times for job")) - must.Eq(t, expected, times[0], - must.Sprint("periodic dispatcher created eval for wrong time")) + if err != nil { + t.Fatalf("failed to get launch times for job %q", job.ID) + } + if len(times) != 1 { + t.Fatalf("incorrect number of launch times for job %q", job.ID) + } + if times[0] != expected { + t.Fatalf("periodic dispatcher created eval for time %v; want %v", times[0], expected) + } } func TestPeriodicDispatch_Remove_Untracked(t *testing.T) { diff --git a/nomad/structs/acl.go b/nomad/structs/acl.go index eed00046fa8..b60c1c2f1aa 100644 --- a/nomad/structs/acl.go +++ b/nomad/structs/acl.go @@ -474,16 +474,6 @@ func (a *ACLToken) UnmarshalJSON(data []byte) (err error) { return nil } -func (a *ACLToken) Sanitize() *ACLToken { - if a == nil { - return nil - } - - out := a.Copy() - out.SecretID = "" - return out -} - // ACLRole is an abstraction for the ACL system which allows the grouping of // ACL policies into a single object. ACL tokens can be created and linked to // a role; the token then inherits all the permissions granted by the policies. diff --git a/nomad/structs/config/workload_id.go b/nomad/structs/config/workload_id.go index 5a3f92dbee2..872acd81ef9 100644 --- a/nomad/structs/config/workload_id.go +++ b/nomad/structs/config/workload_id.go @@ -12,7 +12,7 @@ import ( "github.com/hashicorp/nomad/helper/pointer" ) -// WorkloadIdentityConfig is the agent configuration block used to define +// WorkloadIdentityConfig is the agent configuraion block used to define // default workload identities. // // This based on the WorkloadIdentity struct from nomad/structs/workload_id.go diff --git a/nomad/structs/event.go b/nomad/structs/event.go index 466421d38a5..1eca62046f9 100644 --- a/nomad/structs/event.go +++ b/nomad/structs/event.go @@ -155,7 +155,8 @@ type ServiceRegistrationStreamEvent struct { // NewACLTokenEvent takes a token and creates a new ACLTokenEvent. It creates // a copy of the passed in ACLToken and empties out the copied tokens SecretID func NewACLTokenEvent(token *ACLToken) *ACLTokenEvent { - c := token.Sanitize() + c := token.Copy() + c.SecretID = "" return &ACLTokenEvent{ ACLToken: c, diff --git a/scripts/combine-ui-test-results.js b/scripts/combine-ui-test-results.js deleted file mode 100644 index 8d78f423cce..00000000000 --- a/scripts/combine-ui-test-results.js +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env node -/** - * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 - */ - -'use strict'; -const fs = require('fs'); - -const NUM_PARTITIONS = 4; - -function combineResults() { - const results = []; - let duration = 0; - let aggregateSummary = { total: 0, passed: 0, failed: 0 }; - - for (let i = 1; i <= NUM_PARTITIONS; i++) { - try { - const data = JSON.parse( - fs.readFileSync(`../test-results/test-results-${i}/test-results.json`).toString() - ); - results.push(...data.tests); - duration += data.duration; - aggregateSummary.total += data.summary.total; - aggregateSummary.passed += data.summary.passed; - aggregateSummary.failed += data.summary.failed; - } catch (err) { - console.error(`Error reading partition ${i}:`, err); - } - } - - const output = { - timestamp: new Date().toISOString(), - sha: process.env.GITHUB_SHA, - summary: { - total: aggregateSummary.total, - passed: aggregateSummary.passed, - failed: aggregateSummary.failed - }, - duration, - tests: results - }; - - fs.writeFileSync('../ui/combined-test-results.json', JSON.stringify(output, null, 2)); -} - -if (require.main === module) { - combineResults(); -} - -module.exports = combineResults; diff --git a/ui/app/controllers/jobs/job/index.js b/ui/app/controllers/jobs/job/index.js index 0479c0f7d01..220f8a82bf9 100644 --- a/ui/app/controllers/jobs/job/index.js +++ b/ui/app/controllers/jobs/job/index.js @@ -98,7 +98,6 @@ export default class IndexController extends Controller.extend( { id, namespace }, throttle = Ember.testing ? 0 : 2000 ) { - this.childJobs = []; while (true) { let params = { filter: `ParentID == "${id}"`, diff --git a/ui/app/index.html b/ui/app/index.html index df5eb739390..9d49fe8a579 100644 --- a/ui/app/index.html +++ b/ui/app/index.html @@ -24,7 +24,6 @@ {{content-for "body"}} - {{content-for "body-footer"}} diff --git a/ui/test-reporter.js b/ui/test-reporter.js deleted file mode 100644 index ddad7268714..00000000000 --- a/ui/test-reporter.js +++ /dev/null @@ -1,159 +0,0 @@ -/** - * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 - */ - -/* eslint-env node */ -/* eslint-disable no-console */ - -const fs = require('fs'); -const path = require('path'); - -class JsonReporter { - constructor(out, socket, config) { - this.out = out || process.stdout; - this.results = []; - - // Get output file from Testem config, which is set by the --json-report=path argument - this.outputFile = config?.fileOptions?.custom_report_file; - this.generateReport = !!this.outputFile; - - if (this.generateReport) { - console.log( - `[Reporter] Initializing with output file: ${this.outputFile}` - ); - - try { - fs.mkdirSync(path.dirname(this.outputFile), { recursive: true }); - - // Initialize the results file - fs.writeFileSync( - this.outputFile, - JSON.stringify( - { - summary: { total: 0, passed: 0, failed: 0 }, - timestamp: new Date().toISOString(), - tests: [], - }, - null, - 2 - ) - ); - console.log('[Reporter] Initialized results file'); - } catch (err) { - console.error('[Reporter] Error initializing results file:', err); - } - } else { - console.log('[Reporter] No report file configured, skipping JSON output'); - } - - process.on('SIGINT', () => { - console.log('[Reporter] Received SIGINT, finishing up...'); - this.finish(); - process.exit(0); - }); - - this.testCounter = 0; - this.startTime = Date.now(); - } - - filterLogs(logs) { - return logs.filter((log) => { - // Filter out token-related logs - if ( - log.text && - (log.text.includes('Accessor:') || - log.text.includes('log in with a JWT') || - log.text === 'TOKENS:' || - log.text === '=====================================') - ) { - return false; - } - - // Keep non-warning logs that aren't token-related - return log.type !== 'warn'; - }); - } - - report(prefix, data) { - if (!data || !data.name) { - console.log(`[Reporter] Skipping invalid test result: ${data.name}`); - return; - } - - this.testCounter++; - console.log(`[Reporter] Test #${this.testCounter}: ${data.name}`); - - const partitionMatch = data.name.match(/^Exam Partition (\d+) - (.*)/); - - const result = { - name: partitionMatch ? partitionMatch[2] : data.name.trim(), - partition: partitionMatch ? parseInt(partitionMatch[1], 10) : null, - browser: prefix, - passed: !data.failed, - duration: data.runDuration, - error: data.failed ? data.error : null, - logs: this.filterLogs(data.logs || []), - }; - - if (result.passed) { - console.log('- [PASS]'); - } else { - console.log('- [FAIL]'); - console.log('- Error:', result.error); - console.log('- Logs:', result.logs); - } - - this.results.push(result); - } - - writeCurrentResults() { - console.log('[Reporter] Writing current results...'); - try { - const passed = this.results.filter((r) => r.passed).length; - const failed = this.results.filter((r) => !r.passed).length; - const total = this.results.length; - const duration = Date.now() - this.startTime; - - const output = { - summary: { total, passed, failed }, - timestamp: new Date().toISOString(), - duration, - tests: this.results, - }; - - if (this.generateReport) { - fs.writeFileSync(this.outputFile, JSON.stringify(output, null, 2)); - } - - // Print a summary - console.log('\n[Reporter] Test Summary:'); - console.log(`- Total: ${total}`); - console.log(`- Passed: ${passed}`); - console.log(`- Failed: ${failed}`); - console.log(`- Duration: ${duration}ms`); - if (failed > 0) { - console.log('\n[Reporter] Failed Tests:'); - this.results - .filter((r) => !r.passed) - .forEach((r) => { - console.log(`❌ ${r.name}`); - if (r.error) { - console.error(r.error); - } - }); - } - - console.log('[Reporter] Successfully wrote results'); - } catch (err) { - console.error('[Reporter] Error writing results:', err); - } - } - finish() { - console.log('[Reporter] Finishing up...'); - this.writeCurrentResults(); - console.log('[Reporter] Done.'); - } -} - -module.exports = JsonReporter; diff --git a/ui/testem.js b/ui/testem.js index c937a5760fe..7d1869af9ef 100644 --- a/ui/testem.js +++ b/ui/testem.js @@ -3,24 +3,7 @@ * SPDX-License-Identifier: BUSL-1.1 */ -// @ts-check - 'use strict'; -const JsonReporter = require('./test-reporter'); - -/** - * Get the path for the test results file based on the command line arguments - * @returns {string} The path to the test results file - */ -const getReportPath = () => { - const jsonReportArg = process.argv.find((arg) => - arg.startsWith('--json-report=') - ); - if (jsonReportArg) { - return jsonReportArg.split('=')[1]; - } - return null; -}; const config = { test_page: 'tests/index.html?hidepassed', @@ -30,12 +13,6 @@ const config = { browser_start_timeout: 120, parallel: -1, framework: 'qunit', - reporter: JsonReporter, - custom_report_file: getReportPath(), - // NOTE: we output this property as custom_report_file instead of report_file. - // See https://github.com/testem/testem/issues/1073, report_file + custom reporter results in double output. - debug: true, - browser_args: { // New format in testem/master, but not in a release yet // Chrome: { diff --git a/ui/yarn.lock b/ui/yarn.lock index 0f681220c67..a5a125d817a 100644 --- a/ui/yarn.lock +++ b/ui/yarn.lock @@ -11237,9 +11237,9 @@ mute-stream@0.0.8: integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== nanoid@^3.3.7: - version "3.3.8" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf" - integrity sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w== + version "3.3.7" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" + integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== nanomatch@^1.2.9: version "1.2.13" diff --git a/website/content/docs/concepts/security.mdx b/website/content/docs/concepts/security.mdx index fdb707f1b1b..ac5f52ade99 100644 --- a/website/content/docs/concepts/security.mdx +++ b/website/content/docs/concepts/security.mdx @@ -9,7 +9,7 @@ description: >- authentication. --- -# Security Model +## Overview Nomad is a flexible workload orchestrator to deploy and manage any containerized or legacy application using a single, unified workflow. It can run diverse diff --git a/website/content/docs/enterprise/sentinel.mdx b/website/content/docs/enterprise/sentinel.mdx index 2ae87fe0cd9..30fcf3c5e18 100644 --- a/website/content/docs/enterprise/sentinel.mdx +++ b/website/content/docs/enterprise/sentinel.mdx @@ -5,7 +5,7 @@ description: >- Learn about Nomad Sentinel Policy Objects --- -# Sentinel +## Sentinel In Nomad Enterprise, operators can create Sentinel policies for fine-grained policy enforcement. Sentinel policies build on top of the ACL system and allow diff --git a/website/content/docs/job-specification/ui.mdx b/website/content/docs/job-specification/ui.mdx index b2fe276b662..c9792168b2d 100644 --- a/website/content/docs/job-specification/ui.mdx +++ b/website/content/docs/job-specification/ui.mdx @@ -46,5 +46,3 @@ job "docs" { # ... } ``` - -![Job UI links and description rendered in the Web UI](/img/nomad-ui-block.png) diff --git a/website/package-lock.json b/website/package-lock.json index 009d9319695..d15f7e408aa 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -13,7 +13,7 @@ "dart-linkcheck": "^2.0.15", "husky": "^9.0.7", "next": "14.0.4", - "prettier": "^3.4.1" + "prettier": "^3.2.4" }, "engines": { "node": ">=18.x <=20.x", @@ -9806,9 +9806,9 @@ } }, "node_modules/prettier": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.1.tgz", - "integrity": "sha512-G+YdqtITVZmOJje6QkXQWzl3fSfMxFwm1tjTyo9exhkmWSqC4Yhd1+lug++IlR2mvRVAxEDDWYkQdeSztajqgg==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.4.tgz", + "integrity": "sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" diff --git a/website/package.json b/website/package.json index dd77a403e0e..099e57a32f4 100644 --- a/website/package.json +++ b/website/package.json @@ -13,7 +13,7 @@ "dart-linkcheck": "^2.0.15", "husky": "^9.0.7", "next": "14.0.4", - "prettier": "^3.4.1" + "prettier": "^3.2.4" }, "scripts": { "build": "./scripts/website-build.sh", diff --git a/website/public/img/nomad-ui-block.png b/website/public/img/nomad-ui-block.png deleted file mode 100644 index f69a2169399..00000000000 Binary files a/website/public/img/nomad-ui-block.png and /dev/null differ