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

uwsgi: allow custom uwsgi_param directives #926

Merged
merged 1 commit into from
Oct 17, 2016

Conversation

darken99
Copy link

This patch allows custom uwsgi params to be added with uwsgi_param, same way fastcgi_param work.

@wyardley, It is a replacement for #767

should contain_concat__fragment('vhost1-500-' + Digest::MD5.hexdigest(params[:location].to_s)).
without_content(%r{uwsgi_param\s+CUSTOM_PARAM\s+.+?;}).
without_content(%r{uwsgi_param\s+CUSTOM_PARAM2\s+.+?;})
end
Copy link
Collaborator

Choose a reason for hiding this comment

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

This all looks pretty good to me. Thanks!
Assuming there shouldn't be any uwsgi_param lines in the file I'm wondering if maybe this should just be simplified to a single without_content(%r{uwsgi_param})?

Copy link
Author

Choose a reason for hiding this comment

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

I'm sorry, but i didn't got what file you mean and what exact section?
If you mean when uwsgi_param is not set should lead to empty params - then probably it's also needed to change fastcgi section where i copied it from?

Copy link
Collaborator

@wyardley wyardley Oct 13, 2016

Choose a reason for hiding this comment

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

Either is technically a test that will pass, but, assuming there shouldn't be any uwsgi_param directives in the config fragment generated by the test case (which I think is the case), the simpler test is also a better one.

Yeah, probably same thing with the example you copied from... this module has a ton of cruft and sub-optimal tests. I'm Ok with merging this either way, but if you don't mind, can you test whether the simpler case passes tests?

Copy link
Author

Choose a reason for hiding this comment

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

Checks fail with this change. Or maybe i changed it in a wrong way? Can you take a look?

Copy link
Collaborator

@wyardley wyardley Oct 14, 2016

Choose a reason for hiding this comment

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

Ah, yeah, I see...
the file still has:
include /etc/nginx/uwsgi_params with default params.

I think the attached patch (should apply cleanly to your branch) is what you want:
vhost_patch.txt

That is

  1. Get rid of the comment test; yes, that comment isn't there, but you're also not setting a comment, so it's not actually testing anything.
  2. this pattern without_content(%r{^\s+uwsgi_param\s+})

@darken99 darken99 force-pushed the uwsgi_param branch 4 times, most recently from 61695e4 to db72ceb Compare October 17, 2016 08:49
@darken99
Copy link
Author

@wyardley You attached wrong patch file :) But i got the idea from your comments and it seems now everything is fine.

@wyardley wyardley merged commit 29025b4 into voxpupuli:master Oct 17, 2016
@wyardley
Copy link
Collaborator

@darken99: d'oh.... glad you got the idea, though. Merged.

@darken99 darken99 deleted the uwsgi_param branch October 17, 2016 17:46
cegeka-jenkins pushed a commit to cegeka/puppet-nginx that referenced this pull request Sep 13, 2019
uwsgi: allow custom uwsgi_param directives
Rubueno pushed a commit to Rubueno/puppet-nginx that referenced this pull request Oct 19, 2020
uwsgi: allow custom uwsgi_param directives
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