Skip to content

Conversation

pirj
Copy link
Member

@pirj pirj commented Aug 6, 2025

We used to sandbox everything, but it turns out that deprecations (RSpec.deprecate("anything")) were swallowed, as the temporary config has no deprecation stream set, or stderr is masked.
Found here #2849 (comment)

We're almost back to square one with deprecations as we were before #2365

However, I'm not entirely happy with this approach. We still mute deprecations for those Rails-related example group specs and a few others, and there are chances deprecations will pop up there eventually.

❓ Would it be better to replay the configuration block on top of the sandboxed configuration? Probably not, and it might not work if stderr is intercepted.

Please consider this WIP

@JonRowe
Copy link
Member

JonRowe commented Aug 8, 2025

I'm on the fence as to which is better, sandboxing examples we know are examples or just everything, but we should at least extend the sandboxed config to not swallow output...

@pirj pirj force-pushed the reduce-sandboxing-to-fix-missed-deprecation-reports branch from 3086f85 to c886a46 Compare September 3, 2025 19:37
@pirj
Copy link
Member Author

pirj commented Sep 3, 2025

we should at least extend the sandboxed config to not swallow output

@JonRowe Done

@pirj pirj self-assigned this Sep 3, 2025
We used to sandbox everything, but it turns out that deprecations were
swallowed, as the temporary config has no deprecation stream set, or
stderr is masked.
Alternatively, we can set

  sandbox_config.deprecation_stream = real_deprecation_stream

but this seems unnecessary.
@pirj pirj force-pushed the reduce-sandboxing-to-fix-missed-deprecation-reports branch from c886a46 to 3ece04d Compare September 13, 2025 21:00
@pirj pirj requested a review from Copilot September 13, 2025 21:20
Copilot

This comment was marked as off-topic.

@pirj
Copy link
Member Author

pirj commented Sep 13, 2025

CI green, @JonRowe how do you feel about this change?

@JonRowe JonRowe merged commit c112d70 into main Sep 15, 2025
11 checks passed
@JonRowe JonRowe deleted the reduce-sandboxing-to-fix-missed-deprecation-reports branch September 15, 2025 11:48
@JonRowe
Copy link
Member

JonRowe commented Sep 15, 2025

Thanks for this!

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