Skip to content

Conversation

@shayne-fletcher
Copy link
Contributor

Summary:
this diff fixes incorrect overwrite semantics in the python configuration path. previously, each kwarg passed to configure() called global::set(Source::Runtime, …), which replaces the entire Runtime layer. as a result, setting multiple keys in separate calls-or even within a single call-would drop previously set Runtime values.

the fix introduces Attrs::absorb and global::create_or_update, which perform an in‑place update of an existing layer while preserving keys not mentioned in the update. the python bridge now uses create_or_update instead of set, giving Runtime the incremental semantics expected by the python API. a shared make_layer helper removes duplicated construction logic.

python‑exposed config keys for log forwarding and capture are enabled, and new tests in the python layer exercise both single and multi-key configuration.

Differential Revision: D87339094

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 18, 2025
@meta-codesync
Copy link

meta-codesync bot commented Nov 18, 2025

@shayne-fletcher has exported this pull request. If you are a Meta employee, you can view the originating Diff in D87339094.

shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Nov 18, 2025
Summary:

this diff fixes incorrect overwrite semantics in the python configuration path. previously, each kwarg passed to `configure()` called `global::set(Source::Runtime, …)`, which replaces the entire `Runtime` layer. as a result, setting multiple keys in separate calls-or even within a single call-would drop previously set `Runtime` values.

the fix introduces `Attrs::absorb` and `global::create_or_update`, which perform an in‑place update of an existing layer while preserving keys not mentioned in the update. the python bridge now uses `create_or_update` instead of `set`, giving `Runtime` the incremental semantics expected by the python API. a shared `make_layer` helper removes duplicated construction logic.

python‑exposed config keys for log forwarding and capture are enabled, and new tests in rust and python exercise single and multi-key configuration.

Reviewed By: mariusae

Differential Revision: D87339094
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Nov 18, 2025
Summary:

this diff fixes incorrect overwrite semantics in the python configuration path. previously, each kwarg passed to `configure()` called `global::set(Source::Runtime, …)`, which replaces the entire `Runtime` layer. as a result, setting multiple keys in separate calls-or even within a single call-would drop previously set `Runtime` values.

the fix introduces `Attrs::merge` and `global::create_or_merge`, which perform an in‑place update of an existing layer while preserving keys not mentioned in the update. the python bridge now uses `create_or_merge` instead of `set`, giving `Runtime` the incremental semantics expected by the python API. a shared `make_layer` helper removes duplicated construction logic.

python‑exposed config keys for log forwarding and capture are enabled, and new tests in rust and python exercise single and multi-key configuration.

Reviewed By: mariusae

Differential Revision: D87339094
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Nov 18, 2025
Summary:

this diff fixes incorrect overwrite semantics in the python configuration path. previously, each kwarg passed to `configure()` called `global::set(Source::Runtime, …)`, which replaces the entire `Runtime` layer. as a result, setting multiple keys in separate calls-or even within a single call-would drop previously set `Runtime` values.

the fix introduces `Attrs::merge` and `global::create_or_merge`, which perform an in‑place update of an existing layer while preserving keys not mentioned in the update. the python bridge now uses `create_or_merge` instead of `set`, giving `Runtime` the incremental semantics expected by the python API. a shared `make_layer` helper removes duplicated construction logic.

python‑exposed config keys for log forwarding and capture are enabled, and new tests in rust and python exercise single and multi-key configuration.

Reviewed By: mariusae

Differential Revision: D87339094
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Nov 18, 2025
Summary:

this diff fixes incorrect overwrite semantics in the python configuration path. previously, each kwarg passed to `configure()` called `global::set(Source::Runtime, …)`, which replaces the entire `Runtime` layer. as a result, setting multiple keys in separate calls-or even within a single call-would drop previously set `Runtime` values.

the fix introduces `Attrs::merge` and `global::create_or_merge`, which perform an in‑place update of an existing layer while preserving keys not mentioned in the update. the python bridge now uses `create_or_merge` instead of `set`, giving `Runtime` the incremental semantics expected by the python API. a shared `make_layer` helper removes duplicated construction logic.

python‑exposed config keys for log forwarding and capture are enabled, and new tests in rust and python exercise single and multi-key configuration.

Reviewed By: mariusae

Differential Revision: D87339094
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Nov 19, 2025
Summary:

