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

add --lookup option #65

Merged
merged 7 commits into from
Sep 6, 2022
Merged

add --lookup option #65

merged 7 commits into from
Sep 6, 2022

Conversation

jschicktanz
Copy link
Contributor

@jschicktanz jschicktanz commented Aug 22, 2022

What this PR does / why we need it:
add --lookup option to various commands.
as a prerequisite, added support for lookup option in transfer handler.

Which issue(s) this PR fixes:
Fixes #17

Special notes for your reviewer:

Release note:

add `--lookup` option to various commands

@jschicktanz jschicktanz requested a review from a team as a code owner August 22, 2022 14:53
@jschicktanz jschicktanz requested review from achimweigel and In-Ko and removed request for a team August 22, 2022 14:53
@jschicktanz jschicktanz changed the title adds --lookup option to cmds add --lookup option Aug 22, 2022
@jschicktanz jschicktanz marked this pull request as draft August 24, 2022 07:55
@gardener-robot gardener-robot added size/m Medium and removed size/xs labels Aug 31, 2022
@In-Ko In-Ko removed their request for review September 5, 2022 07:17
@jschicktanz jschicktanz requested review from mandelsoft and removed request for achimweigel September 5, 2022 08:03
@jschicktanz jschicktanz marked this pull request as ready for review September 5, 2022 08:21
@jschicktanz jschicktanz requested a review from a team as a code owner September 5, 2022 08:21
return nil
}

func WithResolver(resolver ocm.ComponentVersionResolver) transferhandler.TransferOption {
Copy link
Contributor

Choose a reason for hiding this comment

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

The options functions so far do not is the With prefix.

Such functions are typically used to setup a builder, which we do not have here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

})
})

env.OCMCommonTransport(componentBArchive, accessio.FormatDirectory, func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this really additive, if A and B are the same archive file?

Copy link
Contributor Author

@jschicktanz jschicktanz Sep 5, 2022

Choose a reason for hiding this comment

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

yes, i debugged into a test and it works.
also the other test is still running

}

func (o *resolverOption) ApplyTransferOption(to transferhandler.TransferOptions) error {
to.(ResolverOption).SetResolver(o.resolver)
Copy link
Contributor

Choose a reason for hiding this comment

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

May be, we should for all those cases return an error if the actual option set does not accept this kind of config

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@gardener-robot
Copy link
Contributor

@jschicktanz You need rebase this pull request with latest master branch. Please check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/l Large
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature parity] Make Lookup repository option available for all commands
4 participants