Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Fix handling of SYNAPSE_NO_TLS in docker image#5005

Merged
richvdh merged 13 commits intomatrix-org:developfrom
f35f0ef9d0e827dae86552d3899f78fc:fix4663
Apr 25, 2019
Merged

Fix handling of SYNAPSE_NO_TLS in docker image#5005
richvdh merged 13 commits intomatrix-org:developfrom
f35f0ef9d0e827dae86552d3899f78fc:fix4663

Conversation

@f35f0ef9d0e827dae86552d3899f78fc
Copy link
Contributor

@f35f0ef9d0e827dae86552d3899f78fc f35f0ef9d0e827dae86552d3899f78fc commented Apr 4, 2019

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file
  • Pull request includes a sign off

@f35f0ef9d0e827dae86552d3899f78fc
Copy link
Contributor Author

Signed-off-by: Gabriel Eckerson 21157384+f35f0ef9d0e827dae86552d3899f78fc@users.noreply.github.com

@codecov
Copy link

codecov bot commented Apr 4, 2019

Codecov Report

Merging #5005 into develop will decrease coverage by 0.12%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop    #5005      +/-   ##
===========================================
- Coverage     60.7%   60.57%   -0.13%     
===========================================
  Files          332      331       -1     
  Lines        34172    34213      +41     
  Branches      5633     5655      +22     
===========================================
- Hits         20743    20725      -18     
- Misses       11958    12013      +55     
- Partials      1471     1475       +4

@codecov
Copy link

codecov bot commented Apr 4, 2019

Codecov Report

Merging #5005 into develop will decrease coverage by 0.13%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop    #5005      +/-   ##
===========================================
- Coverage     60.7%   60.57%   -0.14%     
===========================================
  Files          332      331       -1     
  Lines        34172    34213      +41     
  Branches      5633     5655      +22     
===========================================
- Hits         20743    20723      -20     
- Misses       11958    12015      +57     
- Partials      1471     1475       +4

@f35f0ef9d0e827dae86552d3899f78fc f35f0ef9d0e827dae86552d3899f78fc marked this pull request as ready for review April 4, 2019 05:46
@babolivier
Copy link
Contributor

For link: #4663

@richvdh richvdh changed the title Fix4663 Fix handling of SYNAPSE_NO_TLS in docker image Apr 4, 2019
@richvdh richvdh self-requested a review April 24, 2019 16:04
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

lgtm! thanks. I wrote a couple of thoughts below which I hope you might find useful for future reference.

Another thought is that it would have been nice to factor out some of the logic to a separate function, so that we could use it for other boolean parameters like SYNAPSE_ALLOW_GUEST and SYNAPSE_REPORT_STATS. We can make that change another time though.


# Convert SYNAPSE_NO_TLS to boolean if exists
if "SYNAPSE_NO_TLS" in environ:
tlsanswerstring = str.lower(environ["SYNAPSE_NO_TLS"])
Copy link
Member

Choose a reason for hiding this comment

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

might have been nice to write tlsanswerstring = str.lower(environ.get("SYNAPSE_NO_TLS", "false")) here, to avoid the if condition above.

if tlsanswerstring in ("true", "on", "1", "yes"):
environ["SYNAPSE_NO_TLS"] = True
else:
if tlsanswerstring in ("false", "off", "0", "no"):
Copy link
Member

Choose a reason for hiding this comment

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

would have been nice to use elif rather than another layer of nesting.

@richvdh
Copy link
Member

richvdh commented Apr 25, 2019

test failures are due to #5096

@richvdh richvdh merged commit 4a9a118 into matrix-org:develop Apr 25, 2019
anoadragon453 added a commit that referenced this pull request Apr 30, 2019
* develop: (34 commits)
  Add a default .m.rule.tombstone push rule (#4867)
  Fix infinite loop in presence handler
  changelog
  more logging improvements
  remove extraneous exception logging
  Clarify logging when PDU signature checking fails
  Changelog
  Add --no-pep-517 to README instructions
  set PIP_USE_PEP517 = False for tests
  Fix handling of SYNAPSE_NO_TLS in docker image (#5005)
  Config option for verifying federation certificates (MSC 1711) (#4967)
  Remove log error for .well-known/matrix/client (#4972)
  Prevent "producer not unregistered" message (#5009)
  add gpg key fingerprint
  Don't crash on lack of expiry templates
  Update debian install docs for new key and repo (#5074)
  Add management endpoints for account validity
  Send out emails with links to extend an account's validity period
  Make sure we're not registering the same 3pid twice
  Newsfile
  ...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants