Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix message when the repository cannot be matched #1361

Merged
merged 2 commits into from
Aug 22, 2023
Merged

Fix message when the repository cannot be matched #1361

merged 2 commits into from
Aug 22, 2023

Conversation

Roming22
Copy link
Contributor

@Roming22 Roming22 commented Aug 1, 2023

Changes

  • Reference the repository CR in the message instead of namespace.
  • Remove deprecated message related to access token.

The current error message appears to be confusing for users. They try to look into namespace issues instead of looking for a missing or a misconfigured Repository CR.

Submitter Checklist

  • ♽ Run make test before submitting a PR (ie: with pre-commit, no need to waste CPU cycle on CI. (or even better install pre-commit and do pre-commit install in the root of this repo).
  • ✨ We heavily rely on linters to get our code clean and consistent, please ensure that you have run make lint before submitting a PR. The markdownlint error can get usually fixed by running make fix-markdownlint (make sure it's installed first)
  • 📖 If you are adding a user facing feature or make a change of the behavior, please verify that you have documented it
  • 🧪 100% coverage is not a target but most of the time we would rather have a unit test if you make a code change.
  • 🎁 If that's something that is possible to do please ensure to check if we can add a e2e test.
  • 🔎 If there is a flakiness in the CI tests then don't necessary ignore it, better get the flakyness fixed before merging or if that's not possible there is a good reason to bypass it. (token rate limitation may be a good reason to skip).

* Reference the repository CR in the message instead of namespace.
* Remove deprecated message related to access token.
@Roming22
Copy link
Contributor Author

Roming22 commented Aug 1, 2023

@savitaashture We can continue our conversation here if needed.

@codecov
Copy link

codecov bot commented Aug 1, 2023

Codecov Report

Merging #1361 (a83cb2c) into main (7260744) will increase coverage by 0.23%.
Report is 3 commits behind head on main.
The diff coverage is 87.50%.

@@            Coverage Diff             @@
##             main    #1361      +/-   ##
==========================================
+ Coverage   60.72%   60.95%   +0.23%     
==========================================
  Files         136      136              
  Lines        9914     9924      +10     
==========================================
+ Hits         6020     6049      +29     
+ Misses       3411     3392      -19     
  Partials      483      483              
Files Changed Coverage Δ
pkg/cmd/tknpac/bootstrap/kubestuff.go 16.66% <ø> (ø)
pkg/cmd/tknpac/bootstrap/bootstrap.go 20.74% <86.95%> (+16.12%) ⬆️
pkg/pipelineascode/match.go 65.05% <100.00%> (+1.70%) ⬆️

... and 1 file with indirect coverage changes

Copy link
Contributor

@sm43 sm43 left a comment

Choose a reason for hiding this comment

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

lgtm

@chmouel
Copy link
Member

chmouel commented Aug 8, 2023

@Roming22 what do you mean by

Remove deprecated message related to access token.

this is needed for github webhook and other vcs that is not github apps

@Roming22
Copy link
Contributor Author

Roming22 commented Aug 8, 2023

@chmouel
Looking at MatchEventURLRepo() I don't see anything trying to access that token. Therefore I don't see a usecase for that log message.

I would think that the issue would be raised later on in the process, most likely when calling SetClient() line 95.
This seems correlated by the implementations of that function in bitbucket.go, gitea.go.

@chmouel
Copy link
Member

chmouel commented Aug 22, 2023

ah yeah right we used to set status and needed to make sure we had a token for that on github webhook but since we are only a logging now it good for cleanup,

this is a gtg, but we have a CI breakage atm so let's merge this when the breakage is fixed

@chmouel chmouel force-pushed the main branch 6 times, most recently from cb88d0e to 7260744 Compare August 22, 2023 10:11
@chmouel chmouel merged commit dc310ca into openshift-pipelines:main Aug 22, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants