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

Convert test/cluster_resource_test.go's Tekton structs to YAML #4284

Merged
merged 1 commit into from
Oct 7, 2021

Conversation

abayer
Copy link
Contributor

@abayer abayer commented Oct 6, 2021

Changes

Part of #4276

This is just one file from test/..., but it seemed like a good "let's start here" case to make sure the approaches I've gone with are acceptable:

  • To deal with cases where we're parameterizing the struct currently, this keeps the parameterizing, using fmt.Sprintf(...), since I decided that the raw multiline string literal was the way to go even if we need to do some %s replacement in it.
  • For the moment, at least, I'm only worrying about Tekton structs - so the Secret and ConfigMap used in this test I just leave as is, rather than changing them to YAML. If y'all feel we should move those too, well, I'll do that. =)

/kind cleanup

Submitter Checklist

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

  • Docs included if any changes are user facing
  • Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including
    functionality, content, code)
  • Release notes block below has been filled in or deleted (only if no user facing changes)

Release Notes

NONE

Part of tektoncd#4276

Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
@tekton-robot tekton-robot added release-note-none Denotes a PR that doesnt merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Oct 6, 2021
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 6, 2021
@abayer
Copy link
Contributor Author

abayer commented Oct 6, 2021

/wip
/assign @vdemeester @pritidesai

abayer added a commit to abayer/tektoncd-pipeline that referenced this pull request Oct 6, 2021
fixes tektoncd#4284

Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
@abayer abayer force-pushed the yaml-in-cluster_resource_test branch from 1baea70 to 7663f76 Compare October 6, 2021 17:37
abayer added a commit to abayer/tektoncd-pipeline that referenced this pull request Oct 6, 2021
fixes tektoncd#4284

Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
@abayer
Copy link
Contributor Author

abayer commented Oct 6, 2021

#4286 fixes the flaky pkg/reconciler/taskrun/taskrun_test.go TestReconcile/params failure, fwiw.

@pritidesai
Copy link
Member

/test pull-tekton-pipeline-alpha-integration-tests
/test pull-tekton-pipeline-integration-tests

@pritidesai
Copy link
Member

To deal with cases where we're parameterizing the struct currently, this keeps the parameterizing, using fmt.Sprintf(...), since I decided that the raw multiline string literal was the way to go even if we need to do some %s replacement in it.

This will be helpful in most of the tests since some of the artifacts including names are auto generated.

For the moment, at least, I'm only worrying about Tekton structs - so the Secret and ConfigMap used in this test I just leave as is, rather than changing them to YAML. If y'all feel we should move those too, well, I'll do that. =)

You decide 😄 I think we can if we have many occurrences of secrets and ConfigMaps. For now, this is great.

/approve

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 6, 2021
@abayer
Copy link
Contributor Author

abayer commented Oct 6, 2021

@pritidesai - ok! If I hit enough other corev1 structs in test/..., I'll switch them to YAML, but I won't worry about that to start. Next PR up in the chain after this one is going to switch all of Task, TaskRun, Pipeline, PipelineRun, and PipelineResource to YAML, so it may take a few days.

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pritidesai, 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:
  • OWNERS [pritidesai,vdemeester]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Member

@afrittoli afrittoli left a comment

Choose a reason for hiding this comment

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

Nice, thank you!
/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 7, 2021
@abayer abayer added lgtm Indicates that a PR is ready to be merged. and removed lgtm Indicates that a PR is ready to be merged. labels Oct 7, 2021
@tekton-robot tekton-robot merged commit ce098f8 into tektoncd:main Oct 7, 2021
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. 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.

None yet

5 participants