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

simple support for disabling uploaders #567

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

mandelsoft
Copy link
Contributor

@mandelsoft mandelsoft commented Nov 8, 2023

Description

This PR introduces the option --disable-uploads for the command ocm transfer components.

If combined with --copy-resources it can be used to provide a completely self-contained component version artifact on the target side of the transport. All resources (or sources with --copy-sources) will be stored as local blobs
on the target side.

If the target is an OCI registry, the complete content of a component version is stored in a single OCI artifact

This transport mode is intended to be used for the RBSC upload tools intended to be used to uniformly publish SAP OCM components via the repository based shipment channel.

Attention: This is a quick-win implementation of this feature just disabling the uploaders in the context.
A better implementation would provide this feature via transport option for the transport handler.
This would mean to add appropriate options to the CV interface and will be done after the redesign of the
implementation support for OCM storage backends,

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI
  • 📦 Chore (Release)
  • ⏩ Revert

Related Tickets & Documents

  • Related Issue # (issue)
  • Closes # (issue)
  • Fixes # (issue)

Remove if not applicable

Screenshots

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help
  • Separate ticket for tests # (issue/pr)

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Added to documentation?

  • 📜 README.md
  • 🙅 no documentation needed

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@@ -110,6 +113,10 @@ func (o *Command) Run() error {
defer session.Close()
session.Finalize(o.OCMContext())

if o.DisableBlobHandlers {
out.Outln(o.Context, "standard blob upload handlers are disabled.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
out.Outln(o.Context, "standard blob upload handlers are disabled.")
out.Outln(o.Context, "Standard blob upload handlers are disabled.")

Copy link
Contributor

Choose a reason for hiding this comment

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

we should quickly move this from the spec, too

Copy link
Contributor

@morri-son morri-son left a comment

Choose a reason for hiding this comment

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

just one suggestion for a printed output.

@mandelsoft mandelsoft merged commit 625b59a into open-component-model:main Nov 8, 2023
@mandelsoft mandelsoft deleted the fix branch November 8, 2023 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants