Skip to content

Updating sf data-code-extension function init to accept --use-ini-feature#17

Merged
sbyrne-sf merged 6 commits intosalesforcecli:mainfrom
ritaagarwala-sf:main
May 1, 2026
Merged

Updating sf data-code-extension function init to accept --use-ini-feature#17
sbyrne-sf merged 6 commits intosalesforcecli:mainfrom
ritaagarwala-sf:main

Conversation

@ritaagarwala-sf
Copy link
Copy Markdown
Contributor

No description provided.

- 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
Comment thread commit.sh Outdated
Comment thread plugin-data-code-extension.iml Outdated
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module> No newline at end of file
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.

same thing here, likely not intended to be committed?

Comment thread src/base/runBase.ts Outdated
codeType,
packageDir,
targetOrg: orgUsername,
targetOrg: orgUsername ?? '',
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.

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.

Comment thread README.md
$ 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
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.

singular test? below it's plural.

Comment thread README.md Outdated
$ 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
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.

plural

Copy link
Copy Markdown
Contributor

@joroscoSF joroscoSF left a comment

Choose a reason for hiding this comment

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

Various comments

BREAKING CHANGE: Command signatures changed for function init, deploy, and run

@W-22278901
Comment thread src/base/runBase.ts
entrypoint: string;
'target-org': Org;
'target-org'?: Org;
'test-with'?: string;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is this a brand new parameter? If so, @joroscoSF do we need SF CLI team feedback before merging ?

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.

No once we published we are good to make changes as needed. The hand holding stage has past and we mostly have complete control.

Comment thread messages/deploy.md
- 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
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Do we need SF CLI team approval for changing the flag name? And is this technically a breaking change?

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.

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.

Comment thread README.md Outdated
```

_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)_
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This new URL produces a 404 for me - whereas the previous URL works

Comment thread README.md Outdated
```

_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)_
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same here for 404 URL

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
@sbyrne-sf sbyrne-sf merged commit a0b6b20 into salesforcecli:main May 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants