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

Migrate git-init image off PipelineResourceResult #6335

Closed

Conversation

JeromeJu
Copy link
Member

@JeromeJu JeromeJu commented Mar 9, 2023

Changes

This commit makes introduces the generics of PipelineResourceResult and TaskrunResult in termination package and migrates the git-init image off from using PipelineResourceResult.

/kind misc

Submitter Checklist

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

  • [n/a] 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/misc Categorizes issue or PR as a miscellaneuous one. release-note-none Denotes a PR that doesnt merit a release note. labels Mar 9, 2023
@tekton-robot tekton-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 9, 2023
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign afrittoli after the PR has been reviewed.
You can assign the PR to them by writing /assign @afrittoli in a comment when ready.

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

@JeromeJu JeromeJu force-pushed the migrate-git-init-off-resourcesresult branch from e78dd84 to 9aa9414 Compare March 9, 2023 13:52
@JeromeJu
Copy link
Member Author

JeromeJu commented Mar 9, 2023

/test pull-tekton-pipeline-integration-tests

@@ -30,12 +30,12 @@ const (
)

// WriteMessage writes the results to the termination message path.
func WriteMessage(path string, pro []v1beta1.PipelineResourceResult) error {
func WriteMessage[T v1beta1.TaskRunResult | v1beta1.PipelineResourceResult](path string, pro []T) error {
Copy link
Member

Choose a reason for hiding this comment

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

This change doesn't require the changes to git-init; can this PR be focused just on just the changes to pkg/termination or at least wait until #6310 is merged? It could also tackle termination.ParseMessage.

Copy link
Member

Choose a reason for hiding this comment

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

Any reason to use generics here ? 🤔 Not that I am fundamentally against but…

Copy link
Member

Choose a reason for hiding this comment

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

Oh because either TaskRunResult or PipelineResourceResult... 😓

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh because either TaskRunResult or PipelineResourceResult... 😓

trying to migrate off PipelineResourceResult while keeping it least confusing 😿 but seems it could also be confusing.
I will add more comments in the PR message/commit

Copy link
Member Author

Choose a reason for hiding this comment

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

actually after trying out the unmarshall, i felt generics don't work well with unmarshalls

@JeromeJu
Copy link
Member Author

JeromeJu commented Mar 9, 2023

/hold
#6310 as prereq

@tekton-robot tekton-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Mar 9, 2023
This commit makes introduces the generics of PipelineResourceResult
and TaskrunResult in termination package and migrates the git-init image
off from using PipelineResourceResult.
@JeromeJu JeromeJu force-pushed the migrate-git-init-off-resourcesresult branch from 9aa9414 to 95ddced Compare March 14, 2023 14:04
@tekton-robot tekton-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 14, 2023
@lbernick
Copy link
Member

/hold cancel
#6310 is merged

@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 Mar 16, 2023
@lbernick
Copy link
Member

@JeromeJu do you know what the implications of swapping to a TaskRunResult are here? I think this may result in the git-init output being populated in a different part of the taskrun status and I'm not sure whether or not we want that

@pritidesai pritidesai added this to the Pipelines v0.47 milestone Mar 18, 2023
@lbernick lbernick mentioned this pull request Mar 21, 2023
4 tasks
@lbernick
Copy link
Member

addressed in #6417

@lbernick lbernick closed this Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/misc Categorizes issue or PR as a miscellaneuous one. release-note-none Denotes a PR that doesnt merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants