-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[TEP-0133]: Configure Default Resolver #6317
[TEP-0133]: Configure Default Resolver #6317
Conversation
Skipping CI for Draft Pull Request. |
/test all |
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
9ba0c42
to
ed4ebbd
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
Tracking issue: #5907 |
/assign |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @QuanZhang-William! Is there also validation for taskrefs with a default resolver configured?
This is a good question and it is a bit tricky. The short answer is no, and I feel it is not necessary?:
|
ah that's a good point-- I wish there was a better way to unit test this, but this seems fine. just a quick comment, can you add the TEP in the release note? |
ed4ebbd
to
e782f2a
Compare
4df79e6
to
96c5f78
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
Spec: v1beta1.PipelineRunSpec{ | ||
PipelineRef: &v1beta1.PipelineRef{ | ||
ResolverRef: v1beta1.ResolverRef{ | ||
Resolver: "foo", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PipelineRun
resolver must have been pre-populated at this point
Thanks @chuangw6! Good catch on the missing Regarding the edge case, yes, this is intended and I have added a test case for it. I think the examples given in the tep has elaborated this idea. |
I wonder if we're missing unit tests in |
This commit introduces a new `default-resolver-type` field to the `config-defaults` ConfigMap, which configures the default resolver type to be used when the `resolver` is not explicitly provided in the input. Supporting the default resolver type improves simplicity at the authoring time. More details can be found in [TEP-0113: Conifgure Default Resolver]. /kind feature [TEP-0113: Conifgure Default Resolver]: https://github.com/tektoncd/community/blob/main/teps/0133-configure-default-resolver.md
96c5f78
to
f037d71
Compare
Thanks @Yongxuanzhang, just added the tests, PTAL! |
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
Thank you! Test coverage also improved! |
/approve (Adding a hold in case another approver wants to review this PR but I think this is good to go) |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dibyom 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:
Approvers can indicate their approval by writing |
/cc @pritidesai |
(FYI: I am working with a limited internet/cellular connectivity in the Bay Area) how does this impact existing tasks and pipelines? The default is set to ‘git’ but how about params? How does this add value when I have to specify params for git? Please note that I am not objecting to this change, but trying to understand the impact of this. |
Hi @pritidesai, there is no impact to existing Simplicity is the main benefit of this feature. This feature can be used together with the default parameters we support for resolvers, for example: by configuring the default values like # Setting this flag to a resolver type as the default resolver
default-resolver-type: "git"
# The below fields are git resolver specific and have been supported already
# The git url to fetch the remote resource from when using anonymous cloning.
default-url: "https://github.com/tektoncd/catalog.git"
# The git revision to fetch the remote resource from with either anonymous cloning or the authenticated API.
default-revision: "main" the author can reduce a task run from
to
The use cases are discuss in TEP-0133 |
/hold cancel Chatted with Priti earlier in the day, I think we can merge once it has been rebased |
Changes
This commit introduces a new
default-resolver-type
field to theconfig-defaults
ConfigMap, which configures the default resolver type to be used when theresolver
is not explicitly provided in the input. Supporting the default resolver type improves simplicity at the authoring time. More details can be found in TEP-0113: Configure Default Resolver./kind feature
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
functionality, content, code)
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes