gen3-dataops-toolkit 2.3.0__tar.gz → 3.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/PKG-INFO +5 -3
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/README.md +4 -2
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/pyproject.toml +1 -1
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/cli/config_cmds.py +35 -11
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/cli/release_cmds.py +7 -3
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/__init__.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/cli/__init__.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/cli/_internal/__init__.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/cli/_internal/dispatch.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/cli/_internal/registry.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/cli/_internal/resolve.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/cli/_internal/runner.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/cli/_internal/safety.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/cli/delete_cmds.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/cli/dict_cmds.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/cli/ec2_cmds.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/cli/indexd_cmds.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/cli/jobs.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/cli/k8s.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/cli/main.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/cli/metadata.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/cli/pipeline_cmds.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/cli/synth.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/config.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/indexd/__init__.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/indexd/file_access.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/indexd/indexd_registrar.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/ingest/ingest.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/resolver.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/services/delete/delete_all_metadata_for_project.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/services/delete/delete_metadata.sh +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/services/delete/delete_metadata_by_guid.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/services/dictionary/deploy_dd.sh +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/services/dictionary/pull_dict.sh +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/services/dictionary/upload_dictionary.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/services/indexd/register_indexd.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/services/indexd/verify_file_access.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/services/k8s_ops/argocd_restart_etl.sh +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/services/k8s_ops/argocd_restart_ms.sh +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/services/k8s_ops/argocd_restart_schema.sh +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/services/k8s_ops/login_to_pod.sh +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/services/k8s_ops/restart_etl_and_ms.sh +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/services/synthetic_data/delete_synth_metadata_sheepdog.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/services/synthetic_data/full_deploy_dd_and_synth.sh +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/services/synthetic_data/generate_synth_metadata.sh +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/services/synthetic_data/upload_synth_metadata_sheepdog.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/services/upload/metadata/upload_all_studies.sh +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/services/upload/metadata/upload_metadata.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/upload/__init__.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/upload/metadata_deleter.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/upload/metadata_submitter.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/upload/upload_synthdata_s3.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/utils/athena_utils.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/utils/dbt_utils.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/utils/release_writer.py +0 -0
- {gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/validate/validate.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gen3-dataops-toolkit
|
|
3
|
-
Version:
|
|
3
|
+
Version: 3.0.0
|
|
4
4
|
Summary: Gen3 DataOps toolkit (g3dt): operate SSM-published Gen3 data pipeline environments
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Author: JoshuaHarris391
|
|
@@ -113,9 +113,11 @@ structurally impossible.
|
|
|
113
113
|
|
|
114
114
|
**Only the dbt template's `ci` target is prefixed.** `g3dt config dbt-env`
|
|
115
115
|
emits, alongside the real names, the CI-isolation variants the template's
|
|
116
|
-
`ci` target consumes: `
|
|
116
|
+
`ci` target consumes: `G3DT_DB_SILVER_CI` / `G3DT_DB_GOLD_CI`
|
|
117
117
|
(`ci_` + the real database name) and `G3DT_S3_SILVER_DATA_DIR_CI` /
|
|
118
|
-
`G3DT_S3_GOLD_DATA_DIR_CI` (`dbt_ci/` under the same buckets).
|
|
118
|
+
`G3DT_S3_GOLD_DATA_DIR_CI` (`dbt_ci/` under the same buckets). Toolkit
|
|
119
|
+
releases >= 3 read the raw-free medallion SSM keys and therefore require a
|
|
120
|
+
pipeline deployment >= v2.0.0, which publishes them. Commit-
|
|
119
121
|
triggered CI builds land there; every other target (default, local) and the
|
|
120
122
|
release build keep the real, unprefixed names — so CI can never advance the
|
|
121
123
|
warehouse's Iceberg snapshots that releases pin. The library enforces the
|
|
@@ -79,9 +79,11 @@ structurally impossible.
|
|
|
79
79
|
|
|
80
80
|
**Only the dbt template's `ci` target is prefixed.** `g3dt config dbt-env`
|
|
81
81
|
emits, alongside the real names, the CI-isolation variants the template's
|
|
82
|
-
`ci` target consumes: `
|
|
82
|
+
`ci` target consumes: `G3DT_DB_SILVER_CI` / `G3DT_DB_GOLD_CI`
|
|
83
83
|
(`ci_` + the real database name) and `G3DT_S3_SILVER_DATA_DIR_CI` /
|
|
84
|
-
`G3DT_S3_GOLD_DATA_DIR_CI` (`dbt_ci/` under the same buckets).
|
|
84
|
+
`G3DT_S3_GOLD_DATA_DIR_CI` (`dbt_ci/` under the same buckets). Toolkit
|
|
85
|
+
releases >= 3 read the raw-free medallion SSM keys and therefore require a
|
|
86
|
+
pipeline deployment >= v2.0.0, which publishes them. Commit-
|
|
85
87
|
triggered CI builds land there; every other target (default, local) and the
|
|
86
88
|
release build keep the real, unprefixed names — so CI can never advance the
|
|
87
89
|
warehouse's Iceberg snapshots that releases pin. The library enforces the
|
|
@@ -25,6 +25,27 @@ app = typer.Typer(
|
|
|
25
25
|
)
|
|
26
26
|
|
|
27
27
|
|
|
28
|
+
def _req_key(rc, key: str) -> str:
|
|
29
|
+
"""Return the SSM leaf ``key`` from ``rc``, failing loudly if absent.
|
|
30
|
+
|
|
31
|
+
The medallion names (``buckets/silver|gold``, ``glue/db/bronze|silver|gold``)
|
|
32
|
+
are published under these raw-free keys by pipeline deployments >= v2.0.0.
|
|
33
|
+
Before this guard, a missing key propagated as ``None``: dbt-env silently
|
|
34
|
+
dropped the G3DT_DB_* vars and emitted ``s3://None/dbt/`` data dirs, and
|
|
35
|
+
the release search silently fell back to an account-wide catalog walk.
|
|
36
|
+
"""
|
|
37
|
+
value = rc.get(key)
|
|
38
|
+
if value is None:
|
|
39
|
+
raise config.ConfigError(
|
|
40
|
+
f"SSM parameter /{rc.project}/{rc.env}/{key} is missing. "
|
|
41
|
+
f"gen3-dataops-toolkit >= 3 reads the raw-free medallion keys "
|
|
42
|
+
f"published by gen3-aws-data-pipeline >= v2.0.0; a pipeline "
|
|
43
|
+
f"deployment older than v2.0.0 still publishes raw-prefixed keys. "
|
|
44
|
+
f"Upgrade the pipeline deployment (or pin gen3-dataops-toolkit<3)."
|
|
45
|
+
)
|
|
46
|
+
return value
|
|
47
|
+
|
|
48
|
+
|
|
28
49
|
@app.command()
|
|
29
50
|
def envs() -> None:
|
|
30
51
|
"""List the environments with a deployed SSM tree for this project."""
|
|
@@ -208,28 +229,31 @@ def dbt_env(
|
|
|
208
229
|
profile = None if env.endswith("_ec2") else config.aws_profile_for(base, marker)
|
|
209
230
|
try:
|
|
210
231
|
rc = resolver.resolve(project, base, profile=profile)
|
|
232
|
+
silver_db = _req_key(rc, "glue/db/silver")
|
|
233
|
+
gold_db = _req_key(rc, "glue/db/gold")
|
|
234
|
+
silver_bucket = _req_key(rc, "buckets/silver")
|
|
235
|
+
gold_bucket = _req_key(rc, "buckets/gold")
|
|
236
|
+
bronze_db = _req_key(rc, "glue/db/bronze")
|
|
211
237
|
except config.ConfigError as exc:
|
|
212
238
|
typer.secho(str(exc), fg=typer.colors.RED, err=True)
|
|
213
239
|
raise typer.Exit(1)
|
|
214
240
|
|
|
215
|
-
raw_silver_db = rc.get("glue/db/rawSilver")
|
|
216
|
-
raw_gold_db = rc.get("glue/db/rawGold")
|
|
217
241
|
values = {
|
|
218
242
|
"G3DT_REGION": rc.region,
|
|
219
243
|
"G3DT_ATHENA_WORKGROUP": rc.athena_workgroup,
|
|
220
244
|
"G3DT_ATHENA_OUTPUT": rc.athena_output_location,
|
|
221
|
-
"
|
|
222
|
-
"
|
|
223
|
-
"
|
|
224
|
-
"G3DT_S3_SILVER_DATA_DIR": f"s3://{
|
|
225
|
-
"G3DT_S3_GOLD_DATA_DIR": f"s3://{
|
|
245
|
+
"G3DT_DB_BRONZE": bronze_db,
|
|
246
|
+
"G3DT_DB_SILVER": silver_db,
|
|
247
|
+
"G3DT_DB_GOLD": gold_db,
|
|
248
|
+
"G3DT_S3_SILVER_DATA_DIR": f"s3://{silver_bucket}/dbt/",
|
|
249
|
+
"G3DT_S3_GOLD_DATA_DIR": f"s3://{gold_bucket}/dbt/",
|
|
226
250
|
# CI isolation: the dbt template's `ci` target builds into these
|
|
227
251
|
# instead — same grammar as the CDK's ci_ databases, same buckets
|
|
228
252
|
# under a dbt_ci/ prefix. Real names above are never prefixed.
|
|
229
|
-
"
|
|
230
|
-
"
|
|
231
|
-
"G3DT_S3_SILVER_DATA_DIR_CI": f"s3://{
|
|
232
|
-
"G3DT_S3_GOLD_DATA_DIR_CI": f"s3://{
|
|
253
|
+
"G3DT_DB_SILVER_CI": f"ci_{silver_db}",
|
|
254
|
+
"G3DT_DB_GOLD_CI": f"ci_{gold_db}",
|
|
255
|
+
"G3DT_S3_SILVER_DATA_DIR_CI": f"s3://{silver_bucket}/dbt_ci/",
|
|
256
|
+
"G3DT_S3_GOLD_DATA_DIR_CI": f"s3://{gold_bucket}/dbt_ci/",
|
|
233
257
|
}
|
|
234
258
|
if profile:
|
|
235
259
|
# A named profile means a laptop run: select the dbt target that
|
|
@@ -57,10 +57,14 @@ def write(
|
|
|
57
57
|
)
|
|
58
58
|
# The env's own silver/gold DBs (from SSM) scope the model->DB search:
|
|
59
59
|
# deterministic in shared accounts, no account-wide Glue perms needed.
|
|
60
|
+
# _req_key fails loudly if the raw-free keys are absent (pre-v2.0.0
|
|
61
|
+
# pipeline) instead of silently widening to an account-wide walk.
|
|
62
|
+
from g3dt.cli.config_cmds import _req_key
|
|
63
|
+
|
|
60
64
|
search_databases = [
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
]
|
|
65
|
+
_req_key(rc, "glue/db/silver"),
|
|
66
|
+
_req_key(rc, "glue/db/gold"),
|
|
67
|
+
]
|
|
64
68
|
release_writer.run(
|
|
65
69
|
dbt_schema_path=dbt_schema_path,
|
|
66
70
|
release_db=rc.release_db,
|
|
File without changes
|
|
File without changes
|
{gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/cli/_internal/__init__.py
RENAMED
|
File without changes
|
{gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/cli/_internal/dispatch.py
RENAMED
|
File without changes
|
{gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/cli/_internal/registry.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/indexd/indexd_registrar.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/services/dictionary/deploy_dd.sh
RENAMED
|
File without changes
|
{gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/services/dictionary/pull_dict.sh
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/services/k8s_ops/login_to_pod.sh
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/upload/metadata_deleter.py
RENAMED
|
File without changes
|
{gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/upload/metadata_submitter.py
RENAMED
|
File without changes
|
{gen3_dataops_toolkit-2.3.0 → gen3_dataops_toolkit-3.0.0}/src/g3dt/upload/upload_synthdata_s3.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|