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

Separate Step and Sidecar types #3077

Merged
merged 1 commit into from Aug 11, 2020

Conversation

Peaorl
Copy link
Contributor

@Peaorl Peaorl commented Aug 7, 2020

Changes

This PR separates the Step and Sidecar types from each other (i.e. they are not simply aliases anymore).
This change is needed for #1690 and #3013.
Currently only one function relies on these two types to be aliases.
These changes are partially based on https://github.com/tektoncd/pipeline/pull/3013/files.

Additionally, .swp is added to the .gitignore file.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes tests (if functionality changed/added)
  • Includes docs (if user facing)
  • Commit messages follow commit message best practices
  • Release notes block has been filled in or deleted (only if no user facing changes)

See the contribution guide for more details.

Double check this list of stuff that's easy to miss:

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

NONE

@tekton-robot tekton-robot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 7, 2020
@tekton-robot
Copy link
Collaborator

Hi @Peaorl. Thanks for your PR.

I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@tekton-robot tekton-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 7, 2020
@Peaorl Peaorl marked this pull request as draft August 7, 2020 20:08
@chmouel
Copy link
Member

chmouel commented Aug 8, 2020

fyi we usually don't add code editor exclude files in gitignore but usually to your global ignore/exclude file, see this article for more info :
https://julien.danjou.info/properly-managing-your-gitignore/

/ok-to-test

@tekton-robot tekton-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 8, 2020
@Peaorl
Copy link
Contributor Author

Peaorl commented Aug 10, 2020

/retest

@Peaorl Peaorl marked this pull request as ready for review August 10, 2020 12:04
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 10, 2020
@ghost
Copy link

ghost commented Aug 10, 2020

fyi we usually don't add code editor exclude files in gitignore

I think I understand the reason why but in this case we already have emacs, vscode and jetbrains ignore rules in place. Should we remove those?

@@ -125,8 +125,15 @@ type Step struct {
Script string `json:"script,omitempty"`
}

// A sidecar has the same data structure as a Step, consisting of a Container, and optional Script.
type Sidecar = Step
// Sidecar has nearly the same data structure as Step, consisting of a Container and an optional Script, but does not have the ability to timeout.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor nit: suggest matching comment style with others in the file and wrapping the lines around 80-100 characters.

similarly for other comments in this pr.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in new commit!

@Peaorl
Copy link
Contributor Author

Peaorl commented Aug 10, 2020

/test pull-tekton-pipeline-integration-tests

(Retrying because there was a general problem fetching docker images)

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 10, 2020
@ghost
Copy link

ghost commented Aug 10, 2020

Could you squash the commits into one?

Ah, you'll also need to include the following at the bottom of your PR description:

```release-note
NONE
```

/kind cleanup

@tekton-robot tekton-robot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Aug 10, 2020
@Peaorl Peaorl force-pushed the separateStepAndSidecarTypes branch from 41a78d5 to defef46 Compare August 10, 2020 20:30
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 10, 2020

CLA Check
The committers are authorized under a signed CLA.

@tekton-robot tekton-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 10, 2020
@Peaorl Peaorl force-pushed the separateStepAndSidecarTypes branch from defef46 to 41a78d5 Compare August 10, 2020 20:33
@tekton-robot tekton-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Aug 10, 2020
@Peaorl Peaorl force-pushed the separateStepAndSidecarTypes branch from 41a78d5 to 8fd42b1 Compare August 10, 2020 22:18
Originally the Sidecar type is an alias of the Step type.
Both tektoncd#3013 and tektoncd#1690 will require the two types to divert from each other.
This commit separates the two types and updates code to accomodate convertListOfSteps() which originally depended on theses types to be the same.
Partially based on: https://github.com/tektoncd/pipeline/pull/3013/files
@Peaorl Peaorl force-pushed the separateStepAndSidecarTypes branch from 8fd42b1 to f0954c7 Compare August 10, 2020 23:00
@tekton-robot
Copy link
Collaborator

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ghost
Copy link

ghost commented Aug 11, 2020

/lgtm

@tekton-robot tekton-robot assigned ghost Aug 11, 2020
@tekton-robot tekton-robot added lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesnt merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Aug 11, 2020
@ghost
Copy link

ghost commented Aug 11, 2020

/test pull-tekton-pipeline-integration-tests

@tekton-robot tekton-robot merged commit 04d5a8c into tektoncd:master Aug 11, 2020
@Peaorl Peaorl deleted the separateStepAndSidecarTypes branch August 11, 2020 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesnt merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants