-
Notifications
You must be signed in to change notification settings - Fork 37
Upgrade builder-datastore to use core/postgresql17 #1892
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
Open
jasonheath
wants to merge
24
commits into
main
Choose a base branch
from
jah/postgresql@17-upgrade
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
59a88c7
Upgrade builder-datastore to use core/postgresql17
jasonheath 211a5ca
Replaces hardcoded instances of 30 with PG_TIMEOUT
abb0b9e
Updates builder-api init hook for PGPASSWORD={{cfg.datastore.password}}
544b542
Restores postgresql-clent usage in plan.sh
079ce66
Removes DEBUG from builder-datastore/hooks/install
6f303c9
Adds password = "" back to builder-api/habitat/default.toml
3b9dca0
Removes "sudo hab svc load "$ACTIVE_IDENT" --force"
a08dd1c
Moves `hab pkg install "$INSTALLED_PG_IDENT"` into upgrade_postgres
486a28c
Add a whitespace back to builder-api/habitat/hooks/run
cdae126
Removes export PGDATA="{{pkg.svc_data_path}}" from builder-datastore/…
d4d25b1
Removes pwfile check from init hook
288bac8
Removes duped function, addresses shellcheck warning in support/ci/sh…
4e4b0bb
Removes $(run) from Makefile lint target
b7318fc
Captures platform-inspection.sh
cf9c0eb
Captures shared_build_environment.sh
ffb3a4e
Rewrites .envrc to eliminated duplication and clean up HAB_ORIGIN_KEYS
4942ee2
Adds a comment explaining an error that heals itself
897e932
Updates cleanup-integration-tests.sh
58c5eb1
Uses LTS-2024 everywhere, fixes verify pipeline
fd77e88
Removes core/zlib from builder-api pkg_deps
4e51106
Removes commented out lines in shared_build_environment.sh
7c9cbd5
Removes pkg_{bin,include,lib,pconfig}_dirs from builder-api plan.sh
9b8a89e
Restores core/rust/"$toolchain" removing "unstable" core/rust/1.79.0/…
878d097
Restores RUST_LOG, HAB_NONINTERACTIVE, HAB_NOCOLORING in .studiorc
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
#!/bin/bash | ||
# shellcheck disable=SC1083 | ||
|
||
set -euo pipefail | ||
|
||
PGHOST="{{cfg.datastore.host}}" | ||
PGPORT="{{cfg.datastore.port}}" | ||
PGUSER="{{cfg.datastore.user}}" | ||
PGPASSWORD="{{cfg.datastore.password}}" | ||
PGDATABASE="{{cfg.datastore.database}}" | ||
PGHOST={{cfg.datastore.host}} | ||
PGPORT={{cfg.datastore.port}} | ||
PGUSER={{cfg.datastore.user}} | ||
PGPASSWORD={{cfg.datastore.password}} | ||
PGDATABASE={{cfg.datastore.database}} | ||
export PGHOST PGPORT PGUSER PGPASSWORD PGDATABASE | ||
|
||
# Check that the DB is exists and is reachable or create it | ||
# NOTE: Builder's .studiorc has a psql function necessitating the use of command | ||
if ! command psql --no-password --command=";"; then | ||
createdb | ||
# confirm that the builder db is accessible | ||
if command psql --no-password -c ";"; then | ||
echo The builder-datastore is available to the builder-api | ||
exit 0 | ||
else | ||
echo The builder-datastore is UNAVAILABLE to the builder-api | ||
exit 3 | ||
fi |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.