Updating sf data-code-extension function init to accept --use-ini-feature#17
Updating sf data-code-extension function init to accept --use-ini-feature#17sbyrne-sf merged 6 commits intosalesforcecli:mainfrom
Conversation
- Move --function-invoke-opt from deploy to init as --used-in-feature - Change value from UnstructuredChunking to SearchIndexChunking - Add --test-with flag to function run (required) - Remove --target-org from function run (not needed for functions) - Make --used-in-feature optional with SearchIndexChunking default BREAKING CHANGE: Command signatures changed for function init, deploy, and run @W-22278901
- Change --used-in-feature to --use-in-feature BREAKING CHANGE: Command signatures changed for function init, deploy, and run @W-22278901
| <orderEntry type="inheritedJdk" /> | ||
| <orderEntry type="sourceFolder" forTests="false" /> | ||
| </component> | ||
| </module> No newline at end of file |
There was a problem hiding this comment.
same thing here, likely not intended to be committed?
| codeType, | ||
| packageDir, | ||
| targetOrg: orgUsername, | ||
| targetOrg: orgUsername ?? '', |
There was a problem hiding this comment.
Setting this to an empty string ('') might satisfy the TypeScript type, but it could cause issues downstream. If a subsequent process or the UI expects either a valid username or null/undefined, an empty string is a "truthy" value that contains no data. Likely setting this to null/undefined would be prefered.
| $ sf data-code-extension function run --entrypoint ./my-function-package/payload/entrypoint.py --target-org \ | ||
| myorg | ||
| $ sf data-code-extension function run --entrypoint ./my-function-package/payload/entrypoint.py --test-with \ | ||
| ./my-function-package/payload/tests/test.json |
There was a problem hiding this comment.
singular test? below it's plural.
| $ sf data-code-extension function run --entrypoint ./my-function-package/payload/entrypoint.py --target-org \ | ||
| myorg --config-file ./my-function-package/payload/config.json | ||
| $ sf data-code-extension function run --entrypoint ./my-function-package/payload/entrypoint.py --test-with \ | ||
| ./my-function-package/payload/tests/tests.json --config-file ./my-function-package/payload/config.json |
BREAKING CHANGE: Command signatures changed for function init, deploy, and run @W-22278901
| entrypoint: string; | ||
| 'target-org': Org; | ||
| 'target-org'?: Org; | ||
| 'test-with'?: string; |
There was a problem hiding this comment.
Is this a brand new parameter? If so, @joroscoSF do we need SF CLI team feedback before merging ?
There was a problem hiding this comment.
No once we published we are good to make changes as needed. The hand holding stage has past and we mostly have complete control.
| - Deploy with a specific CPU size: | ||
|
|
||
| <%= config.bin %> data-code-extension function deploy --name my-package --package-version 1.0.0 --description "My package" --package-dir ./payload --target-org myorg --cpu-size CPU_4XL --function-invoke-opt UnstructuredChunking | ||
| <%= config.bin %> data-code-extension function deploy --name my-package --package-version 1.0.0 --description "My package" --package-dir ./payload --target-org myorg --cpu-size CPU_4XL |
There was a problem hiding this comment.
Do we need SF CLI team approval for changing the flag name? And is this technically a breaking change?
There was a problem hiding this comment.
I just posed this question to them just in case, and they said we don't have to run anything by them but they are happy be a second set of eyes should we want it.
| ``` | ||
|
|
||
| _See code: [src/commands/data-code-extension/function/deploy.ts](https://github.com/salesforcecli/plugin-data-code-extension/blob/0.1.5/src/commands/data-code-extension/function/deploy.ts)_ | ||
| _See code: [src/commands/data-code-extension/function/deploy.ts](https://github.com/salesforcecli/plugin-data-code-extension/blob/v0.1.5/src/commands/data-code-extension/function/deploy.ts)_ |
There was a problem hiding this comment.
This new URL produces a 404 for me - whereas the previous URL works
| ``` | ||
|
|
||
| _See code: [src/commands/data-code-extension/function/init.ts](https://github.com/salesforcecli/plugin-data-code-extension/blob/0.1.5/src/commands/data-code-extension/function/init.ts)_ | ||
| _See code: [src/commands/data-code-extension/function/init.ts](https://github.com/salesforcecli/plugin-data-code-extension/blob/v0.1.5/src/commands/data-code-extension/function/init.ts)_ |
BREAKING CHANGE: Command signatures changed for function init, deploy, and run @W-22278901
BREAKING CHANGE: Command signatures changed for function init, deploy, and run @W-22278901
No description provided.