Skip to content

Conversation

@infernus01
Copy link
Member

@infernus01 infernus01 commented May 20, 2025

Changes

This PR removes direct usage of github.com/stretchr/testify (see issue #8775). All assertions have been replaced with standard testing.T error handling methods.

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Has Docs if any changes are user facing, including updates to minimum requirements e.g. Kubernetes version bumps
  • Has Tests included if any functionality added or changed
  • pre-commit Passed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including functionality, content, code)
  • Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings). See some examples of good release notes.
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

Removed direct dependency on testify in pkg/spire to simplify testing and reduce external dependencies.

@tekton-robot tekton-robot added the release-note-none Denotes a PR that doesnt merit a release note. label May 20, 2025
@tekton-robot tekton-robot requested a review from jerop May 20, 2025 04:26
@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 20, 2025
@tekton-robot tekton-robot requested a review from pritidesai May 20, 2025 04:26
@infernus01
Copy link
Member Author

/cc @vdemeester

@tekton-robot tekton-robot requested a review from vdemeester May 20, 2025 04:27
@waveywaves
Copy link
Member

/kind chore

@tekton-robot
Copy link
Collaborator

@waveywaves: The label(s) kind/chore cannot be applied, because the repository doesn't have them.

In response to this:

/kind chore

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/test-infra repository.

@waveywaves
Copy link
Member

/kind cleanup

@tekton-robot tekton-robot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label May 20, 2025
@waveywaves
Copy link
Member

/ok-to-test

@tekton-robot tekton-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label May 20, 2025
@waveywaves
Copy link
Member

/retest

@vdemeester
Copy link
Member

Can we run rm -fR vendor && go mod tidy && go mod vendor to check if it removes the testify packages ?

@waveywaves
Copy link
Member

@infernus01 please follow the commit message standards for this one and format the commit title and description accordingly

@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesnt merit a release note. labels May 20, 2025
@infernus01 infernus01 changed the title fix #8775:Remove testify usage from pkg/spire/ fix: Remove direct usage of testify from pkg/spire/ May 20, 2025
@infernus01
Copy link
Member Author

@infernus01 please follow the commit message standards for this one and format the commit title and description accordingly

@waveywaves Got it! Next time, my commit messages will be so proper they'll wear a tie.

@infernus01 infernus01 force-pushed the remove-testify/spire branch from 03c7e5e to ff676a0 Compare May 20, 2025 16:12
@infernus01
Copy link
Member Author

Can we run rm -fR vendor && go mod tidy && go mod vendor to check if it removes the testify packages ?

@vdemeester yes after running these commands, I verified this removes the testify packages from pkg/spire directory.

@vdemeester
Copy link
Member

@infernus01 ah it becomes an indirect dependency. If you run the oneline, it should modify go.mod, can you commit that change ?

@tekton-robot tekton-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 29, 2025
@infernus01 infernus01 force-pushed the remove-testify/spire branch from ed0b4ca to a987d81 Compare May 29, 2025 03:11
@tekton-robot tekton-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 29, 2025
@infernus01 infernus01 force-pushed the remove-testify/spire branch from a987d81 to aec1db6 Compare May 29, 2025 03:18
@tekton-robot tekton-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 29, 2025
@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 29, 2025
@infernus01
Copy link
Member Author

infernus01 commented May 29, 2025

Edit: Per discussion with @aThorp96 and @waveywaves , I'm reverting the changes made here to the previous commit only.

so I removed the strechr testify package indirect dependency from one more place (check last commit) but as the following go mod why output suggests, it's being used in other places as well.

Here's the go mod why output:

# github.com/stretchr/testify
github.com/tektoncd/pipeline/cmd/resolvers
k8s.io/client-go/rest
k8s.io/client-go/rest.test
github.com/stretchr/testify/assert

/cc @vdemeester

@infernus01 infernus01 force-pushed the remove-testify/spire branch from 4d2da25 to fb4a17a Compare June 4, 2025 05:17
@tekton-robot tekton-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 4, 2025
@infernus01
Copy link
Member Author

/retest

1 similar comment
@waveywaves
Copy link
Member

/retest

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 11, 2025
Copy link
Member

@waveywaves waveywaves left a comment

Choose a reason for hiding this comment

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

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 11, 2025
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vdemeester, waveywaves

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [vdemeester,waveywaves]

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

@tekton-robot tekton-robot merged commit 5d05200 into tektoncd:main Jun 11, 2025
56 of 59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants