-
Notifications
You must be signed in to change notification settings - Fork 23
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
Extend plugin API to support transfer handlers #937
Open
mandelsoft
wants to merge
13
commits into
open-component-model:main
Choose a base branch
from
mandelsoft:plugins
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mandelsoft
force-pushed
the
plugins
branch
5 times, most recently
from
September 26, 2024 10:57
1c0a15f
to
7c7bdfb
Compare
fabianburth
requested changes
Oct 14, 2024
api/ocm/plugin/ppi/utils.go
Outdated
Comment on lines
183
to
192
type testDH struct { | ||
DecisionHandlerBase | ||
} | ||
|
||
func (d *testDH) DecideOn(p Plugin, question interface{}) (bool, error) { | ||
panic("just a type test") | ||
} | ||
|
||
var _ DecisionHandler = (*testDH)(nil) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
type testDH struct { | |
DecisionHandlerBase | |
} | |
func (d *testDH) DecideOn(p Plugin, question interface{}) (bool, error) { | |
panic("just a type test") | |
} | |
var _ DecisionHandler = (*testDH)(nil) |
remove
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it
The OCM library already provides an extension point to provide transfer handlers
controlling the transport of component versions from one environment into another one.
A transfer handler controls:
So far, there were two implementations:
--recursive
or--copy-resources
the behaviour based on a spiff script.
On the command line interface always the spiff handler was used which works like the standard handler if no script
is configured.
This PR adds three new features:
which can be used un the command line to select and configure supported transfer handler types.
provide an arbitrary rule set controlling the transport process.
Similar to the uploaders and downloaders the naming scheme for transfer handlers looks as follows:
ocm/<builtin handlers>
: used for the already existingstandard
andspiff
handlers.Additional handlers may now add themselves to appropriate names to be usable from the command line.
plugin/'
A dedicated handler maps plugin provided transfer handlers into the naming scheme.It uses the sub scheme
<plugin name>[/<handler name>]
. A plugin may provide multiple (named) handlers.Which issue(s) this PR fixes