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

[Prod] Boundary diagram, manual mark goals similar, Worker Transactions, Graceful Shutdown, Remove goals from TR, Support request #2306

Merged
merged 219 commits into from
Aug 13, 2024

Conversation

GarrettEHill
Copy link
Collaborator

@GarrettEHill GarrettEHill commented Aug 9, 2024

Description of change

  • Updated boundary diagram to include Automation system
  • Add feature flag and functionality to support manually marking goals similar to aid in support cases
  • Add transactions for worker tasks
  • Implement "Graceful Shutdown" to clean up sequelize(postgres) & redis connections
  • Remove goals from TR
  • Support request: Reset session completion status for several sessions on a specific event

How to test

  • boundary diagram:
    View SVG or paste plantuml into a plantuml renderer like

    docker run -d -p 8069:8080 plantuml/plantuml-server:jetty

  • manual mark goals similar

    1. Navigate to the goals management section of the application.
    2. Select multiple goals to mark them as similar.
    3. Verify that the selected goals are grouped correctly.
    4. Ensure the backend processes and stores these groupings as expected.
    5. Run the updated unit tests to confirm all are passing.
  • Worker Transactions

    1. Run Unit Tests: Execute all unit tests to ensure they pass with the new transaction handling logic.
    2. Simulate Worker Processes: Trigger worker processes and monitor logs for detailed error messages.
    3. Check Database Consistency: Verify that data remains consistent and correctly rolled back in case of errors during worker processes.
  • Graceful Shutdown
    To ensure the changes work as expected, follow these steps:

    1. Testing Graceful Shutdown Function:

      • Start the application and observe the logs.
      • Trigger a shutdown using Ctrl+C and verify that the gracefulShutdown function logs a successful disconnection message.
      • Introduce an error in the disconnection process (e.g., simulate a network issue) and check that the error is logged appropriately.
    2. Testing Signal Handlers:

      • Start the application.
      • Send a SIGINT signal by pressing Ctrl+C and confirm that the application logs the shutdown process and exits gracefully.
      • Restart the application.
      • Send a SIGTERM signal (e.g., using kill command) and confirm that the application logs the shutdown process and exits gracefully.
    3. Testing Uncaught Exception Handler:

      • Start the application.
      • Simulate an uncaught exception by throwing an error in the code.
      • Confirm that the error is logged, the gracefulShutdown function is invoked, and the application exits with an error code.
    4. Testing Sequelize Hooks:

      • Start the application and observe the logs.
      • Verify that the beforeConnect hook logs an attempt to connect.
      • Verify that the afterConnect hook logs a successful connection.
      • Stop the application to trigger a disconnection.
      • Verify that the beforeDisconnect hook logs an attempt to disconnect.
      • Verify that the afterDisconnect hook logs a successful disconnection.
  • Remove goals from TR

    • Make sure you can still create a TR.
    • Make sure the navigator says "Vision" instead of "Vision and goal".
    • Verify hooks that create goals appear to be completely removed.
    • Look over the test changes to make sure they make sense.
  • Support request

Issue(s)

Checklists

Every PR

  • Meets issue criteria
  • JIRA ticket status updated
  • Code is meaningfully tested
  • Meets accessibility standards (WCAG 2.1 Levels A, AA)
  • API Documentation updated
  • Boundary diagram updated
  • Logical Data Model updated
  • Architectural Decision Records written for major infrastructure decisions
  • UI review complete

Before merge to main

  • [n/a] OHS demo complete
  • Ready to create production PR

Production Deploy

  • Staging smoke test completed

After merge/deploy

  • Update JIRA ticket status

@GarrettEHill GarrettEHill changed the title [Prod] [Prod] Boundary diagram, manual mark goals similar, Worker Transactions, Graceful Shutdown, Remove goals from TR, Support request Aug 10, 2024
@GarrettEHill GarrettEHill marked this pull request as ready for review August 10, 2024 04:40
@kryswisnaskas kryswisnaskas merged commit 30e3596 into production Aug 13, 2024
11 checks passed
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.

6 participants