Skip to content

Commit

Permalink
refactor: rename dataform_output -> dbt_output for reports (#1323)
Browse files Browse the repository at this point in the history
  • Loading branch information
bodymindarts authored Jan 27, 2025
1 parent 5f33b40 commit f2d1b6e
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 45 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/bats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ jobs:
uses: "google-github-actions/auth@v2"
with:
credentials_json: "${{ secrets.GOOGLE_CREDENTIALS }}"
- name: Sync dataform-branch
run: nix develop -c make push-dataform-branch
env:
DATAFORM_BRANCH: "gha-dataform"
- name: Run e2e tests
run: nix develop -c make e2e
env:
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ jobs:
- name: build backend
run: nix develop -c make build-for-tests

- name: sync dataform-branch
run: nix develop -c make push-dataform-branch
env:
DATAFORM_BRANCH: "gha-dataform"

- name: keep tilt running
run: nix develop -c make tilt-in-ci
env:
Expand Down
16 changes: 0 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -111,19 +111,3 @@ tilt-in-ci:

test-cypress-in-ci-through-browserstack:
cd apps/admin-panel && pnpm cypress:run browserstack

push-dataform-branch:
git push -f origin HEAD:${DATAFORM_BRANCH}

dataform-install:
yarn install
node_modules/.bin/dataform install

dataform-run:
node_modules/.bin/dataform run --timeout 5m --schema-suffix=${DATAFORM_SCHEMA_SUFFIX} --vars=${DATAFORM_VARS}

dataform-run-dev:
node_modules/.bin/dataform run --timeout 5m --schema-suffix=${DATAFORM_SCHEMA_SUFFIX} --vars=${DATAFORM_VARS} --tags=current-dev

dataform-run-staging:
node_modules/.bin/dataform run --timeout 5m --schema-suffix=${DATAFORM_SCHEMA_SUFFIX} --vars="executionEnv=galoy-staging,devUser=${TF_VAR_name_prefix}"
4 changes: 1 addition & 3 deletions bats/lana-sim-time.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ app:
bucket_name: "gha-lana-documents"
root_folder: "gha"
report:
dataform_repo: "gha-repo"
dataform_output_dataset: "dataform_gha"
dataform_release_config: "gha-release"
dbt_output_dataset: "dbt_gha"
dev_disable_auto_create: true
time:
realtime: false
Expand Down
4 changes: 1 addition & 3 deletions bats/lana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ app:
bucket_name: "gha-lana-documents"
root_folder: "gha"
report:
dataform_repo: "gha-repo"
dataform_output_dataset: "dataform_gha"
dataform_release_config: "gha-release"
dbt_output_dataset: "dbt_gha"
10 changes: 2 additions & 8 deletions lana/app/src/report/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ use crate::service_account::ServiceAccountConfig;
#[derive(Clone, Debug, Deserialize, Serialize, Default)]
pub struct ReportConfig {
#[serde(default)]
pub dataform_repo: String,
#[serde(default)]
pub dataform_output_dataset: String,
#[serde(default)]
pub dataform_release_config: String,
pub dbt_output_dataset: String,
#[serde(default)]
pub dev_disable_auto_create: bool,

Expand All @@ -24,9 +20,7 @@ impl ReportConfig {
dev_disable_auto_create: bool,
) -> ReportConfig {
Self {
dataform_repo: format!("{}-repo", name_prefix),
dataform_output_dataset: format!("dbt_{}", name_prefix),
dataform_release_config: format!("{}-release", name_prefix),
dbt_output_dataset: format!("dbt_{}", name_prefix),
dev_disable_auto_create,
service_account: Some(service_account),
}
Expand Down
4 changes: 0 additions & 4 deletions lana/app/src/report/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ pub enum ReportError {
CursorDestructureError(#[from] es_entity::CursorDestructureError),
#[error("ReportError - SerdeJson: {0}")]
Deserialization(#[from] serde_json::Error),
#[error("ReportError - DataformCompilation: {0}")]
DataformCompilation(String),
#[error("ReportError - DataformInvocation: {0}")]
DataformInvocation(String),
#[error("ReportError - Reqwest: {0}")]
Reqwest(#[from] reqwest::Error),
#[error("ReportError - GCPAuth: {0}")]
Expand Down
4 changes: 2 additions & 2 deletions lana/app/src/report/upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ pub(super) mod bq {
.table()
.list(
&config.service_account().gcp_project,
&config.dataform_output_dataset,
&config.dbt_output_dataset,
ListOptions::default(),
)
.await?;
Expand Down Expand Up @@ -135,7 +135,7 @@ pub(super) mod bq {
let gcp_project = &config.service_account().gcp_project;
let query = format!(
"SELECT * FROM `{}.{}.{}`",
gcp_project, config.dataform_output_dataset, report
gcp_project, config.dbt_output_dataset, report
);
let res = client
.job()
Expand Down

0 comments on commit f2d1b6e

Please sign in to comment.