-
Notifications
You must be signed in to change notification settings - Fork 98
TRT-2465: enable writing label files in bucket #3207
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
TRT-2465: enable writing label files in bucket #3207
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
|
@sosiouxme: This pull request references TRT-2465 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
WalkthroughThe changes restructure Label and Symptom models by introducing nested content structs (LabelContent, SymptomContent) to encapsulate core fields, update seed data to match the new structure, modify a method signature to return matched text alongside a boolean flag, and introduce new functionality for persisting job run labels to cloud storage and managing labels via a REST API client. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 5 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.5.0)Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions Comment |
|
@sosiouxme: This pull request references TRT-2465 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@pkg/componentreadiness/jobrunannotator/prow_bucket.go`:
- Around line 35-41: The current WriteJsonToBucket implementation in
JobRunBucketLabel uses only path.Base(x.FileMatch) when computing the hash for
labelFile, which can lead to collisions for identical filenames in different
directories; change the hashing input to the full file path (x.FileMatch) or
another unique per-path string and regenerate labelFile accordingly so the
object key (x.JobRunPath + BucketLabelsPrefix + labelFile) is unique per
original path; update any uses of baseName in labelFile construction to use the
new hashed value while keeping the readable components (x.Label.ID and base
filename) if desired.
In `@pkg/sippyclient/jobrunscan/labels.go`:
- Around line 60-75: In LabelsClient.Update, guard against a path vs payload ID
mismatch by validating that the incoming id argument equals label.ID before
calling sc.client.Put; if they differ, return a clear error (e.g., "mismatched
label ID: path id %s vs payload id %s") instead of proceeding, so the PUT to
path "/api/jobs/labels/%s" always matches the payload ID used in the request.
8bd56a5 to
f5ac60b
Compare
|
@sosiouxme: This pull request references TRT-2465 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
f5ac60b to
200405b
Compare
|
@sosiouxme: This pull request references TRT-2465 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@sippy-ng/package.json`:
- Around line 115-119: The package.json "overrides" entries (nth-check, postcss,
webpack-dev-server) were added but package-lock.json wasn't regenerated; run npm
install to update package-lock.json so the overrides are applied, verify the
lockfile now shows nth-check ^2.1.1, postcss ^8.4.31, and webpack-dev-server
^4.15.2, and commit the updated lockfile; additionally add an "engines" field in
package.json requiring npm >= 8.3.0 to ensure the overrides feature is
supported.
|
Scheduling required tests: |
When a symptom matches a job, we want to write label files back to the prow job bucket artifacts so they are visible when we look at the job. This implements that functionality in a centralized, reusable way. prow_bucket.go is the code for writing to the bucket. Each label is written as a json file; I refactored the label/symptom types a bit in order to separate out the parts to include there.
In order to get the full label definition that the cloud function wants to write into the job bucket, it needs a client to read it.
200405b to
0951214
Compare
|
@sosiouxme: This pull request references TRT-2465 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Scheduling required tests: |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: petr-muller, sosiouxme The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@sosiouxme: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
When a symptom matches a job, we want to write label files back to the
prow job bucket artifacts so they are visible when we look at the job.
This implements that functionality in a centralized, reusable way.
Summary by CodeRabbit
Release Notes
New Features
Refactor
✏️ Tip: You can customize this high-level summary in your review settings.