-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #797 from cncf/set-k8sdata-gate
only load data if env var LOAD_K8S_DATA is set
- Loading branch information
Showing
7 changed files
with
63 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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,7 +1,16 @@ | ||
\set load_k8s_data null | ||
\getenv load_k8s_data LOAD_K8S_DATA | ||
select :load_k8s_data is not null as proceed; | ||
\gset | ||
|
||
\if :proceed | ||
begin; | ||
select f.* | ||
from | ||
(select release from grab_past_releases() as release) r | ||
, lateral load_open_api(r.release::text) f("build log"); | ||
select * from load_open_api() f("build log"); | ||
commit; | ||
\else | ||
select 'skipping as envvar LOAD_K8S_DATA is not set' as "build log"; | ||
\endif |
This file contains 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,3 +1,12 @@ | ||
\set load_k8s_data null | ||
\getenv load_k8s_data LOAD_K8S_DATA | ||
select :load_k8s_data is not null as proceed; | ||
\gset | ||
|
||
\if :proceed | ||
begin; | ||
select * from load_tests() f("build log"); | ||
commit; | ||
\else | ||
select 'skipping as envvar LOAD_K8S_DATA is not set' as "build log"; | ||
\endif |
This file contains 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,6 +1,15 @@ | ||
\set load_k8s_data null | ||
\getenv load_k8s_data LOAD_K8S_DATA | ||
select :load_k8s_data is not null as proceed; | ||
\gset | ||
|
||
\if :proceed | ||
begin; | ||
select * from load_audit_events('ci-kubernetes-e2e-gci-gce') f("build log"); | ||
select * from load_audit_events('ci-kubernetes-gce-conformance-latest') f("build log"); | ||
select * from load_audit_events('ci-audit-kind-conformance') f("build log"); | ||
call update_pod_binding_events(); | ||
commit; | ||
\else | ||
select 'skipping as envvar LOAD_K8S_DATA is not set' as "build log"; | ||
\endif |
9 changes: 9 additions & 0 deletions
9
apps/snoopdb/postgres/initdb/503_load_ineligible_endpoints.sql
This file contains 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,3 +1,12 @@ | ||
\set load_k8s_data null | ||
\getenv load_k8s_data LOAD_K8S_DATA | ||
select :load_k8s_data is not null as proceed; | ||
\gset | ||
|
||
\if :proceed | ||
begin; | ||
select * from load_ineligible_endpoints() f("build log"); | ||
commit; | ||
\else | ||
select 'skipping as envvar LOAD_K8S_DATA is not set' as "build log"; | ||
\endif |
9 changes: 9 additions & 0 deletions
9
apps/snoopdb/postgres/initdb/504_refresh_eligible_endpoint_coverage.sql
This file contains 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,4 +1,13 @@ | ||
\set load_k8s_data null | ||
\getenv load_k8s_data LOAD_K8S_DATA | ||
select :load_k8s_data is not null as proceed; | ||
\gset | ||
|
||
\if :proceed | ||
begin; | ||
refresh materialized view conformance.eligible_endpoint_coverage; | ||
select 'conformance.eligible_endpoint_coverage re-materialized' as "build log"; | ||
commit; | ||
\else | ||
select 'skipping as envvar LOAD_K8S_DATA is not set' as "build log"; | ||
\endif |
This file contains 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 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