Try to export HLKX package even when test run crashed#875
Try to export HLKX package even when test run crashed#875kostyanf14 wants to merge 1 commit intoHCK-CI:masterfrom
Conversation
Summary of ChangesHello @kostyanf14, 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 enhances the robustness of the HCK test engine by ensuring that the HLKX project package is always generated, even if the test runs themselves encounter failures. This change aims to streamline the debugging process by providing the necessary package for analysis, allowing developers to fix the root cause of failures without needing to re-run the entire test suite from scratch. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
The pull request introduces a rescue2return helper method and modifies the auto_run method to attempt exporting the HLKX package even if intermediate test steps fail. This change improves resilience by ensuring that the package creation is attempted, which can aid in debugging and recovery. The use of rescue2return to capture exceptions and then re-raise them conditionally is a good pattern for controlled error handling.
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
There was a problem hiding this comment.
Pull request overview
This PR aims to ensure the HLKX (project) package export is attempted even if the HLK test run fails, so a partially successful run can still produce a reusable package for troubleshooting.
Changes:
- Added a helper to run steps while capturing exceptions instead of aborting immediately.
- Updated
auto_runto attemptcreate_project_packageeven when earlier test phases fail, then re-raise the first captured failure.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| raise ex1 if ex1 | ||
| raise ex2 if ex2 | ||
| raise ex3 if ex3 |
There was a problem hiding this comment.
Raising the captured exception object later (raise ex1) will report the raise site as the origin in logs/backtraces, obscuring where the failure actually occurred. Since bin/auto_hck logs exception.backtrace, preserve the original backtrace when re-raising (e.g., raise with the stored backtrace) so the fatal log points to the real root cause.
| raise ex1 if ex1 | |
| raise ex2 if ex2 | |
| raise ex3 if ex3 | |
| raise ex1, ex1.message, ex1.backtrace if ex1 | |
| raise ex2, ex2.message, ex2.backtrace if ex2 | |
| raise ex3, ex3.message, ex3.backtrace if ex3 |
There was a problem hiding this comment.
Emmm, what? Looks like hallucinations.
0969442 to
08b6b26
Compare
No description provided.