Skip to content

feat(scripts): assign spec-compliant Margo media types to application package resource files - #406

Merged
vireshnavalli merged 2 commits into
developmentfrom
feat/spec-compliant-resource-media-types
Sep 15, 2026
Merged

vireshnavalli merged 2 commits into
developmentfrom
feat/spec-compliant-resource-media-types

Conversation

@sanjujunnuthula

Copy link
Copy Markdown
Contributor

This PR updates the OCI packaging script (scripts/modules/packages.sh) to adhere to the Margo Application Registry Specification when pushing application package resource files.

Previously, all resource files inside resources/ were pushed as generic application/octet-stream layers. This update inspects margo.yaml (and falls back to file name conventions) to assign the appropriate Margo-specific media type and format suffix to each layer.

Key Changes

  1. Added get_margo_media_type Helper:
    • Matches referenced files under metadata.catalog.application in margo.yaml (icon, descriptionFile, releaseNotes, licenseFile).
    • Maps file extensions (.md, .png, .jpg, .txt, .pdf, etc.) to the required format suffixes (+markdown, +png, +jpeg, +plain, +pdf).
    • Dynamically constructs the layer media types:
      • application/vnd.margo.app.icon.v1+{format}
      • application/vnd.margo.app.descriptionFile.v1+{format}
      • application/vnd.margo.app.releaseNotes.v1+{format}
      • application/vnd.margo.app.licenseFile.v1+{format}
  2. Updated Package Push Functions:
    • Replaced hardcoded application/octet-stream in push_nextcloud_to_oci and push_custom_otel_to_oci with dynamic media type resolution.
image

… resource files

Signed-off-by: sanjujunnuthula <sanjuvardhan.junnuthula@capgemini.com>
Signed-off-by: sanjujunnuthula <sanjuvardhan.junnuthula@capgemini.com>

@spulkit138 spulkit138 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks Good! Can be merged if tested.

@vireshnavalli
vireshnavalli merged commit cb55fe9 into development Sep 15, 2026
9 checks passed
@vireshnavalli
vireshnavalli deleted the feat/spec-compliant-resource-media-types branch September 15, 2026 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TASK: ] Implement Margo-Specific Media Types for Application Resource Files

5 participants