Skip to content

Conversation

shayne-fletcher
Copy link
Contributor

Summary:
relates to part 2 of the refactors discussed in D83778023

refactor(config/global.rs): introduce Layer enum and recover tests

  • switch Layer representation from struct+Source to enum with variants:
    File, Env, Runtime, and TestOverride { attrs, stacks }.
  • updated helpers (layer_attrs, layer_attrs_mut, test_override_index).
  • adjusted Drop impls for ConfigValueGuard and ConfigLock to compile and preserve all existing behavior.

all unit tests pass; ready for semantic refactor of TestOverride logic next.

Differential Revision: D84072524

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

meta-codesync bot commented Oct 7, 2025

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

shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Oct 7, 2025
…rides (meta-pytorch#1456)

Summary:

relates to part 2 of the refactors discussed in D83778023 

refactor(config/global.rs): introduce `Layer` enum and recover tests

- switch `Layer` representation from `struct`+`Source` to `enum` with variants:
  `File`, `Env`, `Runtime`, and `TestOverride { attrs, stacks }`.
- updated helpers (`layer_attrs`, `layer_attrs_mut`, `test_override_index`).
- adjusted `Drop` impls for `ConfigValueGuard` and `ConfigLock` to compile and preserve all existing behavior.

all unit tests pass; ready for semantic refactor of `TestOverride` logic next.

Differential Revision: D84072524
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Oct 7, 2025
…rides (meta-pytorch#1456)

Summary:

relates to part 2 of the refactors discussed in D83778023 

refactor(config/global.rs): introduce `Layer` enum and recover tests

- switch `Layer` representation from `struct`+`Source` to `enum` with variants:
  `File`, `Env`, `Runtime`, and `TestOverride { attrs, stacks }`.
- updated helpers (`layer_attrs`, `layer_attrs_mut`, `test_override_index`).
- adjusted `Drop` impls for `ConfigValueGuard` and `ConfigLock` to compile and preserve all existing behavior.

all unit tests pass; ready for semantic refactor of `TestOverride` logic next.

Differential Revision: D84072524
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Oct 7, 2025
…rides (meta-pytorch#1456)

Summary:

relates to part 2 of the refactors discussed in D83778023 

refactor(config/global.rs): introduce `Layer` enum and recover tests

- switch `Layer` representation from `struct`+`Source` to `enum` with variants:
  `File`, `Env`, `Runtime`, and `TestOverride { attrs, stacks }`.
- updated helpers (`layer_attrs`, `layer_attrs_mut`, `test_override_index`).
- adjusted `Drop` impls for `ConfigValueGuard` and `ConfigLock` to compile and preserve all existing behavior.

all unit tests pass; ready for semantic refactor of `TestOverride` logic next.

Differential Revision: D84072524
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Oct 9, 2025
…rides (meta-pytorch#1456)

Summary:

relates to part 2 of the refactors discussed in D83778023 

refactor(config/global.rs): introduce `Layer` enum and recover tests

- switch `Layer` representation from `struct`+`Source` to `enum` with variants:
  `File`, `Env`, `Runtime`, and `TestOverride { attrs, stacks }`.
- updated helpers (`layer_attrs`, `layer_attrs_mut`, `test_override_index`).
- adjusted `Drop` impls for `ConfigValueGuard` and `ConfigLock` to compile and preserve all existing behavior.

all unit tests pass; ready for semantic refactor of `TestOverride` logic next.

Reviewed By: mariusae

Differential Revision: D84072524
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Oct 9, 2025
…rides (meta-pytorch#1456)

Summary:

relates to part 2 of the refactors discussed in D83778023 

refactor(config/global.rs): introduce `Layer` enum and recover tests

- switch `Layer` representation from `struct`+`Source` to `enum` with variants:
  `File`, `Env`, `Runtime`, and `TestOverride { attrs, stacks }`.
- updated helpers (`layer_attrs`, `layer_attrs_mut`, `test_override_index`).
- adjusted `Drop` impls for `ConfigValueGuard` and `ConfigLock` to compile and preserve all existing behavior.

all unit tests pass; ready for semantic refactor of `TestOverride` logic next.

Reviewed By: mariusae

Differential Revision: D84072524
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Oct 9, 2025
…rides (meta-pytorch#1456)

Summary:

relates to part 2 of the refactors discussed in D83778023 

refactor(config/global.rs): introduce `Layer` enum and recover tests

- switch `Layer` representation from `struct`+`Source` to `enum` with variants:
  `File`, `Env`, `Runtime`, and `TestOverride { attrs, stacks }`.
- updated helpers (`layer_attrs`, `layer_attrs_mut`, `test_override_index`).
- adjusted `Drop` impls for `ConfigValueGuard` and `ConfigLock` to compile and preserve all existing behavior.

all unit tests pass; ready for semantic refactor of `TestOverride` logic next.

Reviewed By: mariusae

Differential Revision: D84072524
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Oct 9, 2025
…rides (meta-pytorch#1456)

Summary:

relates to part 2 of the refactors discussed in D83778023 

refactor(config/global.rs): introduce `Layer` enum and recover tests

- switch `Layer` representation from `struct`+`Source` to `enum` with variants:
  `File`, `Env`, `Runtime`, and `TestOverride { attrs, stacks }`.
- updated helpers (`layer_attrs`, `layer_attrs_mut`, `test_override_index`).
- adjusted `Drop` impls for `ConfigValueGuard` and `ConfigLock` to compile and preserve all existing behavior.

all unit tests pass; ready for semantic refactor of `TestOverride` logic next.

Reviewed By: mariusae

Differential Revision: D84072524
Summary:

this diff follows on from the discussions in D83778023 and lands `ConfigAttr` and the unified `CONFIG` meta-attribute for marking configuration keys, replaces all previous `CONFIG_ENV_VAR`/`PYTHON_CONFIG_KEY` usage, and narrows `attrs()` and `init_from_env()` to include only keys carrying this meta. it updates monarch python bindings to read `py_name` from `ConfigAttr`, rewrites affected documentation accordingly, and adds a unit test verifying that non-`CONFIG` keys are excluded from `attrs()`. all existing keys in hyperactor and hyperactor\_mesh have been migrated to the new form.

Reviewed By: mariusae, pablorfb-meta

Differential Revision: D83997813
…rides (meta-pytorch#1456)

Summary:

relates to part 2 of the refactors discussed in D83778023 

refactor(config/global.rs): introduce `Layer` enum and recover tests

- switch `Layer` representation from `struct`+`Source` to `enum` with variants:
  `File`, `Env`, `Runtime`, and `TestOverride { attrs, stacks }`.
- updated helpers (`layer_attrs`, `layer_attrs_mut`, `test_override_index`).
- adjusted `Drop` impls for `ConfigValueGuard` and `ConfigLock` to compile and preserve all existing behavior.

all unit tests pass; ready for semantic refactor of `TestOverride` logic next.

Reviewed By: mariusae

Differential Revision: D84072524
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Oct 9, 2025
…rides (meta-pytorch#1456)

Summary:

relates to part 2 of the refactors discussed in D83778023 

refactor(config/global.rs): introduce `Layer` enum and recover tests

- switch `Layer` representation from `struct`+`Source` to `enum` with variants:
  `File`, `Env`, `Runtime`, and `TestOverride { attrs, stacks }`.
- updated helpers (`layer_attrs`, `layer_attrs_mut`, `test_override_index`).
- adjusted `Drop` impls for `ConfigValueGuard` and `ConfigLock` to compile and preserve all existing behavior.

all unit tests pass; ready for semantic refactor of `TestOverride` logic next.

Reviewed By: mariusae

Differential Revision: D84072524
@meta-codesync meta-codesync bot closed this in 8830a56 Oct 10, 2025
Copy link

meta-codesync bot commented Oct 10, 2025

This pull request has been merged in 8830a56.

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