-
Notifications
You must be signed in to change notification settings - Fork 3
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
(fix): fix database bootstrap #102
(fix): fix database bootstrap #102
Conversation
admin_params = get_secret(params["conn_secret_arn"]) | ||
|
||
# Custom eoAPI user/password/dbname parameters | ||
eoapi_params = get_secret(params["new_user_secret_arn"]) |
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.
Tried to make the variable names a bit more clear!
timeout=30, | ||
) | ||
print("Status code: " + response.status_code) | ||
print("Status code: ", response.status_code) |
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.
there was a bug here
# Update permissions to eoAPI user to assume pgstac_* roles | ||
with conn.cursor() as cur: | ||
print(f"Update *{eoapi_params['username']}* permissions...") | ||
print(f"Update '{eoapi_params['username']}' permissions...") | ||
update_user_permissions( | ||
cursor=cur, | ||
db_name=eoapi_params["dbname"], | ||
username=eoapi_params["username"], | ||
) |
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 need to have the search path set to pgstac,public in order to update the user permission or granting pgstac_*
to user won't work 😅
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.
One trick that might be useful is to just set the search_path on the new database you are creating.
ALTER DATABASE mydb SET SEARCH_PATH TO pgstac, public;
ok, So deployment still fails with the same error message
When running the |
10b13cd
to
495bc64
Compare
fa9b40b
into
feature/update-runtimes-and-add-pgstac-customization
* feat: update runtimes and add pgstac customization options * Update lib/tipg-api/runtime/requirements.txt Co-authored-by: Emile Tenezakis <e.tenezakis@gmail.com> * change defaults * revert version updates * Revert "revert version updates" This reverts commit 0d675e2. * back to 0.7.1 * (fix): fix database bootstrap (#102) * (fix): fix database bootstrap * fix handler * update to pgstac 0.8.5 --------- Co-authored-by: Emile Tenezakis <e.tenezakis@gmail.com>
Merge request description