-
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
Add a warning if git used as an output 🚨 #1310
Conversation
In tektoncd#1109 we will be removing support for git as an output. In the current implementation, git as an output is just a volume that holds the data from the git repo, and copies it between Tasks (when git as an output is linked to git as an input). As discussed in tektoncd#1076, the model we want for PipelineResources is for them to take the outside world and represent it on disk when used as an input, and when used as an output, to update the outside world. In order to do this, what we actually want for a git output is for it to create a commit the repo it is referencing. However up until this point folks have been using git resources in the way that we want Volume Resources to behave tektoncd#1062, so we want to transition folks to Volume Resources and away from using git outputs. Fixes tektoncd#1283
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bobcatfish 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 |
The following is the coverage report on pkg/.
|
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.
Thank you for this!
I'm not sure people would necessarily notice a new warning in the controller logs, but it's worth adding it, the more channel we advertise changes, the better.
} | ||
|
||
outputResourceSetup(t) | ||
o, ol := observer.New(zap.WarnLevel) |
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.
Nice :)
if err != nil { | ||
t.Fatalf("Did not expect error but got %v", err) | ||
} | ||
if len(ol.All()) != 1 { |
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.
It could be a different warning message, but I guess it's unlikely
/lgtm |
Note to self: need to add this warning for cluster outputs too! |
@sbwsg and @dlorenc have a new design to propose for #1272 and #1076 which I think will make this change unnecessary since they are proposing overhauling the way we express these resources completely, so I'm going to close this PR for now, but we can re-open if we decide we want to keep making these incremental improvements to PipelineResources as they are today (see also #1062 (comment)) |
Changes
In #1109 we will be removing support for git as an output. In the
current implementation, git as an output is just a volume that holds the
data from the git repo, and copies it between Tasks (when git as an
output is linked to git as an input). As discussed in #1076, the model
we want for PipelineResources is for them to take the outside world and
represent it on disk when used as an input, and when used as an output,
to update the outside world. In order to do this, what we actually want for a
git output is for it to create a commit the repo it is referencing.
However up until this point folks have been using git resources in the
way that we want Volume Resources to behave #1062, so we want to
transition folks to Volume Resources and away from using git outputs.
Fixes #1283
Since the way for ppl to handle this would be to migrate to the Volume Resource, we can't really merge this until we merge #1062:
/hold
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 and TaskRun 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.
Release Notes