Skip to content

Merge parameter data updates#225

Open
john (j13huang) wants to merge 4 commits into
mainfrom
merge-parameter-updates
Open

Merge parameter data updates#225
john (j13huang) wants to merge 4 commits into
mainfrom
merge-parameter-updates

Conversation

@j13huang
Copy link
Copy Markdown
Contributor

@j13huang john (j13huang) commented Jun 4, 2026

bt functions push currently always replaces the underlying function data for parameters, so pushing a new set of parameters overwrites any manual updates that have been made to the parameter data.

This PR makes it so that fields are updated via merge semantics. I'm also planning on reverting this behavior in the sdk
https://github.com/braintrustdata/braintrust-sdk-javascript/pull/1363/files#diff-dc987ecde17ce424aeab43639ec1262c84c53976bdd7f644c8b8b1627c5eb0f3R629
so that by default, bt functions push only updates the schema. Future work will be adding some API surface area for the user to update the underlying saved parameter values themselves (braintrustdata/braintrust-sdk-javascript#2094)

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026

Latest downloadable build artifacts for this PR commit 0a92c3a25772:

Available artifact names
  • ``artifacts-build-global
  • ``artifacts-build-local-x86_64-apple-darwin
  • ``artifacts-build-local-aarch64-pc-windows-msvc
  • ``artifacts-build-local-x86_64-pc-windows-msvc
  • ``artifacts-build-local-x86_64-unknown-linux-musl
  • ``artifacts-build-local-x86_64-unknown-linux-gnu
  • ``artifacts-build-local-aarch64-apple-darwin
  • ``artifacts-build-local-aarch64-unknown-linux-gnu
  • ``artifacts-plan-dist-manifest
  • ``cargo-dist-cache

@j13huang john (j13huang) changed the title Merge parameter updates Merge parameter data updates Jun 4, 2026
Comment thread src/functions/push.rs Outdated
Comment on lines +739 to +753
Value::Array(
[
PARAMETER_SCHEMA_MERGE_PATH.as_slice(),
PARAMETER_METADATA_MERGE_PATH.as_slice(),
]
.into_iter()
.map(|path| {
Value::Array(
path.iter()
.map(|component| Value::String((*component).to_string()))
.collect(),
)
})
.collect(),
),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

you should be able to use the json! macro here instead of constructing via Value::Array.

Comment thread src/functions/push.rs Outdated
Co-authored-by: Abhijeet Prasad <abhijeet@braintrustdata.com>
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.

2 participants