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

Refactor Tekton interaction in webhook interceptor #359

Merged
merged 5 commits into from
Jan 3, 2022

Conversation

michaelsauter
Copy link
Member

@michaelsauter michaelsauter commented Dec 23, 2021

Preparation for #153. That PR will require an extension to the Tekton client (dealing with PipelineRun resources as well).

Tasks:

  • Updated design documents in docs/design directory or not applicable
  • Updated user-facing documentation in docs directory or not applicable
  • Ran tests (e.g. make test) or not applicable
  • Updated changelog or not applicable

Use a Tekton client instead of the raw HTTP communication.

This makes the code easier to read, maintain and test. As a consequence
of the change, a huge portion of the webhook interceptor which wasn't
tested so far is now tested.
@michaelsauter michaelsauter self-assigned this Dec 23, 2021
@michaelsauter michaelsauter changed the title Feature/interceptor tekton client Refactor Tekton interaction in webhook interceptor Dec 23, 2021
internal/tekton/client.go Outdated Show resolved Hide resolved
@michaelsauter
Copy link
Member Author

michaelsauter commented Dec 23, 2021

I am a bit confused by the lint error. https://github.com/opendevstack/ods-pipeline/runs/4618181458?check_suite_focus=true complains about unused os imports (without stating the filename). Locally make lint-go works without errors. In GH Actions and locally I have Go 1.17 and golangci-lint 1.41 installed ... ?!

UPDATE:
Found it. https://github.com/opendevstack/ods-pipeline/pull/359/files?authenticity_token=KMK1y4fzPHI7%2BY02XQBZ9zmONaGCe4SZm0MfwdzZi9EYGyoBBigeBPua%2BugXu4Cz1AVluXAymcAEXocYuxkePw%3D%3D&file-filters%5B%5D=.go&file-filters%5B%5D=.json&hide-deleted-files=true has more info on this. It is a check result on unchanged files, e.g. test/tasks/ods-build-go_test.go. This is odd as os is used there.

@michaelsauter
Copy link
Member Author

michaelsauter commented Dec 23, 2021

I believe the linting errors were due to some caching issues.

The fix is in b756a81, now merged into this branch as well. However, I am unsure why the issue was not flagged in #353.

@michaelsauter michaelsauter merged commit 50dcf89 into master Jan 3, 2022
@michaelsauter michaelsauter deleted the feature/interceptor-tekton-client branch January 3, 2022 08:19
michaelsauter added a commit that referenced this pull request Jan 20, 2022
michaelsauter added a commit that referenced this pull request Jan 20, 2022
michaelsauter added a commit that referenced this pull request Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Label pipelines with repository and Git ref
2 participants