feat(RELEASE-2476): add Python script for collect-charon-params task#861
feat(RELEASE-2476): add Python script for collect-charon-params task#861querti wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #861 +/- ##
==========================================
+ Coverage 95.51% 95.70% +0.18%
==========================================
Files 69 73 +4
Lines 6893 7198 +305
==========================================
+ Hits 6584 6889 +305
Misses 309 309
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 4 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
PR Summary by QodoAdd managed task to collect Charon params and emit Tekton results
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
25 rules 1.
|
d2e5372 to
b432ea1
Compare
| aws_secret: str = charon["awsSecret"] | ||
|
|
||
| components = snapshot.get("components", []) | ||
| oci_registry = "%".join(c["containerImage"] for c in components) |
There was a problem hiding this comment.
maybe add a try/except as this might cause a KeyError if containerImage is missing (for whatever reason) and logging the error.
Assisted-by: Cursor Signed-off-by: Lubomir Gallovic <lgallovi@redhat.com>
b432ea1 to
b881f0b
Compare
| logger.error("One or more components are missing the 'containerImage' key") | ||
| raise |
There was a problem hiding this comment.
Bare raise lost the exception chain; AGENTS.md requires raise ... from e
| logger.error("One or more components are missing the 'containerImage' key") | |
| raise | |
| msg = "One or more components are missing the 'containerImage' key" | |
| logger.error(msg) | |
| raise KeyError(msg) from e |
| lines = [ | ||
| f"export CHARON_TARGET={params.target}", | ||
| f'export CHARON_PRODUCT_NAME="{params.product_name}"', | ||
| f'export CHARON_PRODUCT_VERSION="{params.product_version}"', | ||
| ] | ||
| if params.sign_key: | ||
| lines.append(f'export CHARON_SIGN_KEY="{params.sign_key}"') | ||
| lines.append(f'export CHARON_OCI_REGISTRY="{params.oci_registry}"') | ||
| lines.append(f'export CHARON_AUTHOR="{params.author}"') |
There was a problem hiding this comment.
Values written without proper escaping could break shell parsing or allow injection; you can use shlex.quote to solve it
Assisted-by: Cursor