Skip to content

Conversation

@shayne-fletcher
Copy link
Contributor

Differential Revision: D87507353

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

meta-codesync bot commented Nov 20, 2025

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

…1932)

Summary:

replace env-var overrides with `configure`. relax `test_flush_logs_ipython` which before was over-constrained and consequently, highly flaky.

Reviewed By: mariusae

Differential Revision: D87449483
…ch#1946)

Summary:

following up on mariusae 's comment (https://www.internalfb.com/diff/D87449483?dst_version_fbid=2613910452329247&transaction_fbid=2002832840481448)

remove manual config save/restore boilerplate:
```
  config = get_configuration()
  enable_log_forwarding = config["enable_log_forwarding"]
  # ... etc
  configure(enable_log_forwarding=True, ...)
  try:
      # test code
  finally:
      configure(enable_log_forwarding=enable_log_forwarding, ...)
```
replace with a context manager phrasing:
```
  with configured(enable_log_forwarding=True, enable_file_capture=True, tail_log_lines=100):
      # test code
```
i intend to follow this diff up with one for the FD + sys.stdout/sys.stderr redirection

Reviewed By: thedavekwon

Differential Revision: D87478665
….stderr redirecction (meta-pytorch#1950)

Summary:

do the stdio redirection with a context manager too (promised follow-up in the preceding diff)
```
  async def test_example() -> None:
      with configured(
          enable_log_forwarding=True, enable_file_capture=True, tail_log_lines=100
      ):
          with redirected_stdio(capture_stderr=True) as (stdout_path, stderr_path):
              ...
```

Differential Revision: D87488586
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 meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant