Skip to content

Conversation

@matejvasek
Copy link
Collaborator

No description provided.

@openshift-ci
Copy link

openshift-ci bot commented Jan 15, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: matejvasek

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@matejvasek matejvasek changed the title fix: PaC does not refer tekton hub [release-v1.17] fix: PaC does not refer tekton hub Jan 15, 2026
@openshift-ci
Copy link

openshift-ci bot commented Jan 15, 2026

@matejvasek: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/420-e2e-oncluster-test fd243e6 link true /test 420-e2e-oncluster-test

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

Comment on lines +99 to +106
gct, err := getGitCloneTask()
if err != nil {
return fmt.Errorf("error getting git clone task: %v", err)
}
gts, err := getTaskSpec(gct)
if err != nil {
return err
}

Choose a reason for hiding this comment

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

New if-conditions need unit tests.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is just quick fix for 1.37.1 patch release. To properly unit test it would require a lot more re-work. We might not have enough time for that.

This branch will probably be dead after the release. No point to have test for regression.

Copy link

@twoGiants twoGiants left a comment

Choose a reason for hiding this comment

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

Great that you removed the hub reference! 😸 👍

Now there is new logic with error handling. Usually I'd say this needs unit tests to cover it. Wdys in this case?

@matejvasek matejvasek requested a review from twoGiants January 19, 2026 15:51
@matejvasek
Copy link
Collaborator Author

@jrangelramos please verify that this works.

@matejvasek
Copy link
Collaborator Author

matejvasek commented Jan 19, 2026

Great that you removed the hub reference! 😸 👍

Now there is new logic with error handling. Usually I'd say this needs unit tests to cover it. Wdys in this case?

@twoGiants
I replied it the other comment. I would add test should this be in "main". This is however just quick fix for 1.37.1 patch release. The release branch is pretty much inactive and there most likely won't be 1.37.2. So such a test won't catch any regression, since nobody would run it.

Wrt test for errors in general: I do not find it very useful for "non actionable/recoverable" errors. I mean errors where there is nothing to be done -- you either interrupt/crash whole app or just print warning. OK I mean it's good to check we are not ignoring any error but it is quite well done in Go IMO. Go forces you to check errors by design, so there is little change there is unhandled error.

However I think they are very much useful when we return "sentinel" error which value is subsequently test using errors.Is() and do some dependent action.

@jrangelramos
Copy link

it works. it looks good to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants