Files
OpenShell/tasks/scripts/generate-qualification-summary.sh
T
Taylor Mutch ac7f615cd1 fix(ci): allow accepted protobuf breaks for v0.1.6 prereleases (#4976)
* fix(ci): allow accepted protobuf breaks for one prerelease

Signed-off-by: Taylor Mutch <taylormutch@gmail.com>

* fix(ci): cover all v0.1.6 prerelease candidates

Signed-off-by: Taylor Mutch <taylormutch@gmail.com>

* docs(ci): document full rollback of temporary protobuf exception

Signed-off-by: Taylor Mutch <taylormutch@gmail.com>

* fix(ci): complete protobuf test copyright header

Signed-off-by: Taylor Mutch <taylormutch@gmail.com>

---------

Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
2026-10-27 15:44:53 +00:00

115 lines
3.5 KiB
Bash
Executable File

#!/usr/bin/env bash
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
set -euo pipefail
die() {
echo "generate-qualification-summary: $*" >&2
exit 1
}
require_env() {
local name
for name in "$@"; do
if [[ -z "${!name:-}" ]]; then
die "required environment variable ${name} is not set"
fi
done
}
[[ $# -eq 1 ]] || die "usage: $0 OUTPUT"
output=$1
current_profile_passed=true
proto_exception_tag=${PROTO_COMPATIBILITY_EXCEPTION_TAG:-}
proto_exception_reason=${PROTO_COMPATIBILITY_EXCEPTION_REASON:-}
require_env \
RELEASE_TAG SOURCE_SHA IS_PRERELEASE GITHUB_RUN_ID GITHUB_RUN_ATTEMPT \
GITHUB_SERVER_URL GITHUB_REPOSITORY SECURITY_RESULT CONFORMANCE_RESULT \
FEATURE_INTEGRATION_RESULT DOCKER_E2E_RESULT VM_E2E_RESULT PROTO_COMPATIBILITY_RESULT
if [[ -n "${proto_exception_tag}" ]]; then
[[ "${IS_PRERELEASE}" == true && "${proto_exception_tag}" == "${RELEASE_TAG}" ]] ||
die "protobuf exception must match the prerelease tag"
[[ -n "${proto_exception_reason//[[:space:]]/}" ]] || die "protobuf exception requires a reason"
fi
for result in \
"${PROTO_COMPATIBILITY_RESULT}" \
"${SECURITY_RESULT}" \
"${CONFORMANCE_RESULT}" \
"${FEATURE_INTEGRATION_RESULT}" \
"${DOCKER_E2E_RESULT}" \
"${VM_E2E_RESULT}"; do
if [[ "${result}" != "success" ]]; then
current_profile_passed=false
break
fi
done
mkdir -p "$(dirname "${output}")"
jq -n \
--arg tag "${RELEASE_TAG}" \
--arg source_sha "${SOURCE_SHA}" \
--arg is_prerelease "${IS_PRERELEASE}" \
--argjson current_profile_passed "${current_profile_passed}" \
--arg run_id "${GITHUB_RUN_ID}" \
--arg run_attempt "${GITHUB_RUN_ATTEMPT}" \
--arg run_url "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/attempts/${GITHUB_RUN_ATTEMPT}" \
--arg generated_at "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
--arg security "${SECURITY_RESULT}" \
--arg protobuf_compatibility "${PROTO_COMPATIBILITY_RESULT}" \
--arg proto_exception_tag "${proto_exception_tag}" \
--arg proto_exception_reason "${proto_exception_reason}" \
--arg conformance "${CONFORMANCE_RESULT}" \
--arg feature_integration "${FEATURE_INTEGRATION_RESULT}" \
--arg docker_e2e "${DOCKER_E2E_RESULT}" \
--arg vm_e2e "${VM_E2E_RESULT}" \
'{
schema_version: 1,
tag: $tag,
source_sha: $source_sha,
is_prerelease: ($is_prerelease == "true"),
profile: {
name: "release-tag-v1",
rfc_0014_complete: false,
missing_suites: [
"upgrade",
"SDK/configuration compatibility and migration review",
"remaining RFC conformance configurations"
]
},
current_profile_passed: $current_profile_passed,
exceptions: (if $proto_exception_tag == "" then [] else [{
suite: "protobuf_compatibility",
tag: $proto_exception_tag,
reason: $proto_exception_reason
}] end),
run: {
id: $run_id,
attempt: $run_attempt,
url: $run_url
},
generated_at: $generated_at,
advisory_reviews: {
compatibility: {
required: false,
status: "reported_separately",
artifact_name: ("compatibility-review-run-" + $run_id + "-attempt-" + $run_attempt),
run_url: $run_url
}
},
suites: {
protobuf_compatibility: $protobuf_compatibility,
security: $security,
conformance_integration: $conformance,
feature_integration: $feature_integration,
docker_e2e: $docker_e2e,
vm_e2e: $vm_e2e
}
}' > "${output}"
printf '%s\n' "${current_profile_passed}"