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

TEP-0114: Tests Wait Custom Task without CRD in PipelineRun #5356

Merged
merged 1 commit into from
Aug 24, 2022

Conversation

XinruZhang
Copy link
Member

Changes

This commit starts to test the behavior of Custom Task Run without
CRD
in a PipelineRun against a Custom Task Controller.

Future Work: test Custom Task Run with CRD against the Wait Custom
Task Controller.

/kind feature

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Has Docs included if any changes are user facing
  • Has Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including
    functionality, content, code)
  • Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

NONE

@tekton-robot tekton-robot added kind/feature Categorizes issue or PR as related to a new feature. 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 23, 2022
@tekton-robot tekton-robot added 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 23, 2022
@jerop
Copy link
Member

jerop commented Aug 23, 2022

/assign

@lbernick lbernick self-assigned this Aug 23, 2022
@tekton-robot tekton-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 23, 2022
@jerop jerop changed the title [TEP-114] Tests Wait Custom Task without CRD in PipelineRun TEP-0114: Tests Wait Custom Task without CRD in PipelineRun Aug 23, 2022
@lbernick
Copy link
Member

I'm a bit confused what the goal of these tests are-- what do you mean by with/without CRD? The name of the test class is "TestWaitCustomTask_PipelineRun" but the the test cases are PipelineRun running/succeeded/timed out and it seems like it's testing interaction between pipelinerun timeout and wait task duration. Could you please just give a few sentences about what the behavior being tested is?

@XinruZhang
Copy link
Member Author

XinruZhang commented Aug 23, 2022

I'm a bit confused what the goal of these tests are-- what do you mean by with/without CRD? The name of the test class is "TestWaitCustomTask_PipelineRun" but the the test cases are PipelineRun running/succeeded/timed out and it seems like it's testing interaction between pipelinerun timeout and wait task duration. Could you please just give a few sentences about what the behavior being tested is?

Thanks for the comment Lee @lbernick, great point. I think the main purpose is to test how the run status is reflected upon different PipelineRun statuses. I'll update the testing name to make it clearer.

About with/without CRD, the difference is whether the Custom Task has it's own spec&status defined. We can take the existing wait-task controller as an example, we only need to specify apiversion, kind and an input param duration to make it work. The wait.testing.tekton.dev/v1alpha1/Wait doesn't have its own spec and status fields. Therefore the Run status doesn't change upon Wait.status changes.

Shortly speaking, we want to mimic the actual usage of Custom Task Run.

wdyt? Let me know there's still confusion :)

@tekton-robot tekton-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 23, 2022
@XinruZhang XinruZhang force-pushed the ctb-nocrd-pr branch 2 times, most recently from 2f483f5 to 9d49fef Compare August 23, 2022 21:23
Prior to this commit, we were not able to test Custom Task Run in

This commit starts to test the behavior of Custom Task Run without
CRD in a PipelineRun against a Custom Task Controller.

Future Work: test Custom Task Run with CRD against the Wait Custom
Task Controller.
@jerop
Copy link
Member

jerop commented Aug 24, 2022

@lbernick @XinruZhang adding a comment to clarify further.

There are some Custom Tasks that don't define CRDs - they are only used inline in Runs and PipelineRuns - these are referred to as "unnamed" Custom Tasks in TEP-0002. Examples of these are Wait and CEL.

There are some Custom Tasks that define CRDs e.g. TaskLoop and PipelineLoop.

These end-to-end tests cover the first scenario (without CRDs) and this may be sufficient for now. If needed later, we may consider adding another Custom Task for testing that covers the second scenario.

Copy link
Member

@jerop jerop left a comment

Choose a reason for hiding this comment

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

Thanks @XinruZhang!

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jerop

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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 24, 2022
@lbernick
Copy link
Member

ok thanks @XinruZhang @jerop for the explanation, this makes sense.

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 24, 2022
@tekton-robot tekton-robot merged commit a1a8458 into tektoncd:main Aug 24, 2022
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/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesnt merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants