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

scp: add option types #24240

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

zackattackz
Copy link

Prior to this commit, many scp functions existed without option structs, which would make extending functionality (adding new options) impossible without breaking changes, or without adding redundant wrapper functions.

This commit adds in new option types for various scp related functions, and changes those functions' signatures to use the new options.

This commit also modifies the ImageEngine.Scp() function's interface to use the new opts.

The commit also renames the existing ImageScpOptions entity type to ScpTransferImageOptions. This is because the previous ImageScpOptions was inaccurate, as it is not the actual options for ImageEngine.Scp(). ImageEngine.Scp() should instead receive ImageScpOptions.

This commit should not change any behavior, however it will break the existing functions' signatures.

--

Created this PR to replace #24234 to go ahead and make the breaking changes.

Worth noting: I selected the functions to change pretty arbitrarily. Just based on if I think they have a realistic chance of needing to change in order to add new features. I based it on my experience working on #24211 so it is at least grounded in some way. But I am open to feedback if more or fewer functions should be changed.

Does this PR introduce a user-facing change?

None

Prior to this commit, many scp functions existed without option structs, which would make extending functionality (adding new options) impossible without breaking changes, or without adding redundant wrapper functions.

This commit adds in new option types for various scp related functions, and changes those functions' signatures to use the new options.

This commit also modifies the `ImageEngine.Scp()` function's interface to use the new opts.

The commit also renames the existing `ImageScpOptions` entity type to `ScpTransferImageOptions`. This is because the previous `ImageScpOptions` was inaccurate, as it is not the actual options for `ImageEngine.Scp()`. `ImageEngine.Scp()` should instead receive `ImageScpOptions`.

This commit should not change any behavior, however it will break the existing functions' signatures.

Signed-off-by: Zachary Hanham <[email protected]>
@github-actions github-actions bot added the kind/api-change Change to remote API; merits scrutiny label Oct 11, 2024
Copy link
Contributor

openshift-ci bot commented Oct 11, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: zackattackz
Once this PR has been reviewed and has the lgtm label, please assign ashley-cui for approval. For more information see the Kubernetes Code Review Process.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/api-change Change to remote API; merits scrutiny release-note-none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant