Skip to content

Conversation

@zakisk
Copy link
Contributor

@zakisk zakisk commented Nov 4, 2025

📝 Description of the Change

when a PipelineRun fails json marshalling in match.go we don't know which PipelineRun has syntax error if there are multiple PipelineRuns. this PR adds PipelineRun name along with Json marshalling error so that it is easy to track the issue.

👨🏻‍ Linked Jira

🔗 Linked GitHub Issue

Fixes #

🚀 Type of Change

  • 🐛 Bug fix (fix:)
  • ✨ New feature (feat:)
  • 💥 Breaking change (feat!:, fix!:)
  • 📚 Documentation update (docs:)
  • ⚙️ Chore (chore:)
  • 💅 Refactor (refactor:)
  • 🔧 Enhancement (enhance:)
  • 📦 Dependency update (deps:)

🧪 Testing Strategy

  • Unit tests
  • Integration tests
  • End-to-end tests
  • Manual testing
  • Not Applicable

🤖 AI Assistance

  • I have not used any AI assistance for this PR.
  • I have used AI assistance for this PR.

If you have used AI assistance, please provide the following details:

Which LLM was used?

  • GitHub Copilot
  • ChatGPT (OpenAI)
  • Claude (Anthropic)
  • Cursor
  • Gemini (Google)
  • Other: ____________

Extent of AI Assistance:

  • Documentation and research only
  • Unit tests or E2E tests only
  • Code generation (parts of the code)
  • Full code generation (most of the PR)
  • PR description and comments
  • Commit message(s)

Important

If the majority of the code in this PR was generated by an AI, please add a Co-authored-by trailer to your commit message.
For example:

Co-authored-by: Gemini gemini@google.com
Co-authored-by: ChatGPT noreply@chatgpt.com
Co-authored-by: Claude noreply@anthropic.com
Co-authored-by: Cursor noreply@cursor.com
Co-authored-by: Copilot Copilot@users.noreply.github.com

**💡You can use the script ./hack/add-llm-coauthor.sh to automatically add
these co-author trailers to your commits.

✅ Submitter Checklist

  • 📝 My commit messages are clear, informative, and follow the project's How to write a git commit message guide. The Gitlint linter ensures in CI it's properly validated
  • ✨ I have ensured my commit message prefix (e.g., fix:, feat:) matches the "Type of Change" I selected above.
  • ♽ I have run make test and make lint locally to check for and fix any
    issues. For an efficient workflow, I have considered installing
    pre-commit and running pre-commit install to
    automate these checks.
  • 📖 I have added or updated documentation for any user-facing changes.
  • 🧪 I have added sufficient unit tests for my code changes.
  • 🎁 I have added end-to-end tests where feasible. See README for more details.
  • 🔎 I have addressed any CI test flakiness or provided a clear reason to bypass it.
  • If adding a provider feature, I have filled in the following and updated the provider documentation:
    • GitHub App
    • GitHub Webhook
    • Gitea/Forgejo
    • GitLab
    • Bitbucket Cloud
    • Bitbucket Data Center

@gemini-code-assist
Copy link

Summary of Changes

Hello @zakisk, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on enhancing the clarity of error messages within the system. Specifically, it modifies the JSON marshalling process for PipelineRun objects. When a marshalling operation fails, the resulting error message will now explicitly include the name of the PipelineRun, or its generated name if a direct name is not available. This change aims to provide more immediate and actionable information to developers, thereby improving the overall debuggability of the application.

Highlights

  • Enhanced Error Reporting: The pull request improves error messages when a PipelineRun object fails to be marshalled into JSON, by including the PipelineRun's name or generated name in the error output.
  • Improved Debuggability: By adding the PipelineRun's identifier to the error message, developers can more quickly identify which specific PipelineRun caused the marshalling failure, streamlining the debugging process.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@pipelines-as-code
Copy link

pipelines-as-code bot commented Nov 4, 2025

🔍 PR Lint Feedback

Note: This automated check helps ensure your PR follows our contribution guidelines.

⚠️ Items that need attention:

🎫 Jira reference

Add a Jira reference in the description using one of the following formats:

  • https://issues.redhat.com/browse/SRVKP-<number>

