-
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
Provide more guidance on not using PipelineResources 🚧 #2483
Conversation
04f8a8e
to
03317a0
Compare
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.
/cc @sbwsg
_More on the reasoning and what's left to do in | ||
[Why aren't PipelineResources in Beta?](docs/resources.md#why-arent-pipelineresources-in-beta)._ | ||
|
||
In the near-term `PipelineResources` will continue to be supported by Tekton. |
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.
Do we want to use supported
here ?
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.
Until there's a definite path away / around them I kinda figure I'll be continuing to review and merge fixes for the existing types and will try to provide help for PipelineResource issues when I have the time for it. But I would push back against anyone who wants to add new PR types. There was a suggestion of an SVN PipelineResource recently and I pushed back against that, for example. supported
seems right to me?
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.
I'm updating this to try to say more of what @sbwsg said instead of "supported"
workspace: git-source | ||
# If you want you can add a Task that uses the IMAGE_DIGEST from the kaniko task | ||
# via $(tasks.build-image.results.IMAGE_DIGEST) - this was a feature we hadn't been | ||
# able to fully delivery with the Image PipelineResource! |
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.
nit: delivery -> deliver
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.
whoops thanks!
_More on the reasoning and what's left to do in | ||
[Why aren't PipelineResources in Beta?](docs/resources.md#why-arent-pipelineresources-in-beta)._ | ||
|
||
In the near-term `PipelineResources` will continue to be supported by Tekton. |
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.
Until there's a definite path away / around them I kinda figure I'll be continuing to review and merge fixes for the existing types and will try to provide help for PipelineResource issues when I have the time for it. But I would push back against anyone who wants to add new PR types. There was a suggestion of an SVN PipelineResource recently and I pushed back against that, for example. supported
seems right to me?
03317a0
to
3ebd503
Compare
PTAL @vdemeester @sbwsg |
Changes look good to me! Will leave it to someone else to lgtm since I already approved. |
wat |
/test pull-tekton-pipeline-build-tests |
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 for this.
I personally disagree with the idea of moving away from the abstraction provided by pipeline resources, but I appreciate that people may need to rely on a beta-only API.
As highlighted by the "what's still missing" chapter, we do not have functional parity yet, so personally I would welcome contribution towards improving and redesigning them.
In the near-term we plan to continue to merge fixes to existing `PipelineResource` types, but | ||
are pushing back against adding significant new features or new `PipelineResource` types, and | ||
encourage people to use `Tasks` for those instead. At some point the feature may well be deprecated | ||
and subsequently replaced. |
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.
I continue to disagree with this general statement, I still believe that pipeline resources are a much stronger abstraction than Tasks. I think we should fix / re-design the implementation behind pipeline resources and keep the abstraction, not walk away from it.
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.
Maybe we could change the language here to At some point the feature in its current form could be redesigned, replaced, deprecated, or removed entirely
?
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.
Okay I've updated this, let me know if the new language is still too strong @afrittoli
``` | ||
|
||
_Note that using `PipelineResources` with this `Task` has an immediate downside in that it is | ||
coupled to `git`; one can't use the same `Task` with files that were obtained some other way._ |
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.
I'm not sure that this is completely - we do support optional pipeline resources - so a Task that supports an optional pipeline resource could also accept a parameter that points to the location of the data if the resource is not provided. We probably would need to improve of this to make it nice and easy to use.
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.
Right, but this would be band-aid.
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.
hm interesting point - I hadn't thought about optional PipelineResources! I think having the git coupling in the Task is still not the greatest, but like you said it's not actually required anymore - I'm going to just remove this sentence for now!
The abstraction provided by PipelineResource is nice, but we need to redisgn the concept (and part of the abstraction) — hence letting it in alpha, hence making sure users using |
27d114b
to
3ebd503
Compare
02f8fb6
to
796317c
Compare
Since we haven't actually decided to deprecate PipelineResources, I've tried to soften the language around that a bit, and also removed an inaccurate sentence that @afrittoli pointed out. Should be ready for another look @afrittoli @vdemeester @sbwsg @sergetron ! |
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.
/meow
| `spec.inputs` | Removed from `Tasks` | | ||
| `spec.outputs` | Removed from `Tasks` | | ||
|
||
| `spec.inputs.resources` | [`spec.resources.inputs`](#changes-to-pipelineresources) | |
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.
nit: there is an extra space
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.
whoops, should be fixed now!
In response to this:
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. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sbwsg, vdemeester 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 |
796317c
to
cb7e1d7
Compare
PTAL |
Re-opening to see if that will trigger |
Just realized I probably could have triggered that by actually adding the kind XD /kind documentation |
This commit makes some updates to the migration guide: - The section on how the inputs/outputs PipelineResources spec has changed is now at the end of the guide, since it's a bit confusing to tell ppl to try to migrate away from them and have the new syntax for these front and center at the same time - There is now an example of how you can make a Pipeline that does the equivalent of what you used to get with a Task that used image and git resources
cb7e1d7
to
16eea0e
Compare
/lgtm |
Changes
This commit makes some updates to the migration guide:
has changed is now at the end of the guide, since it's a bit confusing
to tell ppl to try to migrate away from them and have the new syntax
for these front and center at the same time
equivalent of what you used to get with a Task that used image and git
resources
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Double check this list of stuff that's easy to miss:
cmd
dir, please updatethe release Task to build and release this image.
Reviewer Notes
If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.