Skip to content

fix(CI): set PR number to NULL if not defined #16377

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
merged 1 commit into from
Aug 12, 2025
Merged

Conversation

janisz
Copy link
Contributor

@janisz janisz commented Aug 12, 2025

Currently we pass empty string as a PR number but then it cannot be used as integer resulting in failure on saving job that was run on master. This PR should fix that by using NULL instead of empty string.

--parameter="pr_number:INTEGER:${5:-NULL}" \

INSERT INTO acs-san-stackroxci.ci_metrics.stackrox_jobs 
(stopped_at, id, name, repo, branch, pr_number, commit_sha, ci_system, outcome, started_at, test_target, cut_product_version, cut_k8s_version, cut_os_image, cut_kernel_version, cut_container_runtime_version) '
VALUES 
(TIMESTAMP_SECONDS(1754929480), @id, @name, @repo, @branch, @pr_number, @commit_sha, @ci_system, @outcome, TIMESTAMP_SECONDS(@started_at), @test_target, @cut_product_version, @cut_k8s_version, @cut_os_image, @cut_kernel_version, @cut_container_runtime_version)
BigQuery error in query operation: Error processing job 
'acs-san-stackroxci:bqjob_r67effc4dc5a037fc_0000019899f2cacb_1': 
Unparseable query parameter `pr_number` in type `TYPE_INT64`, Bad int64 value:  value: ''
WARNING: Job record creation failed

@janisz janisz requested review from tommartensen, davdhacs and a team August 12, 2025 10:10
@rhacs-bot
Copy link
Contributor

Images are ready for the commit at 651b918.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.9.x-476-g651b9189b3.

Copy link

codecov bot commented Aug 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.11%. Comparing base (810dbde) to head (172320b).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #16377   +/-   ##
=======================================
  Coverage   49.10%   49.11%           
=======================================
  Files        2634     2634           
  Lines      195187   195187           
=======================================
+ Hits        95856    95858    +2     
+ Misses      91832    91830    -2     
  Partials     7499     7499           
Flag Coverage Δ
go-unit-tests 49.11% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@janisz janisz added the auto-retest PRs with this label will be automatically retested if prow checks fails label Aug 12, 2025
@rhacs-bot
Copy link
Contributor

/retest

@rhacs-bot
Copy link
Contributor

/retest

@rhacs-bot
Copy link
Contributor

rhacs-bot commented Aug 12, 2025

Images are ready for the commit at 172320b.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.9.x-478-g172320b9c8.

Signed-off-by: Tomasz Janiszewski <tomek@redhat.com>
@janisz janisz force-pushed the fix_bq_jobs_on_master branch from 651b918 to 172320b Compare August 12, 2025 13:12
Copy link
Contributor

@davdhacs davdhacs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1
"NULL is a valid value. Currently, all existing data types are nullable" (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#nullable_data_types)

@rhacs-bot
Copy link
Contributor

/retest

@davdhacs
Copy link
Contributor

looks good on a failed test (https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/stackrox_stackrox/16377/pull-ci-stackrox-stackrox-master-gke-nongroovy-e2e-tests/1955255995689078784/artifacts/gke-nongroovy-e2e-tests/stackrox-stackrox-end/build-log.txt):

INFO: Tue Aug 12 14:02:11 UTC 2025: --parameter=id::1955255995689078784 --parameter=name::pull-ci-stackrox-stackrox-master-gke-nongroovy-e2e-tests --parameter=repo::stackrox/stackrox --parameter=branch::fix_bq_jobs_on_master --parameter=pr_number:INTEGER:16377 --parameter=commit_sha::172320b9c834bd282d2499c069a8f9f9d1a35b27 --parameter=ci_system::prow --parameter=outcome::failed --parameter=started_at:INTEGER:1755006269 --parameter=test_target::NULL --parameter=cut_k8s_version::v1.32.6-gke.1013000 --parameter=cut_os_image::Ubuntu 24.04.2 LTS --parameter=cut_kernel_version::6.8.0-1026-gke --parameter=cut_container_runtime_version::containerd://1.7.26
INFO: Tue Aug 12 14:02:11 UTC 2025: INSERT INTO acs-san-stackroxci.ci_metrics.stackrox_jobs (stopped_at, id, name, repo, branch, pr_number, commit_sha, ci_system, outcome, started_at, test_target, cut_k8s_version, cut_os_image, cut_kernel_version, cut_container_runtime_version) VALUES (TIMESTAMP_SECONDS(1755007331), @id, @name, @repo, @branch, @pr_number, @commit_sha, @ci_system, @outcome, TIMESTAMP_SECONDS(@started_at), @test_target, @cut_k8s_version, @cut_os_image, @cut_kernel_version, @cut_container_runtime_version)
Successfully started query acs-san-stackroxci:bqjob_r3f6da9a19476cd63_000001989e96b2b9_1
INFO: Tue Aug 12 14:02:13 UTC 2025: Post processing junit records to JIRA issues, BigQuery metrics and Slack attachments as appropriate

@janisz janisz merged commit 6acfdd4 into master Aug 12, 2025
92 of 96 checks passed
@janisz janisz deleted the fix_bq_jobs_on_master branch August 12, 2025 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-retest PRs with this label will be automatically retested if prow checks fails
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants