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

[Feature Request]: nuctl export functions to plaintext source code #3198

Open
1 of 3 tasks
beasteers opened this issue Mar 15, 2024 · 1 comment
Open
1 of 3 tasks

Comments

@beasteers
Copy link

Feature Type

  • Adding new functionality to Nuclio

  • Changing existing functionality in Nuclio

  • Removing existing functionality in Nuclio

Problem Description

nuctl export functions outputs the function source code in base64.

This is fine, but if you're committing exports to source control, this won't give you nice diffs.

Feature Description

Add a flag nuctl export functions --source-encoding utf-8

This could write the source code as a multi-line string e.g. functionSourceCodeString: | ... instead of functionSourceCode

Then when importing, it could check for both keys and handle base64/utf-8 accordingly.

Alternative Solutions

It's relatively easy to postprocess the yaml on either side, but that involves having an additional script which is a bit cumbersome.

Additional Context

No response

@rokatyy
Copy link
Contributor

rokatyy commented Mar 18, 2024

@beasteers Hey,

Thank you for this suggestion!
I think Nuclio already has a solution.

I recommend you looking at the page about code entry types in our documentation . If you need nice diffs, you can use git or github code-entry types, so you won't have any base64 code in your exported function, but only a repository and a branch and at the same time you will be able to see nice diffs in github/git.

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

No branches or pull requests

2 participants