-
Notifications
You must be signed in to change notification settings - Fork 15
feat: Quality pack targets #277
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
Merged
lurtz
merged 13 commits into
eclipse-score:main
from
etas-contrib:feature/quality-pack-targets
Sep 10, 2026
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
97767df
docs: add component requirements for all 7 components
GabrielPinheiro7891 921722c
docs: wire quality-pack targets, code links and test links
GabrielPinheiro7891 7fc7786
Merge remote-tracking branch 'origin/main' into feature/quality-pack-…
GabrielPinheiro7891 716c734
docs: Simplify documentation and point to docs-as-code
GabrielPinheiro7891 c1f9b39
Merge remote-tracking branch 'origin/main' into feature/quality-pack-…
GabrielPinheiro7891 5f4abbf
ci: add workflow that comments traceability gate on PRs
GabrielPinheiro7891 8590671
docs: move quality pack instructions from docs/ to README
GabrielPinheiro7891 53850b1
docs: remove implementation-derived comp_req entries
GabrielPinheiro7891 f6e9d7e
Merge remote-tracking branch 'origin/main' into feature/quality-pack-…
GabrielPinheiro7891 fd12941
ci: add workflow that comments traceability gate on PRs
GabrielPinheiro7891 461ff90
ci: require quality_pack to pass before merge
GabrielPinheiro7891 775713d
Merge remote-tracking branch 'origin/main' into feature/quality-pack-…
GabrielPinheiro7891 c23da1e
ci(quality-pack): install Graphviz and fix publish workflow header
GabrielPinheiro7891 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,123 @@ | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
|
|
||
| # Waits for the CI workflow of a pull request, downloads the traceability gate | ||
| # artifact produced by quality_pack_comment.yml, and posts (or edits) a | ||
| # comment on the pull request with the gate summary and pass/fail status. | ||
| # | ||
| # Runs via workflow_run so that pull requests opened from forks — which get a | ||
| # read-only GITHUB_TOKEN and cannot write comments themselves — still get a | ||
| # comment posted by this workflow, which runs with the base repo's token. | ||
|
|
||
| name: Publish Quality Pack Comment | ||
|
|
||
| on: | ||
| workflow_run: | ||
| workflows: ["CI"] | ||
| types: | ||
| - completed | ||
|
|
||
| jobs: | ||
| quality-pack-comment: | ||
| name: Comment traceability gate on the pull request | ||
| if: github.event.workflow_run.event == 'pull_request' | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| actions: read # list + download the artifacts of the triggering workflow run | ||
| pull-requests: write # comment on the pull request | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| REPO: ${{ github.repository }} | ||
| RUN_ID: ${{ github.event.workflow_run.id }} | ||
| steps: | ||
| - name: Resolve pull request number | ||
| id: metadata | ||
| env: | ||
| HEAD_REPO_OWNER: ${{ github.event.workflow_run.head_repository.owner.login }} | ||
| PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number || '' }} | ||
| REF_NAME: ${{ github.event.workflow_run.head_branch }} | ||
| run: | | ||
| set -euo pipefail | ||
|
|
||
| if [[ "$PR_NUMBER" == "null" ]]; then | ||
| PR_NUMBER="" | ||
| fi | ||
|
|
||
| # fork-origin workflow_run payloads do not include pull_requests[] | ||
| if [[ -z "$PR_NUMBER" && -n "$HEAD_REPO_OWNER" && -n "$REF_NAME" ]]; then | ||
| PR_NUMBER="$(gh api \ | ||
| "repos/${REPO}/pulls?state=all&head=${HEAD_REPO_OWNER}:${REF_NAME}" \ | ||
| --jq '.[0].number // empty' || true)" | ||
| fi | ||
|
|
||
| if [[ -z "$PR_NUMBER" ]]; then | ||
| echo "Could not determine PR number for pull_request event." >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "pr_number=$PR_NUMBER" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Download quality pack artifact | ||
| id: download | ||
| continue-on-error: true | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: quality-pack-metrics | ||
| path: _quality_pack_dl | ||
| github-token: ${{ github.token }} | ||
| repository: ${{ github.repository }} | ||
| run-id: ${{ github.event.workflow_run.id }} | ||
|
|
||
| - name: Render comment body | ||
| id: render | ||
| run: | | ||
| set -euo pipefail | ||
|
|
||
| GATE_FILE=_quality_pack_dl/_quality_pack/gate.txt | ||
| if [[ -f "$GATE_FILE" ]]; then | ||
| if grep -q "Threshold check passed." "$GATE_FILE"; then | ||
| status="**PASS**" | ||
| else | ||
| status="**FAIL**" | ||
| fi | ||
| gate_body=$(cat "$GATE_FILE") | ||
| else | ||
| status="**UNAVAILABLE**" | ||
| gate_body="No traceability gate output was produced by the CI run." | ||
| fi | ||
|
|
||
| { | ||
| echo "Quality pack traceability report for this pull request:" | ||
| echo | ||
| echo "Status: $status ([workflow run](${{ github.event.workflow_run.html_url }}))" | ||
| echo | ||
| echo '```text' | ||
| echo "$gate_body" | ||
| echo '```' | ||
| } > comment.md | ||
|
|
||
| - name: Find existing PR comment | ||
| uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0 | ||
| id: fc | ||
| with: | ||
| issue-number: ${{ steps.metadata.outputs.pr_number }} | ||
| comment-author: "github-actions[bot]" | ||
| body-includes: Quality pack traceability report for this pull request | ||
|
|
||
| - name: Comment on PR with traceability gate summary | ||
| uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 | ||
| with: | ||
| issue-number: ${{ steps.metadata.outputs.pr_number }} | ||
| comment-id: ${{ steps.fc.outputs.comment-id }} | ||
| edit-mode: replace | ||
| body-path: comment.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
|
|
||
| # Builds the docs and runs the upstream //:traceability_gate against the | ||
| # resulting _build/metrics.json, then uploads the gate output as an artifact. | ||
| # | ||
| # This workflow does NOT comment on the PR — see quality_pack-publish.yml for | ||
| # the elevated-permissions companion that downloads the artifact and posts. | ||
| # The split is required so that pull requests opened from forks (which get a | ||
| # read-only GITHUB_TOKEN) still get a comment. | ||
|
|
||
| name: Quality pack coverage | ||
|
|
||
| on: | ||
| workflow_call: | ||
|
|
||
| jobs: | ||
| quality-pack: | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - uses: eclipse-score/more-disk-space@v1 | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v7 | ||
| - name: Create Bazel output base directory | ||
| run: | | ||
| sudo mkdir -p /mnt/.bazel | ||
| sudo chown -R $USER:$USER /mnt/.bazel | ||
| - name: Create config indicator file | ||
| run: echo "host" > .bazel_config | ||
| - name: Setup Bazel | ||
| uses: eclipse-score/cicd-actions/setup-bazel-cache@212bbf86267e9381da9d2daf962d12f6feafbc90 # v0.0.2 | ||
| with: | ||
| unique-cache-name: ${{ github.job }} | ||
| - name: Allow linux-sandbox | ||
| uses: eclipse-score/cicd-actions/unblock-user-namespace-for-linux-sandbox@212bbf86267e9381da9d2daf962d12f6feafbc90 # v0.0.2 | ||
| - name: Install Graphviz (required by PlantUML for non-sequence diagrams) | ||
| run: sudo apt-get update && sudo apt-get install -y graphviz | ||
| - name: Build unit + component tests (needed for test links) | ||
| run: bazel test //:unit_tests //:component_tests | ||
| - name: Build docs | ||
| run: bazel run //:docs | ||
| # Thresholds default to 0 while comp_req coverage is being (re-)built up | ||
| # against the SOME/IP protocol spec. Raise the --min-* flags as | ||
| # links land, so the gate never regresses without a follow-up ticket. | ||
| # --need-type=comp_req scopes the gate to component requirements; | ||
| # feat_req / stkh_req live upstream in eclipse-score/score and would | ||
| # otherwise pull the numbers to zero and flap the gate. | ||
| - name: Run traceability gate | ||
| continue-on-error: true | ||
| run: | | ||
| mkdir -p _quality_pack | ||
| bazel run //:traceability_gate -- \ | ||
| --metrics-json "$PWD/_build/metrics.json" \ | ||
| --need-type=comp_req \ | ||
| > _quality_pack/gate.txt | ||
| - name: Upload quality pack artifact | ||
| if: always() | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: quality-pack-metrics | ||
| path: | | ||
| _build/metrics.json | ||
| _quality_pack/gate.txt | ||
| if-no-files-found: warn | ||
| retention-days: 14 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
|
|
||
| load("@score_docs_as_code//:docs.bzl", "docs_bundle") | ||
|
|
||
| # Docs bundle for this component. Kept in its own package so the parent | ||
| # BUILD does not need to load @score_docs_as_code. | ||
| docs_bundle( | ||
| name = "docs_bundle", | ||
| source_dir = "", | ||
| visibility = ["//visibility:public"], | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| .. | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
|
|
||
| .. _config: | ||
|
|
||
| Config | ||
| ###### | ||
|
|
||
| .. comp:: Config | ||
| :id: comp__config | ||
| :security: NO | ||
| :safety: QM | ||
| :status: valid | ||
| :version: 1 | ||
| :belongs_to: feat__someip_gateway | ||
|
|
||
| Abstract | ||
| ======== | ||
|
|
||
| Provides the FlatBuffers schema (mw_someip_config.fbs) and JSON schema used to define and validate gateway configuration. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.