Skip to content

fix: prevent intermittent proxy file missing errors in EcotoneLite tests#648

Merged
dgafka merged 2 commits intomainfrom
feat/missing-proxy
Mar 6, 2026
Merged

fix: prevent intermittent proxy file missing errors in EcotoneLite tests#648
dgafka merged 2 commits intomainfrom
feat/missing-proxy

Conversation

@dgafka
Copy link
Member

@dgafka dgafka commented Mar 5, 2026

Why is this change proposed?

EcotoneLite tests intermittently fail in CI with Failed opening required '/tmp/ecotone/.../ProxyFile.php' errors. This happens because ProxyFactory::dumpFile() silently ignores file_put_contents and rename failures, then proceeds to require a file that was never created.

Description of Changes

  • Check return values in dumpFile(): file_put_contents and rename now throw ConfigurationException on failure instead of silently continuing. Temp files are cleaned up on rename failure.
  • Defensive retry in loadProxyClass(): After initial proxy generation, if the file doesn't exist (stale stat cache or skipped generation), clears PHP stat cache and retries with forced overwrite before require.

Pull Request Contribution Terms

  • I have read and agree to the contribution terms outlined in CONTRIBUTING.

@dgafka dgafka merged commit 3918233 into main Mar 6, 2026
8 of 11 checks passed
@dgafka dgafka deleted the feat/missing-proxy branch March 6, 2026 16:09
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.

1 participant