If no SRVKP ticket exists yet, link a GitHub issue instead (e.g., Fixes #123).
Minor housekeeping PRs without Jira coverage can skip this after confirming with reviewers.


🤖 AI attribution

The following commits lack an explicit AI attribution footer:

  • fbc5fd8 enhance: add PipelineRun name in pr json marshalling

If no AI assistance was used for a commit, you can ignore this warning.
Otherwise add an Assisted-by: or Co-authored-by: footer referencing the AI used.


ℹ️ Next Steps

  • Review and address the items above
  • Push new commits to update this PR
  • This comment will be automatically updated when issues are resolved
🔧 Admin Tools (click to expand)

Automated Issue/Ticket Creation:

  • /issue-create - Generate a GitHub issue from this PR content using AI
  • /jira-create - Create a SRVKP Jira ticket from this PR content using AI

⚠️ Important: Always review and edit generated content before finalizing tickets/issues.
The AI-generated content should be used as a starting point and may need adjustments.

These commands are available to maintainers and will post the generated content as PR comments for review.

🤖 This feedback was generated automatically by the PR CI system

@pipelines-as-code pipelines-as-code bot added enhancement New feature or request go Pull requests that update Go code labels Nov 4, 2025
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request enhances error handling by including the PipelineRun name in the JSON marshalling error message, which is a useful improvement for debugging. My review focuses on code consistency and maintainability. I've left one comment regarding an inconsistency in how PipelineRun identifiers are retrieved across the codebase, suggesting a potential follow-up to unify the logic.

@zakisk zakisk force-pushed the enhacnce-error-log-of-json-marshaling branch from 50c6e5a to d4e2a92 Compare November 4, 2025 10:45
@pipelines-as-code pipelines-as-code bot added the llm label Nov 4, 2025
@chmouel
Copy link
Member

chmouel commented Nov 4, 2025

can you add details test... etc or set as draft if iit's not raady?

@zakisk zakisk marked this pull request as draft November 4, 2025 12:01
@zakisk zakisk force-pushed the enhacnce-error-log-of-json-marshaling branch from d4e2a92 to cca2299 Compare November 5, 2025 05:46
@zakisk zakisk marked this pull request as ready for review November 5, 2025 05:46
@zakisk zakisk force-pushed the enhacnce-error-log-of-json-marshaling branch from cca2299 to fe38a89 Compare November 6, 2025 10:25
Copy link
Contributor

@theakshaypant theakshaypant left a comment

Choose a reason for hiding this comment

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

Is the goal for this change to help with debugging failures by adding prName in error logs? Or are there other reasons that I am missing.

@zakisk
Copy link
Contributor Author

zakisk commented Nov 12, 2025

Is the goal for this change to help with debugging failures by adding prName in error logs? Or are there other reasons that I am missing.

yeah, exactly at the moment on validation error we don't know PipelineRun name

@chmouel
Copy link
Member

chmouel commented Nov 12, 2025

can you do a proper description in commit and pr details?

@zakisk zakisk removed the llm label Nov 12, 2025
@chmouel
Copy link
Member

chmouel commented Nov 12, 2025

you updated the PR description but you have an empty git commit description,

i donn't know why gitlint didn't bug you there, but it should have be

@zakisk
Copy link
Contributor Author

zakisk commented Nov 13, 2025

you updated the PR description but you have an empty git commit description,

i donn't know why gitlint didn't bug you there, but it should have be

gitlint doesn't fail on single line commit message, we need to change that

@zakisk zakisk force-pushed the enhacnce-error-log-of-json-marshaling branch from fe38a89 to fc612e8 Compare November 13, 2025 07:24
when a PipelineRun fails json marshalling in match.go
we don't know which PipelineRun has syntax error if
there are multiple PipelineRuns. this PR adds
PipelineRun name along with Json marshalling error so
that it is easy to track the issue.

Signed-off-by: Zaki Shaikh <zashaikh@redhat.com>
@zakisk zakisk force-pushed the enhacnce-error-log-of-json-marshaling branch from fc612e8 to fbc5fd8 Compare November 13, 2025 07:26
@chmouel
Copy link
Member

chmouel commented Nov 13, 2025

/lgtm

Copy link

@pipelines-as-code pipelines-as-code bot left a comment

Choose a reason for hiding this comment

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

Congrats @zakisk your PR Has been approved 🎉

✅ Pull Request Approved

Approval Status:

  • Required Approvals: 1
  • Current Approvals: 1

👥 Reviewers Who Approved:

Reviewer Permission Level Approval Status
@chmouel admin

📝 Next Steps

  • Ensure all required checks pass
  • Comply with branch protection rules
  • Request a maintainer to merge using the /merge command (or merge it
    directly if you have repository permission).

Automated by the PAC Boussole 🧭

@chmouel chmouel merged commit 2946d77 into openshift-pipelines:main Nov 13, 2025
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request fix go Pull requests that update Go code testing

Development

Successfully merging this pull request may close these issues.

3 participants