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

refactor: CMD-141 move email_management app #828

Merged
merged 2 commits into from
Mar 29, 2024

Conversation

wesleyboar
Copy link
Member

@wesleyboar wesleyboar commented Mar 28, 2024

Overview

Move the mail_management app to a new (temporary) location for Core-CMS common apps.

Temporary? What's the Plan? Why not do it right now?
  • Yes, temporary; until the WI team has more time to suffer the side effects of the plan.
  • Plan is to:
    1. Rename apps to /custom_apps or apps/custom.
    2. Update client apps accordingly.
    3. (Maybe) Move email_management to /apps.
  • Not now, because TACC/Core-CMS-Custom and TACC/tup-ui (and maybe even TACC/Camino) need to change to not break on rename of a directory that docker-compose files depend on.

Related

Changes

  • moved email_management app

Testing

Regression test #817:

  1. Add a new form with an email field
  2. Submit form.
  3. Review Docker logs.
  4. Verify log sends email (text and html).

UI

Docker log
core_cms                | Content-Type: multipart/alternative;
core_cms                |  boundary="===============0499775380862410495=="
core_cms                | MIME-Version: 1.0
core_cms                | Subject: Form Submission - Help
core_cms                | From: webmaster@localhost
core_cms                | To: wbomar@tacc.utexas.edu
core_cms                | Date: Thu, 28 Mar 2024 22:48:10 -0000
core_cms                | Message-ID: <171166609008.9.7696401260088608234@core_cms>
core_cms                | 
core_cms                | --===============0499775380862410495==
core_cms                | Content-Type: text/plain; charset="utf-8"
core_cms                | MIME-Version: 1.0
core_cms                | Content-Transfer-Encoding: 7bit
core_cms                | 
core_cms                | 
core_cms                | 
core_cms                | Form: Help
core_cms                | Date: 28th March 2024 17:48
core_cms                | 
core_cms                | 
core_cms                | Email:
core_cms                | wbomar@tacc.utexas.edu
core_cms                | 
core_cms                | 
core_cms                | Sent via http://localhost:8000
core_cms                | 
core_cms                | --===============0499775380862410495==
core_cms                | Content-Type: text/html; charset="utf-8"
core_cms                | MIME-Version: 1.0
core_cms                | Content-Transfer-Encoding: 7bit
core_cms                | 
core_cms                | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
core_cms                | <html xmlns="http://www.w3.org/1999/xhtml">
core_cms                |     <head>
core_cms                |         <meta name="viewport" content="width=device-width" />
core_cms                |         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
core_cms                |         <title>Form Submission - Help</title>
core_cms                |     </head>
core_cms                |     <body itemscope itemtype="http://schema.org/EmailMessage">
core_cms                |         <h1>Help</h1>
core_cms                |         <p><strong>Date:</strong> 28th March 2024 17:48</p>
core_cms                |         
core_cms                |             <p>
core_cms                |                 <strong>Email:</strong><br/>
core_cms                |                 wbomar@tacc.utexas.edu
core_cms                |             </p>
core_cms                |         
core_cms                |         Sent via <a href="http://localhost:8000/help/">localhost:8000/help/</a>
core_cms                |     </body>
core_cms                | </html>
core_cms                | 
core_cms                | --===============0499775380862410495==--
core_cms                | 
core_cms                | -------------------------------------------------------------------------------
core_cms                | [DJANGO] DEBUG 2024-03-28 17:48:10,088 UTC apps portal.common_apps.email_management.apps.callback:45: received submission from Help
core_cms                | [DJANGO] DEBUG 2024-03-28 17:48:10,088 UTC apps portal.common_apps.email_management.apps.callback:46: <class 'dict'>
core_cms                | Content-Type: multipart/alternative;
core_cms                |  boundary="===============8586361228230960461=="
core_cms                | MIME-Version: 1.0
core_cms                | Subject: TACC Form Submission Received: Help
core_cms                | From: no-reply@tacc.utexas.edu
core_cms                | To: wbomar@tacc.utexas.edu
core_cms                | Date: Thu, 28 Mar 2024 22:48:10 -0000
core_cms                | Message-ID: <171166609008.9.18151125752073781493@core_cms>
core_cms                | 
core_cms                | --===============8586361228230960461==
core_cms                | Content-Type: text/plain; charset="utf-8"
core_cms                | MIME-Version: 1.0
core_cms                | Content-Transfer-Encoding: 7bit
core_cms                | 
core_cms                | 
core_cms                |     Greetings,
core_cms                | 
core_cms                |     You have successfully submitted a form on the example.com website. Thank you for your submission.
core_cms                | 
core_cms                |     Sincerely,
core_cms                |     example.com Communications
core_cms                |     
core_cms                | --===============8586361228230960461==
core_cms                | Content-Type: text/html; charset="utf-8"
core_cms                | MIME-Version: 1.0
core_cms                | Content-Transfer-Encoding: 7bit
core_cms                | 
core_cms                | 
core_cms                |     <p>Greetings,</p>
core_cms                |     <p>
core_cms                |     You have successfully submitted a form on the example.com website. Thank you for your submission.
core_cms                |     </p>
core_cms                |     <p>
core_cms                |     Sincerely,<br>
core_cms                |     example.com Communications
core_cms                |     </p>
core_cms                |     
core_cms                | --===============8586361228230960461==--
core_cms                | 
core_cms                | -------------------------------------------------------------------------------
core_cms                | [DJANGO] INFO 2024-03-28 17:48:10,089 UTC basehttp django.server.log_message:212: "POST /forms/submit/ HTTP/1.1" 200 66

@wesleyboar wesleyboar marked this pull request as ready for review March 28, 2024 22:59
Copy link
Collaborator

@R-Tomas-Gonzalez R-Tomas-Gonzalez left a comment

Choose a reason for hiding this comment

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

This looks good. Are we making the same changes to TUP_CMS as well?

@wesleyboar
Copy link
Member Author

@R-Tomas-Gonzalez,

Are we making the same changes to TUP_CMS as well?

Ish. I might update TACC/tup-ui#448 to match the move so it still works on a CMS image that has this change, but such a common_apps directory there in TUP-CMS would be transient; it will die after CMD-112 is done via setting instead of file.

@wesleyboar wesleyboar merged commit 17adb6a into main Mar 29, 2024
@wesleyboar wesleyboar deleted the refactor/cmd-141-move-email_management-app branch March 29, 2024 16:26
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.

None yet

2 participants