From 8ae2a3f1bb6cad0112c32a23de0c3dbf015b7e11 Mon Sep 17 00:00:00 2001 From: Matthias Goerens Date: Tue, 21 Oct 2025 11:59:23 +0200 Subject: [PATCH] Fix exception hierarchy In cases where a new redhat OWNERS file is added but the chart doesn't contain the redhat- prefix, the workflow would fail without creating a comment for the user due to trying to download the Submission artifact. This artifact is missing (this is expected), because there was an issue during the parsing of the modified file in 'validate-submission'. This step should created a GitHub output 'submission_file_present'. This was not happening in that particular case due to 'ChartError' (exception raised when RedHat chart is missing the redhat- prefix) not being a SubmissionError exception. Fix #465 Signed-off-by: Matthias Goerens --- scripts/src/submission/submission.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/src/submission/submission.py b/scripts/src/submission/submission.py index c7c0fb97..90cfa731 100644 --- a/scripts/src/submission/submission.py +++ b/scripts/src/submission/submission.py @@ -50,7 +50,7 @@ class ReleaseTagError(SubmissionError): pass -class ChartError(Exception): +class ChartError(SubmissionError): pass @@ -238,7 +238,7 @@ class Submission: def __post_init__(self): """Complete the initialization of the Submission object. - Only retrieve PR information from the GitHub API if requiered, by checking for the presence + Only retrieve PR information from the GitHub API if required, by checking for the presence of a value for the modified_files attributes. This check allows to make the distinction between the two aforementioned cases of initialization of a Submission object: * If modified_files is not set, we're in the case of initializing a brand new Submission