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

Update Postgrex SSL config #4460

Merged
merged 6 commits into from
Aug 30, 2024
Merged

Update Postgrex SSL config #4460

merged 6 commits into from
Aug 30, 2024

Conversation

ruslandoga
Copy link
Contributor

@ruslandoga ruslandoga commented Aug 21, 2024

Changes

This PR removes ssl_opts that are no longer necessary after elixir-ecto/postgrex#677 (and #4457)

Tests

  • Config test has been updated

Changelog

  • Changelog has been updated

Documentation

  • Docs don't need updates (DATABASE_CACERTFILE is not documented right now)

Dark mode

  • This PR does not change the UI

@ruslandoga ruslandoga marked this pull request as ready for review August 21, 2024 07:16
@ruslandoga ruslandoga requested a review from a team August 21, 2024 07:16
@ruslandoga ruslandoga changed the title update postgrex config update postgrex ssl config Aug 21, 2024
Copy link
Member

@aerosol aerosol left a comment

Choose a reason for hiding this comment

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

hmm CI says no

@ruslandoga
Copy link
Contributor Author

ruslandoga commented Aug 21, 2024

It seems like the behavior has actually changed slightly. Previously ssl_opts were only applied when ssl connection was specified (i.e. enabled) elsewhere (in our case, in the DATABASE_URL with ?ssl=true query string), and now the new ssl opts actually force the ssl connection.

I'll think a bit about this :)

@ruslandoga ruslandoga requested a review from cnkk August 21, 2024 07:55
@ruslandoga
Copy link
Contributor Author

ruslandoga commented Aug 21, 2024

👋 @cnkk

Just a heads-up: we don't need ?ssl=true in DATABASE_URL anymore. But leaving it in doesn't hurt, it's no-op after elixir-ecto/ecto#4498 if DATABASE_CACERTFILE is set. Using ?ssl=true without a DATABASE_CACERTFILE shows a warning, but that's not our case.

@ruslandoga ruslandoga marked this pull request as draft August 21, 2024 08:01
@ruslandoga ruslandoga changed the title update postgrex ssl config Update Postgrex SSL config Aug 24, 2024
@ruslandoga ruslandoga mentioned this pull request Aug 28, 2024
4 tasks
@ruslandoga ruslandoga marked this pull request as ready for review August 28, 2024 12:14
@ruslandoga ruslandoga requested review from a team August 28, 2024 12:14
@ruslandoga ruslandoga mentioned this pull request Aug 29, 2024
4 tasks
@cnkk cnkk added the preview label Aug 30, 2024
Copy link

Preview environment👷🏼‍♀️🏗️
PR-4460

@cnkk cnkk dismissed aerosol’s stale review August 30, 2024 09:59

CI is green now

@cnkk cnkk merged commit 19ecd3d into master Aug 30, 2024
10 checks passed
@cnkk cnkk deleted the update-postgrex-config branch August 30, 2024 10:11
ruslandoga added a commit that referenced this pull request Sep 2, 2024
* update postgrex config

* enable ssl only if DATABASE_CACERTFILE is set

* update tests

* changelog

---------

Co-authored-by: Cenk Kücük <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants