8000 chore: Build Ubuntu 18 binaries by pcnc · Pull Request #614 · supabase/postgres · GitHub
[go: up one dir, main page]

Skip to content

chore: Build Ubuntu 18 binaries #614

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

Merged
merged 31 commits into from
Apr 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
9388f6d
chore: create Ubuntu 18 workflow
pcnc Mar 27, 2023
c94505f
chore: create Ubuntu 18 workflow
pcnc Mar 27, 2023
0dfda9d
chore: streamline workflow
pcnc Mar 27, 2023
eea3f25
chore: update
pcnc Mar 30, 2023
5539ded
chore: update sources
pcnc Mar 30, 2023
e99de23
chore: trigger workflow
pcnc Mar 30, 2023
d3ae789
chore: more soruces
pcnc Mar 30, 2023
97a36f3
chore: even more sources
pcnc Mar 30, 2023
43180fb
chore: move signed key addition
pcnc Mar 30, 2023
bf4c260
chore: trust more
pcnc Mar 30, 2023
1650744
chore: get ubuntu codename
pcnc Mar 30, 2023
2a36f43
chore: refactor llvm support for bionic
pcnc Mar 30, 2023
b95c18c
chore: fix missing env var
pcnc Mar 30, 2023
17b7bae
chore: fix ubuntu distro sources
pcnc Mar 30, 2023
7f8939c
chore: more ubuntu 18 shenanigans
pcnc Apr 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: enable Vault (#598)
* chore: re-enable Vault

* chore: bump version

* chore: version as rc

* fix: formatting

* chore: build test image from branch

* chore: trigger build

* chore: remove branch

* chore: bump version
  • Loading branch information
dragarcia authored and pcnc committed Apr 10, 2023
commit ce56df54752860b333841b3744b1925c271494a3
4 changes: 2 additions & 2 deletions ansible/tasks/setup-extensions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
- name: Install auto_explain
import_tasks: tasks/postgres-extensions/21-auto_explain.yml

# - name: Install vault
# import_tasks: tasks/postgres-extensions/23-vault.yml
- name: Install vault
import_tasks: tasks/postgres-extensions/23-vault.yml

- name: Install PGroonga
import_tasks: tasks/postgres-extensions/24-pgroonga.yml
Expand Down
2 changes: 1 addition & 1 deletion common.vars.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
postgres-version = "15.1.0.64"
postgres-version = "15.1.0.65"
3 changes: 2 additions & 1 deletion ebssurrogate/files/unit-tests/unit-test-01.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ SELECT extensions_are(
'pg_graphql',
'pgcrypto',
'pgjwt',
'uuid-ossp'
'uuid-ossp',
'supabase_vault'
]
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ grant execute on function pgsodium.crypto_aead_det_decrypt(bytea, bytea, uuid, b
grant execute on function pgsodium.crypto_aead_det_encrypt(bytea, bytea, uuid, bytea) to service_role;
grant execute on function pgsodium.crypto_aead_det_keygen to service_role;

-- create extension if not exists supabase_vault;
create extension if not exists supabase_vault;

-- migrate:down
67 changes: 67 additions & 0 deletions migrations/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ CREATE SCHEMA realtime;
CREATE SCHEMA storage;


--
-- Name: vault; Type: SCHEMA; Schema: -; Owner: -
--

CREATE SCHEMA vault;


--
-- Name: pg_graphql; Type: EXTENSION; Schema: -; Owner: -
--
Expand Down Expand Up @@ -135,6 +142,20 @@ CREATE EXTENSION IF NOT EXISTS pgjwt WITH SCHEMA extensions;
COMMENT ON EXTENSION pgjwt IS 'JSON Web Token API for Postgresql';


--
Copy link
Contributor

Choose a reason for hiding this comment

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

schema changes seem unrelated to u18 concerns?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup, those were likely generated by a previous merge commit.
Fixed by merging develop into this branch

-- Name: supabase_vault; Type: EXTENSION; Schema: -; Owner: -
--

CREATE EXTENSION IF NOT EXISTS supabase_vault WITH SCHEMA vault;


--
-- Name: EXTENSION supabase_vault; Type: COMMENT; Schema: -; Owner: -
--

COMMENT ON EXTENSION supabase_vault IS 'Supabase Vault Extension';


--
-- Name: uuid-ossp; Type: EXTENSION; Schema: -; Owner: -
--
Expand Down Expand Up @@ -552,6 +573,28 @@ END
$$;


--
-- Name: secrets_encrypt_secret_secret(); Type: FUNCTION; Schema: vault; Owner: -
--

CREATE FUNCTION vault.secrets_encrypt_secret_secret() RETURNS trigger
LANGUAGE plpgsql
AS $$
BEGIN
new.secret = CASE WHEN new.secret IS NULL THEN NULL ELSE
CASE WHEN new.key_id IS NULL THEN NULL ELSE pg_catalog.encode(
pgsodium.crypto_aead_det_encrypt(
pg_catalog.convert_to(new.secret, 'utf8'),
pg_catalog.convert_to((new.id::text || new.description::text || new.created_at::text || new.updated_at::text)::text, 'utf8'),
new.key_id::uuid,
new.nonce
),
'base64') END END;
RETURN new;
END;
$$;


SET default_tablespace = '';

SET default_table_access_method = heap;
Expand Down Expand Up @@ -738,6 +781,30 @@ CREATE TABLE storage.objects (
);


--
-- Name: decrypted_secrets; Type: VIEW; Schema: vault; Owner: -
--

CREATE VIEW vault.decrypted_secrets AS
SELECT secrets.id,
secrets.name,
secrets.description,
secrets.secret,
CASE
WHEN (secrets.secret IS NULL) THEN NULL::text
ELSE
CASE
WHEN (secrets.key_id IS NULL) THEN NULL::text
ELSE convert_from(pgsodium.crypto_aead_det_decrypt(decode(secrets.secret, 'base64'::text), convert_to(((((secrets.id)::text || secrets.description) || (secrets.created_at)::text) || (secrets.updated_at)::text), 'utf8'::name), secrets.key_id, secrets.nonce), 'utf8'::name)
END
END AS decrypted_secret,
secrets.key_id,
secrets.nonce,
secrets.created_at,
secrets.updated_at
FROM vault.secrets;


--
-- Name: refresh_tokens id; Type: DEFAULT; Schema: auth; Owner: -
--
Expand Down
2 changes: 1 addition & 1 deletion migrations/tests/extensions/test.sql
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
\ir 20-pg_stat_monitor.sql
\ir 21-auto_explain.sql
\ir 22-pg_jsonschema.sql
-- \ir 23-vault.sql
\ir 23-vault.sql
\ir 24-pgroonga.sql
\ir 25-wrappers.sql
\ir 26-hypopg.sql
Expand Down
0