Skip to content

Gh#2536 flask mail#339

Merged
MarcelGeo merged 11 commits intodevelopfrom
gh#2536-flask-mail
Dec 10, 2024
Merged

Gh#2536 flask mail#339
MarcelGeo merged 11 commits intodevelopfrom
gh#2536-flask-mail

Conversation

@MarcelGeo
Copy link
Collaborator

@MarcelGeo MarcelGeo commented Dec 2, 2024

Resolves https://github.com/MerginMaps/server-private/issues/2536 and Fixes https://github.com/MerginMaps/server-private/issues/2653

Fix ⚒️

  • add MAIL_USERNAME and MAIL_PASSWORD default as None for better handling of empty authentication of non secure SMTP servers
  • update for variables as MAIL_BCC to add there default value (server was failing without MAIL_BCC)
  • remove unnecessary values from .prod.env
  • reorder variables in .prod.env to follow docs and importance

Added ➕

  • introduce flask server check command with checks for current deployment
$ docker exec -it merginmaps-server flask server check --email marcel.kocisek@gmail.com
You are running server version 2024.5.3
No base URL set. Please set MERGIN_BASE_URL environment variable
Database initialized properly
Celery running properly
$ docker exec -it merginmaps-server flask server send-check-email --email marcel.kocisek@gmail.com
Sending email to specified email address marcel.kocisek@gmail.com. Check your inbox.
  • introduce maildev server to docker-compose.dev.yml for testing of emails
  • reintroduce CONTACT_EMAIL as non required variable, which is sending to statistics

  • not sure if we want to enable GEVENT_WORKER by efault for deployments @varmar05 ... there is also issue on local machine, that with GEVENT_WORKER=1 and some CELERYD variables is celery not starting properly ❗

@MarcelGeo MarcelGeo requested a review from varmar05 December 2, 2024 16:12
@MarcelGeo MarcelGeo marked this pull request as draft December 2, 2024 16:13
@MarcelGeo MarcelGeo requested a review from harminius December 2, 2024 16:14
@coveralls
Copy link

coveralls commented Dec 2, 2024

Pull Request Test Coverage Report for Build 12238418323

Details

  • 22 of 50 (44.0%) changed or added relevant lines in 6 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.4%) to 93.39%

Changes Missing Coverage Covered Lines Changed/Added Lines %
server/mergin/commands.py 13 41 31.71%
Totals Coverage Status
Change from base Build 12034250578: -0.4%
Covered Lines: 6414
Relevant Lines: 6868

💛 - Coveralls

@MarcelGeo MarcelGeo marked this pull request as ready for review December 9, 2024 09:54
- Disable GEVENT_WORKER for celery worker and beat
- added section about server check command
@MarcelGeo MarcelGeo requested a review from varmar05 December 9, 2024 13:14
@MarcelGeo MarcelGeo merged commit 1d915d7 into develop Dec 10, 2024
@MarcelGeo MarcelGeo deleted the gh#2536-flask-mail branch January 9, 2025 15:21
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.

3 participants