Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support DHC Plugin Operations on Worker + AWS DHC AssumeRole #5137

Merged
merged 9 commits into from
Sep 30, 2024

Conversation

hugoghx
Copy link
Collaborator

@hugoghx hugoghx commented Sep 27, 2024

No description provided.

This comment has been minimized.

@hugoghx hugoghx marked this pull request as draft September 27, 2024 11:52
@hugoghx hugoghx marked this pull request as ready for review September 27, 2024 16:11

This comment has been minimized.

Copy link
Collaborator

@louisruch louisruch left a comment

Choose a reason for hiding this comment

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

LGTM great work

Copy link

Database schema diff between main and llb-worker-dhc @ 06f5f02

To understand how these diffs are generated and some limitations see the
documentation of the script.

Functions

diff --git a/.schema-diff/funcs_22b54c8b972c205f3d04cf838f18f339678bbcb4/_wtt_load_widgets_hosts.sql b/.schema-diff/funcs_eccdb10687ca3ab302341258a313f557571ecf63/_wtt_load_widgets_hosts.sql
index 891594e78..e529b0bcc 100644
--- a/.schema-diff/funcs_22b54c8b972c205f3d04cf838f18f339678bbcb4/_wtt_load_widgets_hosts.sql
+++ b/.schema-diff/funcs_eccdb10687ca3ab302341258a313f557571ecf63/_wtt_load_widgets_hosts.sql
@@ -81,10 +81,10 @@ create function public._wtt_load_widgets_hosts() returns void
       ('plg___wb-hplg');
 
     insert into host_plugin_catalog
-      (project_id, public_id, plugin_id, name, attributes)
+      (project_id, public_id, plugin_id, name, attributes, worker_filter)
     values
-      ('p____bwidget', 'c___wb-plghcl', 'plg___wb-hplg', 'big widget plugin catalog', ''),
-      ('p____swidget', 'c___ws-plghcl', 'plg___wb-hplg',  'small widget plugin catalog', '');
+      ('p____bwidget', 'c___wb-plghcl', 'plg___wb-hplg', 'big widget plugin catalog', '', '"test" in "/tags/type"'),
+      ('p____swidget', 'c___ws-plghcl', 'plg___wb-hplg',  'small widget plugin catalog', '', null);
 
     insert into host_plugin_host
       (catalog_id, public_id, external_id)

Tables

diff --git a/.schema-diff/tables_22b54c8b972c205f3d04cf838f18f339678bbcb4/host_plugin_catalog.sql b/.schema-diff/tables_eccdb10687ca3ab302341258a313f557571ecf63/host_plugin_catalog.sql
index 171590773..99ba183e8 100644
--- a/.schema-diff/tables_22b54c8b972c205f3d04cf838f18f339678bbcb4/host_plugin_catalog.sql
+++ b/.schema-diff/tables_eccdb10687ca3ab302341258a313f557571ecf63/host_plugin_catalog.sql
@@ -35,6 +35,7 @@ create table public.host_plugin_catalog (
     version public.wt_version,
     attributes bytea not null,
     secrets_hmac bytea,
+    worker_filter public.wt_bexprfilter,
     constraint secrets_hmac_null_or_not_empty check (((secrets_hmac is null) or (length(secrets_hmac) > 0)))
 );
 
diff --git a/.schema-diff/tables_22b54c8b972c205f3d04cf838f18f339678bbcb4/host_plugin_catalog_hst.sql b/.schema-diff/tables_eccdb10687ca3ab302341258a313f557571ecf63/host_plugin_catalog_hst.sql
index c198d6176..3ff2674b5 100644
--- a/.schema-diff/tables_22b54c8b972c205f3d04cf838f18f339678bbcb4/host_plugin_catalog_hst.sql
+++ b/.schema-diff/tables_eccdb10687ca3ab302341258a313f557571ecf63/host_plugin_catalog_hst.sql
@@ -32,7 +32,8 @@ create table public.host_plugin_catalog_hst (
     plugin_id public.wt_plugin_id not null,
     attributes bytea not null,
     history_id public.wt_url_safe_id default public.wt_url_safe_id() not null,
-    valid_range tstzrange default tstzrange(current_timestamp, null::timestamp with time zone) not null
+    valid_range tstzrange default tstzrange(current_timestamp, null::timestamp with time zone) not null,
+    worker_filter public.wt_bexprfilter
 );
 
 

Views

diff --git a/.schema-diff/views_22b54c8b972c205f3d04cf838f18f339678bbcb4/host_plugin_catalog_with_secret.sql b/.schema-diff/views_eccdb10687ca3ab302341258a313f557571ecf63/host_plugin_catalog_with_secret.sql
index 33b455b12..5ecd3a132 100644
--- a/.schema-diff/views_22b54c8b972c205f3d04cf838f18f339678bbcb4/host_plugin_catalog_with_secret.sql
+++ b/.schema-diff/views_eccdb10687ca3ab302341258a313f557571ecf63/host_plugin_catalog_with_secret.sql
@@ -31,12 +31,20 @@ create view public.host_plugin_catalog_with_secret as
     hc.version,
     hc.secrets_hmac,
     hc.attributes,
+    hc.worker_filter,
     hcs.secret,
     hcs.key_id,
     hcs.create_time as persisted_create_time,
-    hcs.update_time as persisted_update_time
-   from (public.host_plugin_catalog hc
-     left join public.host_plugin_catalog_secret hcs on (((hc.public_id)::text = (hcs.catalog_id)::text)));
+    hcs.update_time as persisted_update_time,
+    plg.name as plugin_name,
+    plg.scope_id as plugin_scope_id,
+    plg.description as plugin_description,
+    plg.create_time as plugin_create_time,
+    plg.update_time as plugin_update_time,
+    plg.version as plugin_version
+   from ((public.host_plugin_catalog hc
+     left join public.host_plugin_catalog_secret hcs on (((hc.public_id)::text = (hcs.catalog_id)::text)))
+     left join public.plugin plg on (((hc.plugin_id)::text = (plg.public_id)::text)));
 
 
 --
diff --git a/.schema-diff/views_22b54c8b972c205f3d04cf838f18f339678bbcb4/session_recording_aggregate.sql b/.schema-diff/views_eccdb10687ca3ab302341258a313f557571ecf63/session_recording_aggregate.sql
index 4c2cddf8b..ee47eb7d7 100644
--- a/.schema-diff/views_22b54c8b972c205f3d04cf838f18f339678bbcb4/session_recording_aggregate.sql
+++ b/.schema-diff/views_eccdb10687ca3ab302341258a313f557571ecf63/session_recording_aggregate.sql
@@ -77,6 +77,7 @@ create view public.session_recording_aggregate as
     hpch.description as plugin_catalog_history_description,
     hpch.attributes as plugin_catalog_history_attributes,
     hpch.plugin_id as plugin_catalog_history_plugin_id,
+    hpch.worker_filter as plugin_catalog_history_worker_filter,
     hph.public_id as plugin_host_history_public_id,
     hph.name as plugin_host_history_name,
     hph.description as plugin_host_history_description,

Triggers

Unchanged

Indexes

Unchanged

Constraints

Unchanged

Foreign Key Constraints

Unchanged

@hugoghx hugoghx merged commit 06f5f02 into main Sep 30, 2024
63 checks passed
@hugoghx hugoghx deleted the llb-worker-dhc branch September 30, 2024 21:25
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants