Skip to content

Add code-only push support for Object Storage archives#711

Open
Jaytee-fn wants to merge 2 commits intomasterfrom
PR5-code-only-fn-push
Open

Add code-only push support for Object Storage archives#711
Jaytee-fn wants to merge 2 commits intomasterfrom
PR5-code-only-fn-push

Conversation

@Jaytee-fn
Copy link
Copy Markdown
Contributor

The change adds push support for code-only functions by uploading locally built archives to Object Storage.

This PR extends 'fn push' so that when a function is marked 'code_only: true', the CLI uploads the corresponding local archive to Object Storage instead of using the traditional container image push flow.

PR includes-

  • detect code-only functions in 'fn push'
  • resolve Object Storage target from the active context
  • locate the local archive using:
    • ..zip
  • upload the archive to Object Storage
  • surface archive/config/upload failures clearly
  • preserve existing image-based push behaviour for non-code-only functions

Validation
Successful push

fn push
Code-only archive uploaded successfully as ..zip

Missing archive

If the archive does not exist, error will clearly say the built archive was not found.

Missing context config

If object_storage_bucket_name or namespace is not present in the active context, error will clearly say the code-only Object Storage target is not configured.

Upload failure

If bucket/namespace are invalid, the Object Storage upload error should be surfaced clearly.

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.

1 participant