Skip to content
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

[AUTO-CHERRYPICK] Set ptest retries to 1 for PR package build check. - branch main #10215

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .pipelines/prchecks/PackageBuildPRCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ extends:
steps:
- template: .pipelines/templates/PackageBuild.yml@self
parameters:
checkBuildRetries: "1"
customToolchainArtifactName: $(toolchainArtifactName)
isCheckBuild: true
isQuickRebuildPackages: true
Expand Down
17 changes: 13 additions & 4 deletions .pipelines/templates/PackageBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ parameters:
type: string
default: "$(Build.SourcesDirectory)"

- name: checkBuildRetries
type: string
default: ""

- name: concurrentPackageBuilds
type: number
default: 12
Expand All @@ -22,10 +26,6 @@ parameters:
type: string
default: ""

- name: testRerunList
type: string
default: ""

- name: failOnTestFailures
type: boolean
default: true
Expand Down Expand Up @@ -125,6 +125,10 @@ parameters:
type: string
default: ""

- name: testRerunList
type: string
default: ""

- name: testSuiteName
type: string
default: "Package test"
Expand Down Expand Up @@ -176,6 +180,10 @@ steps:
displayName: "Populate cache RPMs"
- script: |
if [[ -n "${{ parameters.checkBuildRetries }}" ]]; then
check_build_retries_arg="CHECK_BUILD_RETRIES=${{ parameters.checkBuildRetries }}"
fi
if [[ ${{ parameters.isDeltaBuild }} == "true" ]]; then
delta_fetch_arg="DELTA_FETCH=y"
elif [[ ${{ parameters.isDeltaBuild }} == "false" ]]; then
Expand Down Expand Up @@ -217,6 +225,7 @@ steps:
SPECS_DIR="${{ parameters.buildRepoRoot }}/${{ parameters.specsFolderPath }}" \
SRPM_PACK_LIST="${{ parameters.srpmPackList }}" \
TEST_RERUN_LIST="${{ parameters.testRerunList }}" \
$check_build_retries_arg \
$delta_fetch_arg \
$max_cascading_rebuilds_arg \
$quick_rebuild_packages_arg \
Expand Down
4 changes: 2 additions & 2 deletions toolkit/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ PACKAGE_CACHE_SUMMARY ?=
IMAGE_CACHE_SUMMARY ?=
INITRD_CACHE_SUMMARY ?=
PACKAGE_ARCHIVE ?=
PACKAGE_BUILD_RETRIES ?= 1
CHECK_BUILD_RETRIES ?= 1
PACKAGE_BUILD_RETRIES ?= 0
CHECK_BUILD_RETRIES ?= 0
EXTRA_BUILD_LAYERS ?= 0
REFRESH_WORKER_CHROOT ?= y
# Set to 0 to use the number of logical CPUs.
Expand Down
4 changes: 2 additions & 2 deletions toolkit/scripts/pkggen.mk
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,8 @@ $(STATUS_FLAGS_DIR)/build-rpms.flag: $(no_repo_acl) $(preprocessed_file) $(chroo
--distro-release-version="$(RELEASE_VERSION)" \
--distro-build-number="$(BUILD_NUMBER)" \
--rpmmacros-file="$(TOOLCHAIN_MANIFESTS_DIR)/macros.override" \
--build-attempts="$(PACKAGE_BUILD_RETRIES)" \
--check-attempts="$(CHECK_BUILD_RETRIES)" \
--build-attempts="$$(($(PACKAGE_BUILD_RETRIES)+1))" \
--check-attempts="$$(($(CHECK_BUILD_RETRIES)+1))" \
$(if $(MAX_CASCADING_REBUILDS),--max-cascading-rebuilds="$(MAX_CASCADING_REBUILDS)") \
--extra-layers="$(EXTRA_BUILD_LAYERS)" \
--build-agent="chroot-agent" \
Expand Down
2 changes: 1 addition & 1 deletion toolkit/tools/scheduler/schedulerutils/buildworker.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ func testSRPMFile(agent buildagents.BuildAgent, checkAttempts int, basePackageNa
}, checkAttempts, retryDuration)

if checkFailed {
logger.Log.Debugf("Tests failed for '%s' after %d retries.", basePackageName, checkAttempts)
logger.Log.Debugf("Tests failed for '%s' after %d attempt(s).", basePackageName, checkAttempts)
err = nil
}
return
Expand Down
Loading