-
Notifications
You must be signed in to change notification settings - Fork 114
Core:Kraken: Allow installing extensions directly from .tar image file
#3646
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
Draft
joaomariolago
wants to merge
4
commits into
bluerobotics:master
Choose a base branch
from
joaomariolago:allow-ext-install-by-file
base: master
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.
Draft
Core:Kraken: Allow installing extensions directly from .tar image file
#3646
joaomariolago
wants to merge
4
commits into
bluerobotics:master
from
joaomariolago:allow-ext-install-by-file
Conversation
This file contains hidden or 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
Reviewer's GuideThis PR enables installing Kraken extensions directly from local tar images by adding backend support for importing Docker images, extracting metadata, staging temporary extensions, and new API endpoints, along with front-end UI and logic for uploading, configuring, and finalizing these extensions. Sequence diagram for extension installation from .tar filesequenceDiagram
actor User
participant Frontend
participant Backend
participant Docker
User->>Frontend: Selects and uploads .tar file
Frontend->>Backend: POST /extension/upload (tar file)
Backend->>Docker: Import image from tar
Docker-->>Backend: Image loaded
Backend->>Docker: Inspect image labels
Docker-->>Backend: Metadata returned
Backend->>Backend: Create temporary extension
Backend-->>Frontend: Return temp_tag and metadata
User->>Frontend: Configures extension details
Frontend->>Backend: POST /extension/finalize (with temp_tag)
Backend->>Backend: Finalize temporary extension
Backend->>Docker: Tag image with final identifier
Backend->>Backend: Install extension
Backend-->>Frontend: Installation progress
ER diagram for temporary extension staging and finalizationerDiagram
EXTENSION_SETTINGS {
string identifier
string name
string docker
string tag
string permissions
bool enabled
string user_permissions
}
EXTENSION_SOURCE {
string identifier
string tag
string name
string docker
bool enabled
string permissions
string user_permissions
}
EXTENSION_SETTINGS ||--|| EXTENSION_SOURCE : "finalize uses source to update settings"
EXTENSION_SETTINGS {
string identifier "temporary extension"
}
Class diagram for new and updated extension upload logicclassDiagram
class Extension {
+static async load_image_from_tar(tar_content: bytes) -> str
+static async inspect_image_labels(image_name: str) -> Dict[str, Any]
+static async cleanup_temporary_extensions() -> None
+async create_temporary_extension(image_name: str, metadata: Dict[str, Any]) -> Extension
+async finalize_temporary_extension(temp_extension: Extension, identifier: str, source: ExtensionSource) -> Extension
}
class ExtensionSource {
identifier: str
tag: str
name: str
docker: str
enabled: bool
permissions: str
user_permissions: str
}
class ExtensionSettings {
identifier: str
name: str
docker: str
tag: str
permissions: str
enabled: bool
user_permissions: str
}
Extension o-- ExtensionSource
Extension o-- ExtensionSettings
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Allows users to install extensions directly from local file system without need of external manifests or docker hub.
Summary by Sourcery
Allow users to install Kraken extensions directly from local .tar image files by uploading a Docker image tar, extracting metadata from its labels, and managing temporary extensions through new upload and finalize workflows
New Features:
Enhancements: