Skip to content
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

Option to turn off systemd plugin #3425

Merged
merged 7 commits into from
Jul 14, 2024

Conversation

mohamedhafez
Copy link
Contributor

@mohamedhafez mohamedhafez commented Jul 14, 2024

Closes #3424

Your checklist for this pull request

  • I have reviewed the guidelines for contributing to this repository.

  • I have added (or updated) appropriate tests if this PR fixes a bug or adds a feature.

  • My pull request is 100 lines added/removed or less so that it can be easily reviewed.

  • If this PR doesn't need tests (docs change), I added [ci skip] to the title of the PR.

  • If this closes any issues, I have added "Closes #issue" to the PR description or my commit messages.

  • I have updated the documentation accordingly.
    Not certain where the best place to document this option is. Perhaps in docs/systemd.md? But that seems to mostly just talk about systemd generally which is why I hesitated. Would be happy to document wherever maintainers think is best

  • All new and existing tests passed, including Rubocop.

@mohamedhafez
Copy link
Contributor Author

Perhaps here https://github.com/puma/puma/blob/master/docs/deployment.md#ubuntu--systemd-systemctl-installation would be a better place to note how to disable systemd integration?

test/test_skip_systemd.rb Outdated Show resolved Hide resolved
@dentarg
Copy link
Member

dentarg commented Jul 14, 2024

  • Not certain where the best place to document this option is. Perhaps in docs/systemd.md? But that seems to mostly just talk about systemd generally which is why I hesitated. Would be happy to document wherever maintainers think is best

I can't come up with a better place than systemd.md. If I search the Puma README for "systemd", I end up in the Deployment section which links to that doc. So that should be the place IMHO.

@dentarg
Copy link
Member

dentarg commented Jul 14, 2024

Perhaps here https://github.com/puma/puma/blob/master/docs/deployment.md#ubuntu--systemd-systemctl-installation would be a better place to note how to disable systemd integration?

That also just links to systemd.md

@mohamedhafez
Copy link
Contributor Author

Documentation updated!

docs/systemd.md Outdated Show resolved Hide resolved

super

ENV["PUMA_SKIP_SYSTEMD"] = "true"
Copy link
Member

Choose a reason for hiding this comment

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

This needs to be set only for this test, see the many CI failures

Copy link
Member

Choose a reason for hiding this comment

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

Same for NOTIFY_SOCKET

Copy link
Contributor Author

@mohamedhafez mohamedhafez Jul 14, 2024

Choose a reason for hiding this comment

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

ah shit, how do I do that? Not too well versed in Ruby testing I'm afraid, I thought this was the definition just for this test😅 And when i run the tests locally with rake test, the same amount of tests seem to pass as did on my local machine before I made the changes so I thought I was good, sorry about the CI failures!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah maybe i un-set it in the teardown method?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And if so, perhaps for the ENV['NOTIFY_SOCKET'] as well? Is that even a necessary line considering line 28 below? The situation in test_plugin_systemd_jruby.rb is exactly the same as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok I ended up just removing the ENV[...] lines altogether, since they seem to be set below in the env argument to cli_server below, lets see what CI says... sorry i'm not developing on a Linux machine so these tests get skipped for me

@mohamedhafez
Copy link
Contributor Author

So looking at the failing tests, I'm seeing things like:

test_plugin_systemd_jruby.rb
   7) :23   TestPluginSystemdJruby test_systemd_plugin_not_loaded

Errors & Failures:

  1. Failure:
    TestExampleCertExpiration#test_certs_not_expired [test/test_example_cert_expiration.rb:40]:
    Cert puma/chain_cert/cert.crt has expired. Check the puma/chain_cert for a .rb with instructions on how to regenerate.

Should I attempt to renew those here, or is that best taken care of in another PR?

@dentarg
Copy link
Member

dentarg commented Jul 14, 2024

That's sounds like something for another PR, I'll see if I can have a look at it

@dentarg
Copy link
Member

dentarg commented Jul 14, 2024

That's sounds like something for another PR, I'll see if I can have a look at it

Opened #3426

@dentarg
Copy link
Member

dentarg commented Jul 14, 2024

That's sounds like something for another PR, I'll see if I can have a look at it

Opened #3426

Merged now

@dentarg dentarg merged commit 82299e8 into puma:master Jul 14, 2024
74 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option to turn off Systemd integration
2 participants