Skip to content

Conversation

Drowze
Copy link
Contributor

@Drowze Drowze commented Sep 17, 2025

About the changes

Prevent errors when attempting to move the temporary backup_file while using Unleash in forked processes (e.g.: Puma clustered mode)

Closes #108

Important files

Discussion points


# NOTE: this is a frequent issue with Puma (in clustered mode). See Unleash/unleash-ruby-sdk#108
it "does not log errors due to concurrent forked processes" do
log_file = ->(pid) { File.join(Dir.tmpdir, "#{pid}.log") }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOTE: getting the stdout/stderr from child processes is tricky so the temporary log file here is just a dirty way to capture the child process logger output.

@Drowze Drowze force-pushed the fix-writing-to-backup-file branch 2 times, most recently from 705c134 to 72cbf06 Compare September 17, 2025 18:58
@Drowze Drowze force-pushed the fix-writing-to-backup-file branch from 72cbf06 to 2bc2ca1 Compare September 17, 2025 18:58
@coveralls
Copy link

Pull Request Test Coverage Report for Build 17807791681

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 94.763%

Totals Coverage Status
Change from base Build 17436196851: 0.0%
Covered Lines: 579
Relevant Lines: 611

💛 - Coveralls

Copy link
Contributor

@gastonfournier gastonfournier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks sane to me. I'm not a Ruby expert but I checked with other colleagues and it looks correct

@github-project-automation github-project-automation bot moved this from New to Approved PRs in Issues and PRs Sep 26, 2025
@gastonfournier gastonfournier merged commit 8b584e4 into Unleash:main Sep 26, 2025
22 checks passed
@github-project-automation github-project-automation bot moved this from Approved PRs to Done in Issues and PRs Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Unable to save backup file. Exception thrown Errno::ENOENT
3 participants