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

PA message table migration and postgres configuration #321

Merged
merged 42 commits into from
Apr 26, 2024

Conversation

PaulJKim
Copy link
Contributor

Asana task: DB schema definition

This PR adds the migration for setting up the PA message table and a couple indexes.

It also adds the configuration needed for Screenplay to use Postgres.

cmaddox5 and others added 30 commits April 18, 2024 13:40
Copy link
Contributor

@cmaddox5 cmaddox5 left a comment

Choose a reason for hiding this comment

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

Looks and works great! Just have a couple of small changes I found while trying to run locally. Also, can this be deployed to dev-green before merging just to make sure everything works correctly in a deployed environment? The migration we have looks good so shouldn't have to worry about needing to roll it back before merging.

config/test.exs Outdated Show resolved Hide resolved
config/config.exs Show resolved Hide resolved
lib/screenplay/migrate.ex Outdated Show resolved Hide resolved
.envrc.template Outdated Show resolved Hide resolved
config/config.exs Show resolved Hide resolved
@cmaddox5 cmaddox5 assigned PaulJKim and unassigned cmaddox5 Apr 25, 2024
@cmaddox5
Copy link
Contributor

I just noticed the failed CI and didn't even think about there needing to be DB configuration there. Seems like we'll need to get a "local" DB configured in order to build the app in CI.

@PaulJKim
Copy link
Contributor Author

Looks and works great! Just have a couple of small changes I found while trying to run locally. Also, can this be deployed to dev-green before merging just to make sure everything works correctly in a deployed environment? The migration we have looks good so shouldn't have to worry about needing to roll it back before merging.

@cmaddox5 Alright I think I've fixed the CI issue!

Copy link
Contributor

@cmaddox5 cmaddox5 left a comment

Choose a reason for hiding this comment

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

Awesome! Good to go!

@cmaddox5
Copy link
Contributor

@PaulJKim Also, can you change the base to the feature branch? Just want to keep everything there until ready to ship to prod.

@cmaddox5 cmaddox5 assigned cmaddox5 and unassigned PaulJKim Apr 25, 2024
@PaulJKim PaulJKim changed the base branch from main to pa-message-creation April 25, 2024 18:52
@cmaddox5 cmaddox5 force-pushed the pa-message-creation branch from 3b8ea39 to 5bcf2b9 Compare April 25, 2024 19:01
@PaulJKim PaulJKim merged commit bbac6a8 into pa-message-creation Apr 26, 2024
3 of 4 checks passed
@PaulJKim PaulJKim deleted the pk/pa-message-table-migration branch April 26, 2024 18:56
cmaddox5 added a commit that referenced this pull request May 3, 2024
* Added modules needed to keep live alerts in memory.

* Added new processes to supervision tree.

* Added store test module.

* Made fetcher more testable.

* Added Fetcher test module.

* Added moduledocs.

* Credo.

* Consolidated logic so fetching and storing happens in the same module.

* Removed unnecessary pattern match.

* Changed reduce to map.

* Fixed AuthManager so users can have more than one role.

* Changed attribute name to be more specific.

* Added new role for PA Message workflow.

* Renamed a role so it better represents how it's used.

* Added a plug for verifying permission.

* Added scope with an auth check for PA message creation.

* Added role to fake Keycloak config.

* Added new role to metadata.

* Renamed modules and files to better describe functionality.

* Changed references of admin to emergency admin.

* Simplified how roles are mapped to access levels.

* Removed explicit readonly permission. Can be implied.

* Added roles list to metadata to cut down on function calls.

* Fixed tests now that roles are in assigns.

* Added test for new plug.

* Use Plug instead of manual adding assigns.

* Added a doc for the endpoint RTS will use to retrieve active messages.

* add migration and dependencies

* Add migration and database configuration

* Add documentation for postgres

* Add migrations process

* Update config/test.exs

Co-authored-by: Christian Maddox <[email protected]>

* remove async migrations method

* Add postgres service to CI

* formatting

* fetch cert

* move cert file to priv

* fix typo

---------

Co-authored-by: cmaddox5 <[email protected]>
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.

2 participants