-
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
[TEP074] Remove Git PipelineResources #6135
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
e5d65a1
to
eefc5a2
Compare
/kind misc |
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
eefc5a2
to
7f39c57
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
This commit removes the `Git` pipelineResources, it removes `github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1/git` and the corresponding test cases.
6de3871
to
3999819
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
var validResource = v1beta1.TaskResource{ | ||
ResourceDeclaration: v1beta1.ResourceDeclaration{ | ||
Name: "validsource", | ||
Type: "git", |
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.
technically it would be better to replace this with the image resource as you've done elsewhere (aligns better with our code standards on always being in a releasable state)
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 the suggestion, I was also debating this to see what would be a best solution since we are going to be in a stage where all the resourceTypes are removed before we start to remove the generic resourceTypes functions. Does that mean the removal of the last resourceTypes should also include the removal of the generic functions? But until then we need to change them all to the very last resource type?
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 the answer offline with Lee.
I am hoping to put this PR as the last removal along with the generic functions of PipelineResources eg. inputresources etc.
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 might make sense to put a hold on this pr or mark it as a draft in that case
@@ -469,31 +173,6 @@ func TestCleanupArtifactStorage(t *testing.T) { | |||
} | |||
} | |||
|
|||
func TestInitializeArtifactStorageWithoutConfigMap(t *testing.T) { |
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.
is the function InitializeArtifactStorage deleted somewhere?
@@ -1103,19 +1086,6 @@ func TestApplyResources(t *testing.T) { | |||
spec.Steps[8].Image = "/foo/builtImage" | |||
spec.Steps[9].Image = "/workspace/foo/builtImage" | |||
}), | |||
}, { | |||
name: "input resource specified", |
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 think this is OK to delete fully because despite the test name it's really a test for the git pipelineresource mutations it looks like
gcsInputs = []v1beta1.TaskResource{{ | ||
ResourceDeclaration: v1beta1.ResourceDeclaration{ | ||
Name: "workspace", | ||
Type: "gcs", | ||
TargetPath: "gcs-dir", | ||
}}} | ||
multipleGcsInputs = []v1beta1.TaskResource{ |
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.
should this be restored?
}, { | ||
desc: "invalid gcs resource type name", | ||
task: task, | ||
taskRun: &v1beta1.TaskRun{ | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Name: "get-from-invalid-gcs", | ||
Namespace: "marshmallow", | ||
}, | ||
Spec: v1beta1.TaskRunSpec{ | ||
Resources: &v1beta1.TaskRunResources{ | ||
Inputs: []v1beta1.TaskResourceBinding{{ | ||
PipelineResourceBinding: v1beta1.PipelineResourceBinding{ | ||
ResourceRef: &v1beta1.PipelineResourceRef{ | ||
Name: "storage-gcs-invalid", | ||
}, | ||
Name: "workspace", | ||
}, | ||
}}, | ||
}, | ||
}, | ||
}, | ||
wantErr: true, | ||
}, { | ||
desc: "invalid gcs resource type name", | ||
task: task, | ||
taskRun: &v1beta1.TaskRun{ | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Name: "get-from-invalid-gcs", | ||
Namespace: "marshmallow", | ||
}, | ||
Spec: v1beta1.TaskRunSpec{ | ||
Resources: &v1beta1.TaskRunResources{ | ||
Inputs: []v1beta1.TaskResourceBinding{{ | ||
PipelineResourceBinding: v1beta1.PipelineResourceBinding{ | ||
ResourceRef: &v1beta1.PipelineResourceRef{ | ||
Name: "storage-gcs-invalid", | ||
}, | ||
Name: "workspace", | ||
}, | ||
}}, | ||
}, | ||
}, | ||
}, | ||
wantErr: true, |
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.
should this be restored?
}, | ||
}, | ||
} | ||
taskWithMultipleGcsInputs := &v1beta1.Task{ |
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.
curious why this PR deletes a lot of GCS tests?
Name: "git-repo", | ||
}, | ||
ResourceSpec: &resourcev1alpha1.PipelineResourceSpec{ | ||
Type: resourcev1alpha1.PipelineResourceTypeGit, |
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'd swap to a different resource type here
/hold |
Closing as #6150 supersedes this PR |
This is targeted to be the last PR for the removal of PipelineResources along with the removal of generic pipelineresources functions.
Changes
This commit removes the
Git
pipelineResources, it removesgithub.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1/git
and the corresponding test cases.The coverage drops are expected as it is one of the last few PRs for removing the resources.
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