-
Notifications
You must be signed in to change notification settings - Fork 5
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
Feat: update operational status endpoint to include 'published' #927
base: main
Are you sure you want to change the base?
Conversation
DO $$ | ||
BEGIN | ||
RAISE NOTICE 'Migration completed successfully'; | ||
END $$; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
by convention we name this file feat_<story number>
for easier tracking. your changes also need to be in the liquibase/changelog.xml
to take effect across environments.
-- Refresh the materialized view to reflect the changes | ||
DO $$ | ||
BEGIN | ||
REFRESH MATERIALIZED VIEW FeedSearch; | ||
RAISE NOTICE 'Refreshed FeedSearch materialized view'; | ||
EXCEPTION | ||
WHEN OTHERS THEN | ||
RAISE EXCEPTION 'Failed to refresh FeedSearch materialized view: %', SQLERRM; | ||
END $$; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[question] why do we need to refresh the materialized view here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[question] why do we need to refresh the materialized view here?
It's needed, but we need to update the search queries as part of this PR.
@@ -0,0 +1,52 @@ | |||
-- Add 'published' to the OperationalStatus enum if it doesn't exist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should either set the default value of the operational status to published
or update the populate script that creates feeds from the catalog repo.
As part of this PR we need to review/update all queries that filter by operational_status; example
|
@@ -169,9 +169,12 @@ async def _update_feed( | |||
async def _populate_feed_values(feed, impl_class, session, update_request_feed): | |||
impl_class.to_orm(update_request_feed, feed, session) | |||
action = update_request_feed.operational_status_action | |||
# This is a temporary solution as the operational_status is not visible in the diff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep this comment as the operational_status is still not visible in the operational API until #908 is merged.
Summary:
This pr implements the refactoring of operational status to include "published" in the operations_api endpoint and update the null values to published in the database.
Expected behavior:
Feeds can be set to published.
Explain and/or show screenshots for how you expect the pull request to work in your testing (in case other devices exhibit different behavior).
Testing tips:
Provide tips, procedures and sample files on how to test the feature.
Testers are invited to follow the tips AND to try anything they deem relevant outside the bounds of the testing tips.
Please make sure these boxes are checked before submitting your pull request - thanks!
./scripts/api-tests.sh
to make sure you didn't break anything