fast2dev 1.0.0__py3-none-any.whl
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.
- f2dev/__init__.py +1 -0
- f2dev/__main__.py +5 -0
- f2dev/_bundle/platform/.dockerignore +80 -0
- f2dev/_bundle/platform/.gitignore +82 -0
- f2dev/_bundle/platform/LICENSE +202 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/template_values.yaml +1731 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/Chart.yaml +9 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-airflow-deploy.yaml +60 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-bi-sync.yaml +46 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-checkout.yaml +49 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-console-sync.yaml +41 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-e2e-label.yaml +48 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-e2e-run.yaml +43 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-e2e-teardown.yaml +47 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-governance.yaml +40 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-lint.yaml +37 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-notify.yaml +32 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-quality.yaml +38 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-refresh.yaml +36 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-supersede.yaml +30 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/block-tags.yaml +44 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/pipeline-branch.yaml +138 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/pipeline-main.yaml +150 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/files/pipeline-pr.yaml +184 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/templates/NOTES.txt +18 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/templates/settings-configmap.yaml +14 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/templates/workflowtemplates.yaml +31 -0
- f2dev/_bundle/platform/charts/data_services_charts/argo_workflows/workflow_templates/values.yaml +41 -0
- f2dev/_bundle/platform/charts/data_services_charts/cicd_workload_runner/github/template_github_values.yaml +436 -0
- f2dev/_bundle/platform/charts/data_services_charts/cicd_workload_runner/github/template_github_values_extra.yaml +49 -0
- f2dev/_bundle/platform/charts/data_services_charts/cicd_workload_runner/gitlab/template_gitlab_values.yaml +551 -0
- f2dev/_bundle/platform/charts/data_services_charts/cicd_workload_runner/gitlab/template_gitlab_values_extra.yaml +9 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_analysis/lightdash/template_values.yaml +359 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_analysis/metabase/template_values.yaml +384 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_analysis/superset/template_values.yaml +1562 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_analysis/template_values.yaml +269 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/.helmignore +15 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/Chart.yaml +20 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/template_values.yaml.j2 +175 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/NOTES.txt +19 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/_helpers.tpl +50 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/cicd-rbac.yaml +30 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/configmap.yaml +142 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/extras.yaml +14 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/ingress.yaml +69 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/promtail-configmap.yaml +68 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/secret.yaml +31 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/service.yaml +15 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/serviceaccount.yaml +12 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/statefulset.yaml +276 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/valkey.yaml +113 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/templates/warehouse-stats-cronjob.yaml +107 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_control_plane/values.yaml +828 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_dbt_server/template_values.yaml +385 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_governance/template_dh_prerequisites_values.yaml +118 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_governance/template_dh_values.yaml +1671 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_governance/template_kafka_values.yaml +112 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_governance/template_opensearch_values.yaml +662 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_governance/template_values.yaml +738 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/Chart.yaml +6 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/files/argo-openapi.json +681 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/templates/_helpers.tpl +17 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/templates/argo-rbac.yaml +35 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/templates/backends.yaml +327 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/templates/gateway.yaml +150 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/hub/values.yaml +91 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_mcp_hub/template_values.yaml +142 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_modeling/template_values.yaml +1167 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_modeling/template_values_extra.yaml +99 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/airflow-cleanup/Dockerfile +10 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/airflow-cleanup/build.sh +38 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/airflow-cleanup/cleanup.py +452 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/airflow-cleanup/requirements.txt +3 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/docs/keycloak-oidc-setup.md +106 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/template_values.yaml +5536 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/template_values_extra.yaml +379 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/webserver-config/configmap.yaml +459 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/webserver-config/fast2dev_auth.py +285 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/webserver-config/fast2dev_mcp_plugin.py +24 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_orchestration/webserver-config/webserver_config.py +130 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/Dockerfile +10 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/build.sh +38 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/cleanup.py +749 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/k8s/configmap.yaml +24 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/k8s/cronjob.yaml +137 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte-cleanup/requirements.txt +3 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/.helmignore +26 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/Chart.lock +3 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/Chart.yaml +15 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/README.md +243 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/NOTES.txt +31 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/_helpers.tpl +245 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/_images.tpl +17 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-auth-secret.yaml +35 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-bootloader/bootloader-secrets.yaml +19 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-bootloader/pod.yaml +126 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-connector-rollout-worker/deployment.yaml +171 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-cron/cron-secrets.yaml +19 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-cron/deployment.yaml +149 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-db.yaml +88 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/_helpers.tpl +111 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/deployment.yaml +169 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/hpa.yaml +23 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/pdb.yaml +17 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/service.yaml +25 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-direct-job-runner/serviceaccount.yaml +10 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-featureflag-server/deployment.yaml +161 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-featureflag-server/service.yaml +25 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-keycloak/service.yaml +62 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-keycloak/statefulset.yaml +182 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-manifest-server/_helpers.tpl +54 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-manifest-server/deployment.yaml +152 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-manifest-server/service.yaml +23 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-manifest-server/serviceaccount.yaml +10 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-metrics/deployment.yaml +124 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-server/deployment.yaml +227 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-server/service.yaml +29 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-stigg-sidecar/deployment.yaml +184 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-stigg-sidecar/service.yaml +21 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-temporal/configmap.yaml +55 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-temporal/deployment.yaml +220 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-temporal/service.yaml +21 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-temporal-ui/deployment.yaml +122 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-temporal-ui/service.yaml +23 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-webapp/deployment.yaml +146 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-webapp/ingress.yaml +63 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-webapp/service.yaml +32 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-worker/deployment.yaml +229 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-workload-api-server/deployment.yaml +191 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-workload-api-server/service.yaml +25 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-workload-launcher/deployment.yaml +232 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/airbyte-workload-launcher/jobs-secrets.yaml +21 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_auth.tpl +944 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_aws.tpl +109 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_cluster.tpl +82 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_common.tpl +370 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_connector.tpl +58 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_connectorRollout.tpl +141 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_connectorRolloutWorker.tpl +56 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_cron.tpl +62 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_customerio.tpl +56 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_database.tpl +375 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_dataplaneGroups.tpl +38 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_directJobRunner.tpl +122 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_featureFlags.tpl +126 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_java.tpl +38 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_jobs.tpl +422 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_keycloak.tpl +542 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_logging.tpl +38 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_metrics.tpl +214 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_micronaut.tpl +43 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_minio.tpl +64 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_secretsManager.tpl +628 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_server.tpl +533 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_shopify.tpl +83 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_stigg.tpl +157 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_storage.tpl +468 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_temporal.tpl +943 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_topology.tpl +98 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_tracking.tpl +82 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_webapp.tpl +38 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_worker.tpl +366 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_workloadApiServer.tpl +62 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_workloadLauncher.tpl +395 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/config/_workloads.tpl +770 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/env-configmap.yaml +62 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/gcs-log-creds-secret.yaml +19 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/ingress.yaml +69 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/minio.yaml +161 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/secret.yaml +31 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/serviceaccount.yaml +50 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/telemetry-configmap.yaml +32 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/templates/tests/test-webapp.yaml +34 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte/values.yaml +3158 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/.helmignore +12 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/Chart.yaml +16 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/README.md +172 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/templates/_helpers.tpl +42 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/templates/deployment.yaml +105 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/templates/externalsecret.yaml +23 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/templates/pdb.yaml +15 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/templates/service.yaml +18 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/airbyte_chart/airbyte-metrics-fast2dev-ddp/values.yaml +97 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/feature-flags-configmap.yaml +16 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/template_metrics_values.yaml +13 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/template_oauth2proxy_values.yaml +1200 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_replication/template_values.yaml +3255 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/Chart.yaml +7 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/hazelcast-client.yaml +27 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/hazelcast-master.yaml +38 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/hazelcast-worker.yaml +29 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/jvm_client_options +24 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/jvm_master_options +6 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/jvm_worker_options +6 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/log4j2.properties +109 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/conf/seatunnel.yaml +36 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/_helpers.tpl +70 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/configmap.yaml +11 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/deployment-master.yaml +120 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/deployment-worker.yaml +118 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/rbac.yaml +32 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/templates/services.yaml +33 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/seatunnel/values.yaml +101 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/template_oauth2proxy_values.yaml +196 -0
- f2dev/_bundle/platform/charts/data_services_charts/data_streaming/template_values.yaml +75 -0
- f2dev/_bundle/platform/charts/data_services_charts/object_storage_operator/template_values.yaml +506 -0
- f2dev/_bundle/platform/charts/infra_services_charts/cert_manager/csi_driver_values.yaml +193 -0
- f2dev/_bundle/platform/charts/infra_services_charts/cert_manager/template_pdns_webhook_values.yaml +91 -0
- f2dev/_bundle/platform/charts/infra_services_charts/cert_manager/template_values.yaml +1777 -0
- f2dev/_bundle/platform/charts/infra_services_charts/cert_manager/template_values_extra.yaml +253 -0
- f2dev/_bundle/platform/charts/infra_services_charts/cluster_cleaner/template_values.yaml +57 -0
- f2dev/_bundle/platform/charts/infra_services_charts/external_dns/template_values.yaml +476 -0
- f2dev/_bundle/platform/charts/infra_services_charts/external_dns/template_values_extra.yaml +131 -0
- f2dev/_bundle/platform/charts/infra_services_charts/idp_sso_manager/realm_template.json +4785 -0
- f2dev/_bundle/platform/charts/infra_services_charts/idp_sso_manager/template_values.yaml +657 -0
- f2dev/_bundle/platform/charts/infra_services_charts/pvc_autoscaller/template_values.yaml +36 -0
- f2dev/_bundle/platform/charts/infra_services_charts/pvc_autoscaller/template_values_extra.yaml +352 -0
- f2dev/_bundle/platform/charts/infra_services_charts/secret_manager/template_values.yaml +1218 -0
- f2dev/_bundle/platform/charts/infra_services_charts/secret_manager/template_values_extra.yaml +845 -0
- f2dev/_bundle/platform/charts/infra_services_charts/secret_manager_operator/template_values.yaml +561 -0
- f2dev/_bundle/platform/charts/infra_services_charts/secret_manager_operator/template_values_extra.yaml +23 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_logs/template_alloy_events_values.yaml +59 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_logs/template_alloy_values.yaml +185 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_logs/template_loki_values.yaml +108 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_metrics/template_values.yaml +1530 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/00-main/.gitkeep +0 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/00-main/f2d-main.json +2871 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/01-platform/.gitkeep +0 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/01-platform/f2d-k8s-cluster.json +1751 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/01-platform/f2d-microservices.json +1682 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/01-platform/f2d-pvc-storage.json +1320 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/01-platform/f2d-service.json +1193 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/.gitkeep +0 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/f2d-cert-manager.json +755 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/f2d-keycloak.json +746 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/f2d-object-storage.json +881 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/f2d-postgresql.json +1590 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/02-infrastructure/f2d-traefik.json +1375 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/.gitkeep +0 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-cicd-workflows-trends.json +1916 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-cicd-workflows.json +1330 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-analysis.json +631 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-freshness.json +1362 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-governance.json +1958 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-modeling.json +764 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-orchestration-trends.json +2352 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-orchestration.json +1506 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-quality.json +1549 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-replication-trends.json +2799 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-replication.json +2153 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-streaming-trends.json +1536 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/03-data-services/f2d-data-streaming.json +1209 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/04-data-warehouse/.gitkeep +0 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/04-data-warehouse-bigquery/.gitkeep +0 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/04-data-warehouse-bigquery/f2d-bigquery.json +990 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/05-logs/.gitkeep +0 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/05-logs/f2d-logs.json +630 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/folders.yaml +17 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/dashboards/requirements.yaml +8 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/template_alerts_cm.yaml +2031 -0
- f2dev/_bundle/platform/charts/infra_services_charts/services_monitoring/template_values.yaml +1315 -0
- f2dev/_bundle/platform/charts/infra_services_charts/stackgres_postgres_db/template_values.yaml +550 -0
- f2dev/_bundle/platform/charts/infra_services_charts/stackgres_postgres_db/template_values_extra.yaml +742 -0
- f2dev/_bundle/platform/charts/infra_services_charts/traefik_lb/template_values.yaml +1758 -0
- f2dev/_bundle/platform/cli/README.md +866 -0
- f2dev/_bundle/platform/cli/__init__.py +42 -0
- f2dev/_bundle/platform/cli/__main__.py +17 -0
- f2dev/_bundle/platform/cli/cert_providers.py +369 -0
- f2dev/_bundle/platform/cli/command_record.py +144 -0
- f2dev/_bundle/platform/cli/config/data_services_config.json +217 -0
- f2dev/_bundle/platform/cli/config/environment_profiles.yaml +183 -0
- f2dev/_bundle/platform/cli/config/images.json +129 -0
- f2dev/_bundle/platform/cli/config/infrastructure_services_config.json +141 -0
- f2dev/_bundle/platform/cli/config.py +252 -0
- f2dev/_bundle/platform/cli/deployment_configuration_aws_example.yaml +117 -0
- f2dev/_bundle/platform/cli/deployment_configuration_gcp_example.yaml +130 -0
- f2dev/_bundle/platform/cli/deployment_configuration_onprem_example.yaml +71 -0
- f2dev/_bundle/platform/cli/destroy.py +677 -0
- f2dev/_bundle/platform/cli/dns_check.py +27 -0
- f2dev/_bundle/platform/cli/dns_providers.py +405 -0
- f2dev/_bundle/platform/cli/exit_codes.py +32 -0
- f2dev/_bundle/platform/cli/fixers.py +56 -0
- f2dev/_bundle/platform/cli/generate_only.py +336 -0
- f2dev/_bundle/platform/cli/health_report.py +114 -0
- f2dev/_bundle/platform/cli/logging.py +206 -0
- f2dev/_bundle/platform/cli/main.py +5293 -0
- f2dev/_bundle/platform/cli/precheck.py +1523 -0
- f2dev/_bundle/platform/cli/prerequisites/README.md +208 -0
- f2dev/_bundle/platform/cli/prerequisites/install-prerequisites.bat +107 -0
- f2dev/_bundle/platform/cli/prerequisites/install-prerequisites.ps1 +343 -0
- f2dev/_bundle/platform/cli/prerequisites/install-prerequisites.sh +207 -0
- f2dev/_bundle/platform/cli/prerequisites/linux/install-linux.sh +775 -0
- f2dev/_bundle/platform/cli/prerequisites/macos/install-macos.sh +634 -0
- f2dev/_bundle/platform/cli/prerequisites/requirements.txt +41 -0
- f2dev/_bundle/platform/cli/prerequisites/verify-prerequisites.ps1 +150 -0
- f2dev/_bundle/platform/cli/prerequisites/verify-prerequisites.sh +418 -0
- f2dev/_bundle/platform/cli/prerequisites/versions.yaml +43 -0
- f2dev/_bundle/platform/cli/prerequisites/windows/install-windows.ps1 +1005 -0
- f2dev/_bundle/platform/cli/restore.py +179 -0
- f2dev/_bundle/platform/cli/service_gates.py +160 -0
- f2dev/_bundle/platform/cli/state.py +332 -0
- f2dev/_bundle/platform/cli/wizard.py +782 -0
- f2dev/_bundle/platform/cli.py +235 -0
- f2dev/_bundle/platform/deployers/__init__.py +4 -0
- f2dev/_bundle/platform/deployers/base_deployer.py +8 -0
- f2dev/_bundle/platform/deployers/clouds/__init__.py +0 -0
- f2dev/_bundle/platform/deployers/clouds/aws_cloud.py +619 -0
- f2dev/_bundle/platform/deployers/clouds/azure_cloud.py +0 -0
- f2dev/_bundle/platform/deployers/clouds/google_cloud.py +785 -0
- f2dev/_bundle/platform/deployers/clouds/terragrunt_progress.py +56 -0
- f2dev/_bundle/platform/deployers/services/data_services/1.0_cicd_workload_runner.py +644 -0
- f2dev/_bundle/platform/deployers/services/data_services/12.0_control_plane.py +321 -0
- f2dev/_bundle/platform/deployers/services/data_services/13.0_data_mcp_hub.py +362 -0
- f2dev/_bundle/platform/deployers/services/data_services/2.0_object_storage_operator.py +416 -0
- f2dev/_bundle/platform/deployers/services/data_services/2.5_services_logs.py +482 -0
- f2dev/_bundle/platform/deployers/services/data_services/3.0_data_cicd_workflows.py +361 -0
- f2dev/_bundle/platform/deployers/services/data_services/4.0_data_replication.py +534 -0
- f2dev/_bundle/platform/deployers/services/data_services/4.5_data_streaming.py +303 -0
- f2dev/_bundle/platform/deployers/services/data_services/5.0_data_orchestration.py +760 -0
- f2dev/_bundle/platform/deployers/services/data_services/6.0_data_modeling.py +753 -0
- f2dev/_bundle/platform/deployers/services/data_services/7.0_data_governance.py +795 -0
- f2dev/_bundle/platform/deployers/services/data_services/8.0_data_analysis.py +587 -0
- f2dev/_bundle/platform/deployers/services/infra_services/1.0_secret_operator.py +467 -0
- f2dev/_bundle/platform/deployers/services/infra_services/10.0_cluster_pvc_autoscaller.py +500 -0
- f2dev/_bundle/platform/deployers/services/infra_services/2.0_cert_manager.py +963 -0
- f2dev/_bundle/platform/deployers/services/infra_services/3.0_external_dns.py +823 -0
- f2dev/_bundle/platform/deployers/services/infra_services/4.0_traefik_lb.py +604 -0
- f2dev/_bundle/platform/deployers/services/infra_services/5.0_stackgres_postgresql.py +652 -0
- f2dev/_bundle/platform/deployers/services/infra_services/6.0_services_metrics.py +515 -0
- f2dev/_bundle/platform/deployers/services/infra_services/7.0_services_monitoring.py +787 -0
- f2dev/_bundle/platform/deployers/services/infra_services/8.0_cluster_cleaner.py +439 -0
- f2dev/_bundle/platform/deployers/services/infra_services/9.0_idp_sso_manager.py +790 -0
- f2dev/_bundle/platform/readme.md +47 -0
- f2dev/_bundle/platform/requirements.txt +14 -0
- f2dev/_bundle/platform/terraform/aws_cloud/templates/backend.tf_template +10 -0
- f2dev/_bundle/platform/terraform/aws_cloud/templates/defaults.yaml_template +11 -0
- f2dev/_bundle/platform/terraform/aws_cloud/templates/env.yaml_template +2 -0
- f2dev/_bundle/platform/terraform/aws_cloud/templates/root.hcl_advanced_template +134 -0
- f2dev/_bundle/platform/terraform/aws_cloud/templates/root.hcl_basic_template +134 -0
- f2dev/_bundle/platform/terraform/aws_cloud/templates/terragrunt.hcl_advanced_template +134 -0
- f2dev/_bundle/platform/terraform/aws_cloud/templates/terragrunt.hcl_basic_template +134 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/01-apps-vpc/terragrunt.hcl +26 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/02-create-dns-ns-record/terragrunt.hcl +16 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/03-eks-cluster/terragrunt.hcl +21 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/04-external_dns_sa/terragrunt.hcl +28 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/01-apps-vpc/terragrunt.hcl +25 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/02-eks-cluster/terragrunt.hcl +32 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/03-external-dns-irsa/terragrunt.hcl +34 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/04-cert-manager-irsa/terragrunt.hcl +34 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/05-create-dns-zone/terragrunt.hcl +22 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/06-create-dns-ns-record/terragrunt.hcl +44 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/bi-platform/empty.yaml +1 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/empty.yaml +1 -0
- f2dev/_bundle/platform/terraform/aws_cloud/terragrunt/env.hcl +2 -0
- f2dev/_bundle/platform/terraform/azure_cloud/README.md +3 -0
- f2dev/_bundle/platform/terraform/azure_cloud/templates/_keep_structure.txt +0 -0
- f2dev/_bundle/platform/terraform/google_cloud/README.md +20 -0
- f2dev/_bundle/platform/terraform/google_cloud/templates/backend.tf_template +7 -0
- f2dev/_bundle/platform/terraform/google_cloud/templates/defaults.yaml_template +12 -0
- f2dev/_bundle/platform/terraform/google_cloud/templates/env.yaml_template +2 -0
- f2dev/_bundle/platform/terraform/google_cloud/templates/root.hcl_advanced_template +114 -0
- f2dev/_bundle/platform/terraform/google_cloud/templates/root.hcl_basic_template +116 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/.gitignore +3 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/00-create-ou-folder/terragrunt.hcl +15 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/01-create-project/terragrunt.hcl +30 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/02-enable-apis/terragrunt.hcl +25 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/03-0-apps-vpc/terragrunt.hcl +134 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/04-external-ip-traefik/terragrunt.hcl +29 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/05-create-dns-zone/terragrunt.hcl +25 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/06-create-dns-ns-record/terragrunt.hcl +43 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/07-gke-cluster/terragrunt.hcl +103 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/08-dbt_deploy_sa/terragrunt.hcl +36 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/09-dbt_sa/terragrunt.hcl +40 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/10-cert_manager_sa/terragrunt.hcl +34 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/11-external_dns_sa/terragrunt.hcl +30 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/12-monitoring_sa/terragrunt.hcl +52 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/13-data_replication_sa/terragrunt.hcl +35 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/14-data_orchestration_sa/terragrunt.hcl +35 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/15-bi_data_sa/terragrunt.hcl +43 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/16-whitelist-external-ip-on-common/terragrunt.hcl +30 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/17-kubeconfig/terragrunt.hcl +23 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/bi-platform/18-data_streaming_sa/terragrunt.hcl +24 -0
- f2dev/_bundle/platform/terraform/google_cloud/terragrunt/empty.yaml +1 -0
- f2dev/_bundle/platform/utils/__init__.py +0 -0
- f2dev/_bundle/platform/utils/customer_data_platform_repository_operator.py +1098 -0
- f2dev/_bundle/platform/utils/customer_secret_manager_operations.py +1635 -0
- f2dev/_bundle/platform/utils/environment_profiles.py +58 -0
- f2dev/_bundle/platform/utils/helm_utils.py +215 -0
- f2dev/_bundle/platform/utils/infrastructure_deployment_operator.py +1532 -0
- f2dev/_bundle/platform/utils/keycloak_realm_reconcile.py +320 -0
- f2dev/_bundle/platform/utils/kubeconfig_fixer.py +265 -0
- f2dev/_bundle/platform/utils/raw_extras.py +34 -0
- f2dev/_bundle/platform/utils/readiness.py +330 -0
- f2dev/_bundle/platform/utils/secret_structure_upgrade.py +194 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/.gitignore +7 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/README.md +33 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/analyses/.gitkeep +0 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/dbt_project.yml +52 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/macros/.gitkeep +0 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/macros/fast2dev_bq_time_zones.sql +12 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/macros/fast2dev_monitoring_grain.sql +23 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_daily_spend.sql +19 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_daily_spend.yml +25 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_model_costs_daily.sql +16 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_model_costs_daily.yml +24 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_storage_by_dataset.sql +12 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_storage_by_dataset.yml +21 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_user_costs_daily.sql +14 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_user_costs_daily.yml +22 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_weekly_kpi.sql +52 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_weekly_kpi.yml +42 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_weekly_spend.sql +74 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/marts/fast2dev_bq_weekly_spend.yml +49 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/sources/billing_export.yml +9 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/staging/fast2dev_bq_billing_export.sql +9 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/models/staging/fast2dev_bq_billing_export.yml +4 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/packages.yml +5 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/profiles.yml +15 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/scripts/run_monitoring.py +201 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/seeds/.gitkeep +0 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/snapshots/.gitkeep +0 -0
- f2dev/_bundle/platform/utils/templates/control_plane_warehouse_stats_template/bigquery_usage/tests/.gitkeep +0 -0
- f2dev/_bundle/platform/utils/templates/dry_run/gcp_sa.json +12 -0
- f2dev/_bundle/platform/utils/templates/dry_run/kubeconfig.yaml +18 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/data_orchestrator/repository_structure/README.MD +50 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/data_orchestrator/repository_structure/dags/dbt/README.MD +47 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/data_orchestrator/repository_structure/dags/fast2dev_healthcheck.py_template_airflow_3.x +158 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/bitbucket/bitbucket-pipelines.yml_template +144 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitea/.gitea/PR_VALIDATION.md +52 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitea/.gitea/pull_request_template.md +48 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitea/.gitea/workflows/argo-workflows.yml_template +143 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitea/.gitea/workflows/pr-agent.yml +30 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitea/.gitea/workflows/validate-pr-description.yml +38 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/github/.github/PR_VALIDATION.md +52 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/github/.github/pull_request_template.md +48 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/github/.github/workflows/argo-workflows.yml_template +143 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/github/.github/workflows/pr-agent.yml +37 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/github/.github/workflows/validate-pr-description.yml +157 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitlab/.gitlab/PR_VALIDATION.md +43 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitlab/.gitlab/merge_request_templates/Default.md +48 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/gitlab/.gitlab-ci.yml_template +181 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/repository_structure/.gitignore +21 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/repository_structure/.pr_agent.toml +82 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/repository_structure/AGENTS.md +126 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/dbt_data_model/repository_structure/README.MD +101 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/infrastructure_deployment_files/DR.md +341 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/infrastructure_deployment_files/README.md.j2 +81 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/infrastructure_deployment_files/decrypt_files.py +331 -0
- f2dev/_bundle/platform/utils/templates/git_repo_templates/infrastructure_deployment_files/encrypt_files.py +321 -0
- f2dev/_bundle/platform/utils/templates/secret_structure_template/customer_vault_structure.json +502 -0
- f2dev/_bundle/platform/utils/vault_structure_sync.py +96 -0
- f2dev/_bundle/terraform-modules/README.md +12 -0
- f2dev/_bundle/terraform-modules/aws_cloud/README.md +7 -0
- f2dev/_bundle/terraform-modules/aws_cloud/eks/addons-roles.tf +298 -0
- f2dev/_bundle/terraform-modules/aws_cloud/eks/main.tf +313 -0
- f2dev/_bundle/terraform-modules/aws_cloud/eks/outputs.tf +3 -0
- f2dev/_bundle/terraform-modules/aws_cloud/eks/policies/lb-controller-policy.json +219 -0
- f2dev/_bundle/terraform-modules/aws_cloud/eks/provider.tf +36 -0
- f2dev/_bundle/terraform-modules/aws_cloud/eks/variables.tf +107 -0
- f2dev/_bundle/terraform-modules/aws_cloud/eks/versions.tf +10 -0
- f2dev/_bundle/terraform-modules/aws_cloud/gcp_aws_zone/main.tf +25 -0
- f2dev/_bundle/terraform-modules/aws_cloud/gcp_aws_zone/provider.tf +17 -0
- f2dev/_bundle/terraform-modules/aws_cloud/gcp_aws_zone/variables.tf +41 -0
- f2dev/_bundle/terraform-modules/aws_cloud/vpc/main.tf +34 -0
- f2dev/_bundle/terraform-modules/aws_cloud/vpc/outputs.tf +44 -0
- f2dev/_bundle/terraform-modules/aws_cloud/vpc/provider.tf +12 -0
- f2dev/_bundle/terraform-modules/aws_cloud/vpc/variables.tf +118 -0
- f2dev/_bundle/terraform-modules/aws_cloud/vpc/versions.tf +10 -0
- f2dev/_bundle/terraform-modules/azure_cloud/README.md +3 -0
- f2dev/_bundle/terraform-modules/google_cloud/README.md +17 -0
- f2dev/_bundle/terraform-modules/google_cloud/artifact-registry/main.tf +8 -0
- f2dev/_bundle/terraform-modules/google_cloud/artifact-registry/providers.tf +6 -0
- f2dev/_bundle/terraform-modules/google_cloud/artifact-registry/variables.tf +17 -0
- f2dev/_bundle/terraform-modules/google_cloud/artifact-registry/versions.tf +8 -0
- f2dev/_bundle/terraform-modules/google_cloud/cloud-dns/main.tf +24 -0
- f2dev/_bundle/terraform-modules/google_cloud/cloud-dns/outputs.tf +25 -0
- f2dev/_bundle/terraform-modules/google_cloud/cloud-dns/providers.tf +7 -0
- f2dev/_bundle/terraform-modules/google_cloud/cloud-dns/variables.tf +17 -0
- f2dev/_bundle/terraform-modules/google_cloud/cloud-dns/versions.tf +9 -0
- f2dev/_bundle/terraform-modules/google_cloud/cloud-dns-recordset/main.tf +38 -0
- f2dev/_bundle/terraform-modules/google_cloud/cloud-dns-recordset/variables.tf +73 -0
- f2dev/_bundle/terraform-modules/google_cloud/cloud-dns-recordset/versions.tf +39 -0
- f2dev/_bundle/terraform-modules/google_cloud/composer/main.tf +213 -0
- f2dev/_bundle/terraform-modules/google_cloud/composer/outputs.tf +31 -0
- f2dev/_bundle/terraform-modules/google_cloud/composer/provider.tf +4 -0
- f2dev/_bundle/terraform-modules/google_cloud/composer/variables.tf +192 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-ou-folder/main.tf +29 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-ou-folder/output.tf +4 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-ou-folder/providers.tf +6 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-ou-folder/variables.tf +40 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-ou-folder/versions.tf +8 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-project/main.tf +18 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-project/output.tf +8 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-project/providers.tf +6 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-project/variables.tf +27 -0
- f2dev/_bundle/terraform-modules/google_cloud/create-project/versions.tf +9 -0
- f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/README.md +188 -0
- f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/main.tf +135 -0
- f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/output.tf +16 -0
- f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/providers.tf +6 -0
- f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/variables.tf +54 -0
- f2dev/_bundle/terraform-modules/google_cloud/deploy_sa/versions.tf +17 -0
- f2dev/_bundle/terraform-modules/google_cloud/enable_apis/main.tf +14 -0
- f2dev/_bundle/terraform-modules/google_cloud/enable_apis/provider.tf +7 -0
- f2dev/_bundle/terraform-modules/google_cloud/enable_apis/variables.tf +13 -0
- f2dev/_bundle/terraform-modules/google_cloud/enable_apis/versions.tf +10 -0
- f2dev/_bundle/terraform-modules/google_cloud/external-ip/README.md +89 -0
- f2dev/_bundle/terraform-modules/google_cloud/external-ip/main.tf +17 -0
- f2dev/_bundle/terraform-modules/google_cloud/external-ip/outputs.tf +19 -0
- f2dev/_bundle/terraform-modules/google_cloud/external-ip/variables.tf +43 -0
- f2dev/_bundle/terraform-modules/google_cloud/fw-add/main.tf +24 -0
- f2dev/_bundle/terraform-modules/google_cloud/fw-add/providers.tf +6 -0
- f2dev/_bundle/terraform-modules/google_cloud/fw-add/variables.tf +37 -0
- f2dev/_bundle/terraform-modules/google_cloud/fw-add/versions.tf +9 -0
- f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/README.md +10 -0
- f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/main.tf +459 -0
- f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/outputs.tf +44 -0
- f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/provider.tf +19 -0
- f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/variables.tf +354 -0
- f2dev/_bundle/terraform-modules/google_cloud/gke-cluster/versions.tf +22 -0
- f2dev/_bundle/terraform-modules/google_cloud/kubeconfig/README.md +40 -0
- f2dev/_bundle/terraform-modules/google_cloud/kubeconfig/main.tf +54 -0
- f2dev/_bundle/terraform-modules/google_cloud/kubeconfig/outputs.tf +10 -0
- f2dev/_bundle/terraform-modules/google_cloud/kubeconfig/variables.tf +24 -0
- f2dev/_bundle/terraform-modules/google_cloud/kubeconfig/versions.tf +10 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/README.md +47 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/main.tf +51 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/net-address/README.md +103 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/net-address/main.tf +71 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/net-address/outputs.tf +71 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/net-address/variables.tf +82 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/net-address/versions.tf +27 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/outputs.tf +35 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/provider.tf +4 -0
- f2dev/_bundle/terraform-modules/google_cloud/shared-vpc/variables.tf +237 -0
- f2dev/_bundle/terraform-modules/oracle_cloud/README.md +3 -0
- f2dev/launcher.py +153 -0
- fast2dev-1.0.0.dist-info/METADATA +201 -0
- fast2dev-1.0.0.dist-info/RECORD +543 -0
- fast2dev-1.0.0.dist-info/WHEEL +4 -0
- fast2dev-1.0.0.dist-info/entry_points.txt +2 -0
- fast2dev-1.0.0.dist-info/licenses/LICENSE +202 -0
- fast2dev-1.0.0.dist-info/licenses/NOTICE +6 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{{ config(materialized='table', enabled=var('enable_gcp_billing_export'), tags=['bigquery_usage', 'billing']) }}
|
|
2
|
+
-- BigQuery spend per day and category from the billing export, once per report time zone.
|
|
3
|
+
select
|
|
4
|
+
tz.time_zone,
|
|
5
|
+
tz.time_zone_label,
|
|
6
|
+
date(b.usage_start_time, tz.time_zone) as day,
|
|
7
|
+
case
|
|
8
|
+
when lower(b.sku.description) like '%storage%' then 'storage'
|
|
9
|
+
when lower(b.sku.description) like '%streaming%' or lower(b.sku.description) like '%write api%' then 'streaming'
|
|
10
|
+
when lower(b.sku.description) like '%analysis%' or lower(b.sku.description) like '%slot%' or lower(b.sku.description) like '%compute%' then 'compute'
|
|
11
|
+
else 'other'
|
|
12
|
+
end as cost_category,
|
|
13
|
+
b.currency,
|
|
14
|
+
sum(b.cost) as cost,
|
|
15
|
+
sum(b.cost) + sum(ifnull((select sum(c.amount) from unnest(b.credits) as c), 0)) as net_cost
|
|
16
|
+
from {{ ref('fast2dev_bq_billing_export') }} as b
|
|
17
|
+
cross join {{ fast2dev_bq_time_zones() }} as tz
|
|
18
|
+
where b.service.description = 'BigQuery'
|
|
19
|
+
group by 1, 2, 3, 4, 5
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
models:
|
|
3
|
+
- name: fast2dev_bq_daily_spend
|
|
4
|
+
description: BigQuery spend per day and category from the billing export, once per report time zone. Includes streaming inserts.
|
|
5
|
+
columns:
|
|
6
|
+
- name: time_zone
|
|
7
|
+
description: "Time zone the dates are in: America/Los_Angeles (Google billing time, as the Cloud billing console) or the report time zone. Each row exists once per time zone, so always filter on one."
|
|
8
|
+
data_tests: [not_null]
|
|
9
|
+
- name: time_zone_label
|
|
10
|
+
description: "Readable time zone name, e.g. Billing (Pacific)"
|
|
11
|
+
- name: day
|
|
12
|
+
description: Usage day in the row's time zone
|
|
13
|
+
data_tests: [not_null]
|
|
14
|
+
- name: cost_category
|
|
15
|
+
description: compute, storage, streaming or other
|
|
16
|
+
data_tests:
|
|
17
|
+
- accepted_values:
|
|
18
|
+
arguments:
|
|
19
|
+
values: ['compute', 'storage', 'streaming', 'other']
|
|
20
|
+
- name: currency
|
|
21
|
+
description: Billing currency from the export
|
|
22
|
+
- name: cost
|
|
23
|
+
description: Cost before credits
|
|
24
|
+
- name: net_cost
|
|
25
|
+
description: Cost after credits
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{{ config(materialized='table', tags=['bigquery_usage', 'estimate']) }}
|
|
2
|
+
-- Estimated query cost per dbt model per day, once per report time zone. Filter on time_zone.
|
|
3
|
+
select
|
|
4
|
+
tz.time_zone,
|
|
5
|
+
tz.time_zone_label,
|
|
6
|
+
date(hour, tz.time_zone) as day,
|
|
7
|
+
split(dbt_model_name, '.')[safe_offset(0)] as dbt_project,
|
|
8
|
+
dbt_model_name,
|
|
9
|
+
sum(total_query_cost) as query_cost,
|
|
10
|
+
sum(query_count) as run_count,
|
|
11
|
+
sum(total_bytes_billed) / pow(1024, 4) as tib_billed,
|
|
12
|
+
safe_divide(sum(avg_duration_seconds * query_count), sum(query_count)) as avg_duration_seconds
|
|
13
|
+
from {{ ref('models_costs_incremental') }}
|
|
14
|
+
cross join {{ fast2dev_bq_time_zones() }} as tz
|
|
15
|
+
where dbt_model_name is not null
|
|
16
|
+
group by 1, 2, 3, 4, 5
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
models:
|
|
3
|
+
- name: fast2dev_bq_model_costs_daily
|
|
4
|
+
description: Estimated query cost per dbt model per day, from job labels.
|
|
5
|
+
columns:
|
|
6
|
+
- name: time_zone
|
|
7
|
+
description: "Time zone the dates are in: America/Los_Angeles (Google billing time, as the Cloud billing console) or the report time zone. Each row exists once per time zone, so always filter on one."
|
|
8
|
+
data_tests: [not_null]
|
|
9
|
+
- name: time_zone_label
|
|
10
|
+
description: "Readable time zone name, e.g. Billing (Pacific)"
|
|
11
|
+
- name: day
|
|
12
|
+
description: Day in the row's time zone
|
|
13
|
+
- name: dbt_project
|
|
14
|
+
description: dbt project the model belongs to
|
|
15
|
+
- name: dbt_model_name
|
|
16
|
+
description: project.model name
|
|
17
|
+
- name: query_cost
|
|
18
|
+
description: Estimated query cost
|
|
19
|
+
- name: run_count
|
|
20
|
+
description: Number of runs
|
|
21
|
+
- name: tib_billed
|
|
22
|
+
description: TiB billed
|
|
23
|
+
- name: avg_duration_seconds
|
|
24
|
+
description: Average run time in seconds
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{{ config(materialized='table', tags=['bigquery_usage', 'estimate']) }}
|
|
2
|
+
-- Current storage size and monthly cost forecast per dataset, logical vs physical billing.
|
|
3
|
+
select
|
|
4
|
+
project_id,
|
|
5
|
+
dataset_id,
|
|
6
|
+
total_logical_tb * 1024 as logical_gib,
|
|
7
|
+
total_physical_tb * 1024 as physical_gib,
|
|
8
|
+
logical_cost_monthly_forecast,
|
|
9
|
+
physical_cost_monthly_forecast,
|
|
10
|
+
prefer_physical_pricing_model,
|
|
11
|
+
storage_pricing_model_difference as pricing_model_cost_difference
|
|
12
|
+
from {{ ref('dataset_with_cost') }}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
models:
|
|
3
|
+
- name: fast2dev_bq_storage_by_dataset
|
|
4
|
+
description: Current storage size and monthly cost forecast per dataset under logical and physical billing.
|
|
5
|
+
columns:
|
|
6
|
+
- name: project_id
|
|
7
|
+
description: Project
|
|
8
|
+
- name: dataset_id
|
|
9
|
+
description: Dataset
|
|
10
|
+
- name: logical_gib
|
|
11
|
+
description: Logical size in GiB
|
|
12
|
+
- name: physical_gib
|
|
13
|
+
description: Physical (compressed) size in GiB
|
|
14
|
+
- name: logical_cost_monthly_forecast
|
|
15
|
+
description: Monthly cost on logical billing
|
|
16
|
+
- name: physical_cost_monthly_forecast
|
|
17
|
+
description: Monthly cost on physical billing
|
|
18
|
+
- name: prefer_physical_pricing_model
|
|
19
|
+
description: True when physical billing would be cheaper
|
|
20
|
+
- name: pricing_model_cost_difference
|
|
21
|
+
description: Difference between the two monthly forecasts
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{{ config(materialized='table', tags=['bigquery_usage', 'estimate']) }}
|
|
2
|
+
-- Estimated query cost per user or service account per day, once per report time zone (job metadata, on-demand pricing).
|
|
3
|
+
select
|
|
4
|
+
tz.time_zone,
|
|
5
|
+
tz.time_zone_label,
|
|
6
|
+
date(hour, tz.time_zone) as day,
|
|
7
|
+
user_email,
|
|
8
|
+
sum(total_query_cost) as query_cost,
|
|
9
|
+
sum(query_count) as query_count,
|
|
10
|
+
sum(total_bytes_processed) / pow(1024, 4) as tib_processed,
|
|
11
|
+
sum(total_slot_ms) / 1000 / 3600 as slot_hours
|
|
12
|
+
from {{ ref('users_costs_incremental') }}
|
|
13
|
+
cross join {{ fast2dev_bq_time_zones() }} as tz
|
|
14
|
+
group by 1, 2, 3, 4
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
models:
|
|
3
|
+
- name: fast2dev_bq_user_costs_daily
|
|
4
|
+
description: Estimated query cost per user or service account per day, from job metadata at on-demand pricing (not the invoice).
|
|
5
|
+
columns:
|
|
6
|
+
- name: time_zone
|
|
7
|
+
description: "Time zone the dates are in: America/Los_Angeles (Google billing time, as the Cloud billing console) or the report time zone. Each row exists once per time zone, so always filter on one."
|
|
8
|
+
data_tests: [not_null]
|
|
9
|
+
- name: time_zone_label
|
|
10
|
+
description: "Readable time zone name, e.g. Billing (Pacific)"
|
|
11
|
+
- name: day
|
|
12
|
+
description: Day in the row's time zone
|
|
13
|
+
- name: user_email
|
|
14
|
+
description: User or service account
|
|
15
|
+
- name: query_cost
|
|
16
|
+
description: Estimated query cost
|
|
17
|
+
- name: query_count
|
|
18
|
+
description: Number of queries
|
|
19
|
+
- name: tib_processed
|
|
20
|
+
description: TiB processed
|
|
21
|
+
- name: slot_hours
|
|
22
|
+
description: Slot hours used
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{{ config(materialized='table', enabled=var('enable_gcp_billing_export'), tags=['bigquery_usage', 'billing']) }}
|
|
2
|
+
-- One row per time zone: the current week against the previous complete week and the weekly limit.
|
|
3
|
+
with weeks as (
|
|
4
|
+
select * from {{ ref('fast2dev_bq_weekly_spend') }}
|
|
5
|
+
),
|
|
6
|
+
|
|
7
|
+
cur as (
|
|
8
|
+
select * from weeks
|
|
9
|
+
where is_current_week
|
|
10
|
+
),
|
|
11
|
+
|
|
12
|
+
prev as (
|
|
13
|
+
select * from weeks
|
|
14
|
+
where is_complete_week
|
|
15
|
+
qualify row_number() over (partition by time_zone order by week_start desc) = 1
|
|
16
|
+
),
|
|
17
|
+
|
|
18
|
+
lim as (
|
|
19
|
+
select
|
|
20
|
+
time_zone,
|
|
21
|
+
any_value(time_zone_label) as time_zone_label,
|
|
22
|
+
any_value(currency) as currency,
|
|
23
|
+
any_value(weekly_limit) as weekly_limit,
|
|
24
|
+
countif(is_complete_week) as weeks_in_limit
|
|
25
|
+
from weeks
|
|
26
|
+
group by 1
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
select
|
|
30
|
+
lim.time_zone,
|
|
31
|
+
lim.time_zone_label,
|
|
32
|
+
lim.currency,
|
|
33
|
+
current_date(lim.time_zone) as as_of_date,
|
|
34
|
+
lim.weekly_limit,
|
|
35
|
+
lim.weeks_in_limit,
|
|
36
|
+
cur.week_start as current_week_start,
|
|
37
|
+
cur.days_with_data as current_week_days,
|
|
38
|
+
ifnull(cur.total_cost, 0) as current_week_cost,
|
|
39
|
+
ifnull(cur.full_week_pace, 0) as current_week_pace,
|
|
40
|
+
prev.week_start as prev_week_start,
|
|
41
|
+
prev.total_cost as prev_week_cost,
|
|
42
|
+
safe_divide(cur.full_week_pace, prev.total_cost) - 1 as pace_vs_prev_week_pct,
|
|
43
|
+
safe_divide(cur.full_week_pace, lim.weekly_limit) - 1 as pace_vs_limit_pct,
|
|
44
|
+
safe_divide(prev.total_cost, lim.weekly_limit) - 1 as prev_week_vs_limit_pct,
|
|
45
|
+
case
|
|
46
|
+
when cur.full_week_pace > lim.weekly_limit then 'alert'
|
|
47
|
+
when prev.total_cost > lim.weekly_limit then 'warning'
|
|
48
|
+
else 'ok'
|
|
49
|
+
end as alert_status
|
|
50
|
+
from lim
|
|
51
|
+
left join cur on cur.time_zone = lim.time_zone
|
|
52
|
+
left join prev on prev.time_zone = lim.time_zone
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
models:
|
|
3
|
+
- name: fast2dev_bq_weekly_kpi
|
|
4
|
+
description: One row per time zone with the current week, previous complete week, weekly limit and alert status.
|
|
5
|
+
columns:
|
|
6
|
+
- name: time_zone
|
|
7
|
+
description: "Time zone the dates are in: America/Los_Angeles (Google billing time, as the Cloud billing console) or the report time zone. Each row exists once per time zone, so always filter on one."
|
|
8
|
+
data_tests: [not_null]
|
|
9
|
+
- name: time_zone_label
|
|
10
|
+
description: "Readable time zone name, e.g. Billing (Pacific)"
|
|
11
|
+
- name: currency
|
|
12
|
+
description: Billing currency
|
|
13
|
+
- name: as_of_date
|
|
14
|
+
description: Today's date in the row's time zone
|
|
15
|
+
- name: weekly_limit
|
|
16
|
+
description: Median of all complete weeks
|
|
17
|
+
- name: weeks_in_limit
|
|
18
|
+
description: Complete weeks used for the median
|
|
19
|
+
- name: current_week_start
|
|
20
|
+
description: Monday of the current week
|
|
21
|
+
- name: current_week_days
|
|
22
|
+
description: Days of the current week with data
|
|
23
|
+
- name: current_week_cost
|
|
24
|
+
description: Net cost so far this week
|
|
25
|
+
- name: current_week_pace
|
|
26
|
+
description: Projected full-week cost at the current rate
|
|
27
|
+
- name: prev_week_start
|
|
28
|
+
description: Monday of the last complete week
|
|
29
|
+
- name: prev_week_cost
|
|
30
|
+
description: Net cost of the last complete week
|
|
31
|
+
- name: pace_vs_prev_week_pct
|
|
32
|
+
description: Current pace against the previous week, as a ratio
|
|
33
|
+
- name: pace_vs_limit_pct
|
|
34
|
+
description: Current pace against the limit, as a ratio
|
|
35
|
+
- name: prev_week_vs_limit_pct
|
|
36
|
+
description: Previous week against the limit, as a ratio
|
|
37
|
+
- name: alert_status
|
|
38
|
+
description: alert (current pace over limit), warning (last week over limit) or ok
|
|
39
|
+
data_tests:
|
|
40
|
+
- accepted_values:
|
|
41
|
+
arguments:
|
|
42
|
+
values: ['ok', 'warning', 'alert']
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{{ config(materialized='table', enabled=var('enable_gcp_billing_export'), tags=['bigquery_usage', 'billing']) }}
|
|
2
|
+
-- One row per time zone and Monday-to-Sunday week. The weekly limit is the median of all complete weeks.
|
|
3
|
+
-- Filter on time_zone; never sum across time zones.
|
|
4
|
+
with daily as (
|
|
5
|
+
select
|
|
6
|
+
time_zone,
|
|
7
|
+
time_zone_label,
|
|
8
|
+
date_trunc(day, isoweek) as week_start,
|
|
9
|
+
day,
|
|
10
|
+
currency,
|
|
11
|
+
sum(net_cost) as net_cost,
|
|
12
|
+
sum(if(cost_category = 'compute', net_cost, 0)) as compute_cost,
|
|
13
|
+
sum(if(cost_category = 'storage', net_cost, 0)) as storage_cost,
|
|
14
|
+
sum(if(cost_category = 'streaming', net_cost, 0)) as streaming_cost,
|
|
15
|
+
sum(if(cost_category = 'other', net_cost, 0)) as other_cost
|
|
16
|
+
from {{ ref('fast2dev_bq_daily_spend') }}
|
|
17
|
+
group by 1, 2, 3, 4, 5
|
|
18
|
+
),
|
|
19
|
+
|
|
20
|
+
weeks as (
|
|
21
|
+
select
|
|
22
|
+
time_zone,
|
|
23
|
+
time_zone_label,
|
|
24
|
+
week_start,
|
|
25
|
+
date_add(week_start, interval 6 day) as week_end,
|
|
26
|
+
any_value(currency) as currency,
|
|
27
|
+
count(distinct day) as days_with_data,
|
|
28
|
+
sum(net_cost) as total_cost,
|
|
29
|
+
sum(compute_cost) as compute_cost,
|
|
30
|
+
sum(storage_cost) as storage_cost,
|
|
31
|
+
sum(streaming_cost) as streaming_cost,
|
|
32
|
+
sum(other_cost) as other_cost
|
|
33
|
+
from daily
|
|
34
|
+
group by 1, 2, 3, 4
|
|
35
|
+
),
|
|
36
|
+
|
|
37
|
+
flagged as (
|
|
38
|
+
select
|
|
39
|
+
*,
|
|
40
|
+
days_with_data = 7 and week_end < current_date(time_zone) as is_complete_week,
|
|
41
|
+
week_start = date_trunc(current_date(time_zone), isoweek) as is_current_week
|
|
42
|
+
from weeks
|
|
43
|
+
),
|
|
44
|
+
|
|
45
|
+
with_limit as (
|
|
46
|
+
select
|
|
47
|
+
*,
|
|
48
|
+
percentile_cont(if(is_complete_week, total_cost, null), 0.5) over (partition by time_zone) as weekly_limit,
|
|
49
|
+
total_cost / days_with_data * 7 as full_week_pace,
|
|
50
|
+
lag(total_cost) over (partition by time_zone order by week_start) as prev_week_cost
|
|
51
|
+
from flagged
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
select
|
|
55
|
+
time_zone,
|
|
56
|
+
time_zone_label,
|
|
57
|
+
week_start,
|
|
58
|
+
week_end,
|
|
59
|
+
currency,
|
|
60
|
+
days_with_data,
|
|
61
|
+
is_complete_week,
|
|
62
|
+
is_current_week,
|
|
63
|
+
total_cost,
|
|
64
|
+
compute_cost,
|
|
65
|
+
storage_cost,
|
|
66
|
+
streaming_cost,
|
|
67
|
+
other_cost,
|
|
68
|
+
full_week_pace,
|
|
69
|
+
weekly_limit,
|
|
70
|
+
prev_week_cost,
|
|
71
|
+
safe_divide(if(is_complete_week, total_cost, full_week_pace), prev_week_cost) - 1 as change_vs_prev_week_pct,
|
|
72
|
+
safe_divide(if(is_complete_week, total_cost, full_week_pace), weekly_limit) - 1 as vs_limit_pct,
|
|
73
|
+
if(is_complete_week, total_cost, full_week_pace) > weekly_limit as is_over_limit
|
|
74
|
+
from with_limit
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
models:
|
|
3
|
+
- name: fast2dev_bq_weekly_spend
|
|
4
|
+
description: BigQuery spend per Monday-to-Sunday week, with the weekly limit (median of all complete weeks), week-on-week change and over-limit flag.
|
|
5
|
+
data_tests:
|
|
6
|
+
- dbt_utils.unique_combination_of_columns:
|
|
7
|
+
arguments:
|
|
8
|
+
combination_of_columns: ['time_zone', 'week_start']
|
|
9
|
+
columns:
|
|
10
|
+
- name: time_zone
|
|
11
|
+
description: "Time zone the dates are in: America/Los_Angeles (Google billing time, as the Cloud billing console) or the report time zone. Each row exists once per time zone, so always filter on one."
|
|
12
|
+
data_tests: [not_null]
|
|
13
|
+
- name: time_zone_label
|
|
14
|
+
description: "Readable time zone name, e.g. Billing (Pacific)"
|
|
15
|
+
- name: week_start
|
|
16
|
+
description: Monday of the week
|
|
17
|
+
data_tests: [not_null]
|
|
18
|
+
- name: week_end
|
|
19
|
+
description: Sunday of the week
|
|
20
|
+
- name: currency
|
|
21
|
+
description: Billing currency
|
|
22
|
+
- name: days_with_data
|
|
23
|
+
description: Days of the week with billing data
|
|
24
|
+
- name: is_complete_week
|
|
25
|
+
description: True when the week has all 7 days and has ended
|
|
26
|
+
- name: is_current_week
|
|
27
|
+
description: True for the week containing today
|
|
28
|
+
- name: total_cost
|
|
29
|
+
description: Net cost in the week so far
|
|
30
|
+
- name: compute_cost
|
|
31
|
+
description: Net query (analysis) cost
|
|
32
|
+
- name: storage_cost
|
|
33
|
+
description: Net storage cost
|
|
34
|
+
- name: streaming_cost
|
|
35
|
+
description: Net streaming insert / write API cost
|
|
36
|
+
- name: other_cost
|
|
37
|
+
description: Any other BigQuery SKUs
|
|
38
|
+
- name: full_week_pace
|
|
39
|
+
description: total_cost / days_with_data * 7. Equals total_cost for complete weeks.
|
|
40
|
+
- name: weekly_limit
|
|
41
|
+
description: Median total_cost of all complete weeks
|
|
42
|
+
- name: prev_week_cost
|
|
43
|
+
description: total_cost of the week before
|
|
44
|
+
- name: change_vs_prev_week_pct
|
|
45
|
+
description: Change against the previous week (pace for an incomplete week), as a ratio (0.1 = +10%)
|
|
46
|
+
- name: vs_limit_pct
|
|
47
|
+
description: Difference from the weekly limit (pace for an incomplete week), as a ratio
|
|
48
|
+
- name: is_over_limit
|
|
49
|
+
description: True when the week (or its pace) is above the weekly limit
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
sources:
|
|
3
|
+
- name: billing_export
|
|
4
|
+
database: "{{ var('billing_export_source_project') }}"
|
|
5
|
+
schema: "{{ var('billing_export_source_dataset') }}"
|
|
6
|
+
tables:
|
|
7
|
+
- name: gcp_billing_export
|
|
8
|
+
identifier: "{{ var('billing_export_source_table') }}"
|
|
9
|
+
description: GCP detailed (resource-level) billing export, all projects of the billing account.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{{ config(materialized='view', enabled=var('enable_gcp_billing_export'), tags=['bigquery_usage', 'billing']) }}
|
|
2
|
+
-- Billing export limited to the monitored projects (var billing_export_project_ids).
|
|
3
|
+
-- The package billing models read this view too (gcp_billing_export_* vars point here).
|
|
4
|
+
{%- set project_ids = var('billing_export_project_ids', []) %}
|
|
5
|
+
select *
|
|
6
|
+
from {{ source('billing_export', 'gcp_billing_export') }}
|
|
7
|
+
{%- if project_ids %}
|
|
8
|
+
where project.id in ({% for p in project_ids %}'{{ p }}'{% if not loop.last %}, {% endif %}{% endfor %})
|
|
9
|
+
{%- endif %}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
fast2dev_bigquery_usage:
|
|
2
|
+
target: prod
|
|
3
|
+
outputs:
|
|
4
|
+
prod:
|
|
5
|
+
type: bigquery
|
|
6
|
+
method: service-account
|
|
7
|
+
keyfile: "{{ env_var('FAST2DEV_GCP_KEYFILE') }}"
|
|
8
|
+
impersonate_service_account: "{{ env_var('FAST2DEV_DBT_SA_EMAIL') }}"
|
|
9
|
+
project: "{{ env_var('FAST2DEV_BQ_PROJECT') }}"
|
|
10
|
+
dataset: "{{ env_var('FAST2DEV_BQ_DATASET', 'fast2dev_monitoring') }}"
|
|
11
|
+
location: "{{ env_var('FAST2DEV_BQ_REGION') }}"
|
|
12
|
+
priority: batch
|
|
13
|
+
threads: "{{ env_var('FAST2DEV_DBT_THREADS', '8') | as_number }}"
|
|
14
|
+
job_execution_timeout_seconds: 3600
|
|
15
|
+
job_retries: 1
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
"""Run the BigQuery monitoring dbt project with settings taken from FAST2DEV_* environment variables."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import base64
|
|
5
|
+
import json
|
|
6
|
+
import re
|
|
7
|
+
import os
|
|
8
|
+
import subprocess
|
|
9
|
+
import sys
|
|
10
|
+
import tempfile
|
|
11
|
+
import time
|
|
12
|
+
import urllib.request
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
|
|
15
|
+
PROJECT_DIR = Path(__file__).resolve().parent.parent
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
_TRUE = {"1", "true", "yes", "on"}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def build_vars(env: dict[str, str] | None = None) -> dict[str, object]:
|
|
22
|
+
e = os.environ if env is None else env
|
|
23
|
+
get = lambda k, d="": (e.get(k) or d).strip() # noqa: E731
|
|
24
|
+
billing = get("FAST2DEV_BILLING_EXPORT_ENABLED", "false").lower() in _TRUE
|
|
25
|
+
project = get("FAST2DEV_BQ_PROJECT")
|
|
26
|
+
marts_dataset = f'{get("FAST2DEV_BQ_DATASET", "fast2dev_monitoring")}_bigquery_usage'
|
|
27
|
+
project_ids = [p.strip() for p in get("FAST2DEV_BILLING_EXPORT_PROJECT_IDS", project).split(",") if p.strip()]
|
|
28
|
+
audit = get("FAST2DEV_AUDIT_LOGS_ENABLED", "false").lower() in _TRUE
|
|
29
|
+
return {
|
|
30
|
+
"bq_region": get("FAST2DEV_BQ_REGION"),
|
|
31
|
+
"lookback_window_days": int(get("FAST2DEV_LOOKBACK_WINDOW_DAYS", "30")),
|
|
32
|
+
"use_flat_pricing": get("FAST2DEV_USE_FLAT_PRICING", "false").lower() in _TRUE,
|
|
33
|
+
"per_billed_tb_price": float(get("FAST2DEV_PER_BILLED_TB_PRICE", "6.25")),
|
|
34
|
+
"report_time_zone": get("FAST2DEV_REPORT_TIME_ZONE", "UTC"),
|
|
35
|
+
"report_time_zone_label": get("FAST2DEV_REPORT_TIME_ZONE_LABEL"),
|
|
36
|
+
"enable_gcp_billing_export": billing,
|
|
37
|
+
"billing_export_source_project": get("FAST2DEV_BILLING_EXPORT_PROJECT"),
|
|
38
|
+
"billing_export_source_dataset": get("FAST2DEV_BILLING_EXPORT_DATASET"),
|
|
39
|
+
"billing_export_source_table": get("FAST2DEV_BILLING_EXPORT_TABLE"),
|
|
40
|
+
"billing_export_project_ids": project_ids,
|
|
41
|
+
"gcp_billing_export_storage_project": project if billing else "",
|
|
42
|
+
"gcp_billing_export_dataset": marts_dataset if billing else "",
|
|
43
|
+
"gcp_billing_export_table": "fast2dev_bq_billing_export" if billing else "",
|
|
44
|
+
"enable_gcp_bigquery_audit_logs": audit,
|
|
45
|
+
"should_combine_audit_logs_and_information_schema": audit,
|
|
46
|
+
"gcp_bigquery_audit_logs_storage_project": get("FAST2DEV_AUDIT_LOGS_PROJECT"),
|
|
47
|
+
"gcp_bigquery_audit_logs_dataset": get("FAST2DEV_AUDIT_LOGS_DATASET"),
|
|
48
|
+
"gcp_bigquery_audit_logs_table": get("FAST2DEV_AUDIT_LOGS_TABLE", "cloudaudit_googleapis_com_data_access"),
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def _keyfile() -> str:
|
|
53
|
+
path = os.environ.get("FAST2DEV_GCP_KEYFILE")
|
|
54
|
+
if path:
|
|
55
|
+
return path
|
|
56
|
+
secret_file = Path(os.environ.get("FAST2DEV_GCP_SA_SECRET_FILE", "/fast2dev/secrets/bigquery/DBT_DEPLOY_GCP_SA_SECRET"))
|
|
57
|
+
raw = secret_file.read_bytes().strip()
|
|
58
|
+
try:
|
|
59
|
+
decoded = base64.b64decode(raw, validate=True)
|
|
60
|
+
json.loads(decoded)
|
|
61
|
+
except ValueError:
|
|
62
|
+
decoded = raw
|
|
63
|
+
fd, tmp = tempfile.mkstemp(prefix="dbt-sa-", suffix=".json")
|
|
64
|
+
with os.fdopen(fd, "wb") as fh:
|
|
65
|
+
fh.write(decoded)
|
|
66
|
+
os.chmod(tmp, 0o600)
|
|
67
|
+
return tmp
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def preflight(env: dict[str, str]) -> list[str]:
|
|
71
|
+
"""Check the impersonated account can read everything the run needs. Returns problems found."""
|
|
72
|
+
from google.auth import impersonated_credentials
|
|
73
|
+
from google.cloud import bigquery
|
|
74
|
+
from google.oauth2 import service_account
|
|
75
|
+
|
|
76
|
+
scopes = ["https://www.googleapis.com/auth/cloud-platform"]
|
|
77
|
+
sa = env["FAST2DEV_DBT_SA_EMAIL"]
|
|
78
|
+
project = env["FAST2DEV_BQ_PROJECT"]
|
|
79
|
+
region = env["FAST2DEV_BQ_REGION"]
|
|
80
|
+
source = service_account.Credentials.from_service_account_file(env["FAST2DEV_GCP_KEYFILE"], scopes=scopes)
|
|
81
|
+
creds = impersonated_credentials.Credentials(source_credentials=source, target_principal=sa, target_scopes=scopes)
|
|
82
|
+
client = bigquery.Client(project=project, credentials=creds, location=region)
|
|
83
|
+
v = build_vars(env)
|
|
84
|
+
problems: list[str] = []
|
|
85
|
+
|
|
86
|
+
def check(what: str, fn) -> None:
|
|
87
|
+
try:
|
|
88
|
+
fn()
|
|
89
|
+
except Exception as exc: # noqa: BLE001
|
|
90
|
+
problems.append(f"{sa} cannot read {what}: {str(exc).splitlines()[0][:300]}")
|
|
91
|
+
|
|
92
|
+
dry = bigquery.QueryJobConfig(dry_run=True, use_query_cache=False)
|
|
93
|
+
check(
|
|
94
|
+
f"jobs metadata in project {project} (needs BigQuery Resource Viewer)",
|
|
95
|
+
lambda: client.query(f"SELECT 1 FROM `region-{region}`.INFORMATION_SCHEMA.JOBS LIMIT 1", job_config=dry),
|
|
96
|
+
)
|
|
97
|
+
if v["enable_gcp_billing_export"]:
|
|
98
|
+
table = f'{v["billing_export_source_project"]}.{v["billing_export_source_dataset"]}.{v["billing_export_source_table"]}'
|
|
99
|
+
check(f"billing export {table} (needs BigQuery Data Viewer)", lambda: client.get_table(table))
|
|
100
|
+
if v["enable_gcp_bigquery_audit_logs"]:
|
|
101
|
+
ds = f'{v["gcp_bigquery_audit_logs_storage_project"]}.{v["gcp_bigquery_audit_logs_dataset"]}'
|
|
102
|
+
check(f"audit-log dataset {ds} (needs BigQuery Data Viewer)", lambda: client.get_dataset(ds))
|
|
103
|
+
return problems
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
def report(env: dict[str, str], status: str, problems: list[str], started: float) -> None:
|
|
107
|
+
url, token = env.get("FAST2DEV_WARM_URL"), env.get("FAST2DEV_WARM_TOKEN")
|
|
108
|
+
if not url or not token:
|
|
109
|
+
return
|
|
110
|
+
body = json.dumps({
|
|
111
|
+
"status": status,
|
|
112
|
+
"problems": problems,
|
|
113
|
+
"duration_seconds": round(time.time() - started, 1),
|
|
114
|
+
"billing_export_enabled": build_vars(env)["enable_gcp_billing_export"],
|
|
115
|
+
}).encode()
|
|
116
|
+
req = urllib.request.Request(
|
|
117
|
+
url, data=body, method="POST",
|
|
118
|
+
headers={"Content-Type": "application/json", "X-Warm-Token": token},
|
|
119
|
+
)
|
|
120
|
+
try:
|
|
121
|
+
with urllib.request.urlopen(req, timeout=300) as resp:
|
|
122
|
+
print(f"+ reported {status} to control plane ({resp.status})", flush=True)
|
|
123
|
+
except Exception as exc: # noqa: BLE001
|
|
124
|
+
print(f"! could not report to control plane: {exc}", flush=True)
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
def main(argv: list[str]) -> int:
|
|
128
|
+
started = time.time()
|
|
129
|
+
commands = argv or ["build"]
|
|
130
|
+
env = dict(os.environ)
|
|
131
|
+
env["FAST2DEV_GCP_KEYFILE"] = _keyfile()
|
|
132
|
+
env.setdefault("DBT_PROFILES_DIR", str(PROJECT_DIR))
|
|
133
|
+
if commands[0] in {"build", "run"} and os.environ.get("FAST2DEV_SKIP_PREFLIGHT", "").lower() not in _TRUE:
|
|
134
|
+
problems = preflight(env)
|
|
135
|
+
if problems:
|
|
136
|
+
for p in problems:
|
|
137
|
+
print(f"! {p}", flush=True)
|
|
138
|
+
report(env, "failed", problems, started)
|
|
139
|
+
return 2
|
|
140
|
+
rc = run_dbt(env, commands)
|
|
141
|
+
if commands[0] in {"build", "run"}:
|
|
142
|
+
report(env, "ok" if rc == 0 else "failed", [] if rc == 0 else [f"dbt {commands[0]} exited with {rc}"], started)
|
|
143
|
+
return rc
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
# dbt_bigquery_monitoring 0.27.0 groups repeated queries by fingerprint. Tables built by an
|
|
147
|
+
# older version keep the old grain until these models are fully refreshed once.
|
|
148
|
+
GRAIN_REFRESH_MODELS = (
|
|
149
|
+
"jobs_costs_incremental",
|
|
150
|
+
"most_repeated_jobs",
|
|
151
|
+
"materialization_candidates",
|
|
152
|
+
"compute_rollup_per_minute",
|
|
153
|
+
"compute_rollup_per_hour",
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
def _dbt(step: list[str], dbt_vars: str) -> list[str]:
|
|
158
|
+
cmd = ["dbt", *step, "--project-dir", str(PROJECT_DIR)]
|
|
159
|
+
if step[0] != "deps":
|
|
160
|
+
cmd += ["--vars", dbt_vars]
|
|
161
|
+
return cmd
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
def grain_state(env: dict[str, str], dbt_vars: str) -> str:
|
|
165
|
+
"""'absent', 'current' or 'old' for the package tables; 'unknown' when the check fails."""
|
|
166
|
+
result = subprocess.run(_dbt(["run-operation", "fast2dev_monitoring_grain"], dbt_vars),
|
|
167
|
+
env=env, cwd=PROJECT_DIR, capture_output=True, text=True)
|
|
168
|
+
match = re.search(r"FAST2DEV_GRAIN=(\w+)", result.stdout or "")
|
|
169
|
+
return match.group(1) if result.returncode == 0 and match else "unknown"
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
def run_dbt(env: dict[str, str], commands: list[str]) -> int:
|
|
173
|
+
dbt_vars = json.dumps(build_vars(env))
|
|
174
|
+
building = commands[0] in {"build", "run"}
|
|
175
|
+
if not (PROJECT_DIR / "dbt_packages" / "dbt_bigquery_monitoring").is_dir():
|
|
176
|
+
print("+ dbt deps", flush=True)
|
|
177
|
+
rc = subprocess.call(_dbt(["deps"], dbt_vars), env=env, cwd=PROJECT_DIR)
|
|
178
|
+
if rc != 0:
|
|
179
|
+
return rc
|
|
180
|
+
steps: list[list[str]] = []
|
|
181
|
+
if build_vars(env)["enable_gcp_billing_export"] and building:
|
|
182
|
+
steps.append(["run", "--select", "fast2dev_bq_billing_export"])
|
|
183
|
+
if building:
|
|
184
|
+
state = grain_state(env, dbt_vars)
|
|
185
|
+
print(f"+ monitoring tables: {state}", flush=True)
|
|
186
|
+
if state == "old":
|
|
187
|
+
steps.append(["run", "--select", *GRAIN_REFRESH_MODELS, "--full-refresh"])
|
|
188
|
+
elif state == "unknown":
|
|
189
|
+
print("! could not read the monitoring table labels; building without a full refresh", flush=True)
|
|
190
|
+
steps.append(commands)
|
|
191
|
+
for step in steps:
|
|
192
|
+
cmd = _dbt(step, dbt_vars)
|
|
193
|
+
print("+", " ".join(cmd[:2] + (["--full-refresh"] if "--full-refresh" in step else [])), flush=True)
|
|
194
|
+
rc = subprocess.call(cmd, env=env, cwd=PROJECT_DIR)
|
|
195
|
+
if rc != 0:
|
|
196
|
+
return rc
|
|
197
|
+
return 0
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
if __name__ == "__main__":
|
|
201
|
+
sys.exit(main(sys.argv[1:]))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "service_account",
|
|
3
|
+
"project_id": "PROJECT_ID",
|
|
4
|
+
"private_key_id": "KEY_ID",
|
|
5
|
+
"private_key": "-----BEGIN PRIVATE KEY-----\nPRIVATE_KEY\n-----END PRIVATE KEY-----\n",
|
|
6
|
+
"client_email": "SERVICE_ACCOUNT_EMAIL",
|
|
7
|
+
"client_id": "CLIENT_ID",
|
|
8
|
+
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
|
|
9
|
+
"token_uri": "https://accounts.google.com/o/oauth2/token",
|
|
10
|
+
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
|
|
11
|
+
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/SERVICE_ACCOUNT_EMAIL"
|
|
12
|
+
}
|