this diff fixes incorrect overwrite semantics in the python configuration path. previously, each kwarg passed to `configure()` called `global::set(Source::Runtime, …)`, which replaces the entire `Runtime` layer. as a result, setting multiple keys in separate calls-or even within a single call-would drop previously set `Runtime` values.

the fix introduces `Attrs::merge` and `global::create_or_merge`, which perform an in‑place update of an existing layer while preserving keys not mentioned in the update. the python bridge now uses `create_or_merge` instead of `set`, giving `Runtime` the incremental semantics expected by the python API. a shared `make_layer` helper removes duplicated construction logic.

python‑exposed config keys for log forwarding and capture are enabled, and new tests in rust and python exercise single and multi-key configuration.

Reviewed By: mariusae

Differential Revision: D87339094
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Nov 19, 2025
Summary:

this diff fixes incorrect overwrite semantics in the python configuration path. previously, each kwarg passed to `configure()` called `global::set(Source::Runtime, …)`, which replaces the entire `Runtime` layer. as a result, setting multiple keys in separate calls-or even within a single call-would drop previously set `Runtime` values.

the fix introduces `Attrs::merge` and `global::create_or_merge`, which perform an in‑place update of an existing layer while preserving keys not mentioned in the update. the python bridge now uses `create_or_merge` instead of `set`, giving `Runtime` the incremental semantics expected by the python API. a shared `make_layer` helper removes duplicated construction logic.

python‑exposed config keys for log forwarding and capture are enabled, and new tests in rust and python exercise single and multi-key configuration.

Reviewed By: mariusae

Differential Revision: D87339094
Summary:

this diff fixes incorrect overwrite semantics in the python configuration path. previously, each kwarg passed to `configure()` called `global::set(Source::Runtime, …)`, which replaces the entire `Runtime` layer. as a result, setting multiple keys in separate calls-or even within a single call-would drop previously set `Runtime` values.

the fix introduces `Attrs::merge` and `global::create_or_merge`, which perform an in‑place update of an existing layer while preserving keys not mentioned in the update. the python bridge now uses `create_or_merge` instead of `set`, giving `Runtime` the incremental semantics expected by the python API. a shared `make_layer` helper removes duplicated construction logic.

python‑exposed config keys for log forwarding and capture are enabled, and new tests in rust and python exercise single and multi-key configuration.

Reviewed By: mariusae

Differential Revision: D87339094
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Nov 19, 2025
Summary:

this diff fixes incorrect overwrite semantics in the python configuration path. previously, each kwarg passed to `configure()` called `global::set(Source::Runtime, …)`, which replaces the entire `Runtime` layer. as a result, setting multiple keys in separate calls-or even within a single call-would drop previously set `Runtime` values.

the fix introduces `Attrs::merge` and `global::create_or_merge`, which perform an in‑place update of an existing layer while preserving keys not mentioned in the update. the python bridge now uses `create_or_merge` instead of `set`, giving `Runtime` the incremental semantics expected by the python API. a shared `make_layer` helper removes duplicated construction logic.

python‑exposed config keys for log forwarding and capture are enabled, and new tests in rust and python exercise single and multi-key configuration.

Reviewed By: mariusae

Differential Revision: D87339094
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Nov 19, 2025
Summary:

this diff fixes incorrect overwrite semantics in the python configuration path. previously, each kwarg passed to `configure()` called `global::set(Source::Runtime, …)`, which replaces the entire `Runtime` layer. as a result, setting multiple keys in separate calls-or even within a single call-would drop previously set `Runtime` values.

the fix introduces `Attrs::merge` and `global::create_or_merge`, which perform an in‑place update of an existing layer while preserving keys not mentioned in the update. the python bridge now uses `create_or_merge` instead of `set`, giving `Runtime` the incremental semantics expected by the python API. a shared `make_layer` helper removes duplicated construction logic.

python‑exposed config keys for log forwarding and capture are enabled, and new tests in rust and python exercise single and multi-key configuration.

Reviewed By: mariusae

Differential Revision: D87339094
@meta-codesync meta-codesync bot closed this in 8efdd64 Nov 19, 2025
@meta-codesync
Copy link

meta-codesync bot commented Nov 19, 2025

This pull request has been merged in 8efdd64.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. fb-exported Merged meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants