forked from ddollar/foreman
-
Notifications
You must be signed in to change notification settings - Fork 0
Import upstream changes #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The singular methods were deprecated long ago and finally removed in Ruby 3.2.0.
…hyphens "-" are not allowed in process names. Several of the ports listed in the README have incorrectly not allowed hyphens to be present in process names. I believe it's because they took inspiration from this misleading comment at the top of the procfile.rb file. [Haskell](https://github.com/fujimura/houseman/blob/f4a5da44a35a04c84694118c91894bda41efaaa0/src/Procfile/Parse.hs#L21) [Go](https://github.com/mattn/goreman/blob/ebb9736b7c7f7f3425280ab69e1f7989fb34eadc/main.go#L103) [Java](https://github.com/owenthereal/gaffer/blob/5704f4de1d438cc6527f7f4b5a439940607ccd54/src/main/java/gaffer/procfile/Procfile.java#L14)
The FakeFS spec helper already cleans up the filesystem after each test. Also, that after helper is executed after FakeFS already deactivated itself, so in some systems, that can cause the real /tmp to be removed if the user running the tests has permissions to do so.
Includes logic to cause loading an empty Procfile to raise a Foreman::Procfile::EmptyFileError. Keeps existing logic/error message for `foreman check`, just rescues this new error when doing so.
When (mistakenly) starting foreman with a empty Procfile, it ends up not
being possible to exit this process via a TERM signal due to the
following error:
$ foreman start
ERROR: Procfile does not exist.
$ touch Procfile
$ bin/foreman start
^Ccomparison of NilClass with 6 failed
./lib/foreman/engine/cli.rb:80:in `name_padding'
./lib/foreman/engine/cli.rb:85:in `pad_process_name'
./lib/foreman/engine/cli.rb:61:in `block in output'
./lib/foreman/engine/cli.rb:57:in `each'
./lib/foreman/engine/cli.rb:57:in `output'
./lib/foreman/engine.rb:335:in `block in output_with_mutex'
./lib/foreman/engine.rb:334:in `synchronize'
./lib/foreman/engine.rb:334:in `output_with_mutex'
./lib/foreman/engine.rb:340:in `system'
./lib/foreman/engine.rb:124:in `handle_interrupt'
./lib/foreman/engine.rb:104:in `handle_signal'
./lib/foreman/engine.rb:389:in `handle_signals'
./lib/foreman/engine.rb:412:in `block (2 levels) in watch_for_output'
./lib/foreman/engine.rb:409:in `loop'
./lib/foreman/engine.rb:409:in `block in watch_for_output'
^C^C^C^C^C^X^Z
[1]+ Stopped bin/foreman start
$ kill %1
$ jobs
[1]+ Running bin/foreman start &
$ jobs
[1]+ Running bin/foreman start &
$ kill -9 %1
[1]+ Killed: 9 bin/foreman start
$ jobs
By adding a `.to_i`, this simply allows the `Engine::Cli#name_padding`
method to default to 6, allowing the rest of the shutdown process to
finish executing and exit the process gracefully.
Dash (-) vs dot (.)
Some processes are getting orphaned when running Foreman with JRuby.
Creating a new pgroup allows them all to be killed together.
I believe the issue is related to how JRuby handles `Dir.chdir` by
creating a shell process: `sh -c 'cd /chdir/target; ${command}'`. That
causes a second process to be created that won't get cleaned up by
killing the parent.
Co-authored-by: David Harsha <david.harsha@elastic.co>
Do not try to install latest RubyGems due to ruby/setup-ruby#422
Apparently the tests are sensitive to the output, like what happened in ruby/setup-ruby#420 Saw this option in ruby/rubygems#6187
Member
Author
|
Nope, not great |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The result of
git rebase upstream/mainand fixing conflicts.