Skip to content

Commit

Permalink
[u p] Explicitly configure source type in environment files (partial #…
Browse files Browse the repository at this point in the history
  • Loading branch information
nadove-ucsc committed Aug 30, 2024
1 parent 098f814 commit 5948841
Show file tree
Hide file tree
Showing 9 changed files with 3,463 additions and 2,469 deletions.
9 changes: 9 additions & 0 deletions UPGRADING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ reverted. This is all fairly informal and loosely defined. Hopefully we won't
have too many entries in this file.


#6355 Explicitly configure source type in environment files
===========================================================

The ``mksrc`` function has been updated to include a parameter specifying the
type of each source (either "parquet" or "bigquery"). For each of your personal
deployments, specify "bigquery" for all sources. As always, use the sandbox
deployment's ``environment.py`` as a model when upgrading personal deployments.


#6446 Base image of Azul image is not pinned to digest
======================================================

Expand Down
12 changes: 7 additions & 5 deletions deployments/anvilbox/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
)
import json
from typing import (
Literal,
Optional,
)

Expand All @@ -27,7 +28,8 @@ def common_prefix(n: int) -> str:
pop = 2 # remove snapshot


def mksrc(google_project,
def mksrc(source_type: Literal['bigquery', 'parquet'],
google_project,
snapshot,
subgraphs,
flags: int = 0,
Expand All @@ -40,7 +42,7 @@ def mksrc(google_project,
prefix = common_prefix(subgraphs)
source = None if flags & pop else ':'.join([
'tdr',
'bigquery',
source_type,
'gcp',
google_project,
snapshot,
Expand Down Expand Up @@ -71,9 +73,9 @@ def mkdict(previous_catalog: dict[str, str],


anvil_sources = mkdict({}, 3, mkdelta([
mksrc('datarepo-dev-e53e74aa', 'ANVIL_1000G_2019_Dev_20230609_ANV5_202306121732', 6804),
mksrc('datarepo-dev-42c70e6a', 'ANVIL_CCDG_Sample_1_20230228_ANV5_202302281520', 28),
mksrc('datarepo-dev-97ad270b', 'ANVIL_CMG_Sample_1_20230225_ANV5_202302281509', 25)
mksrc('bigquery', 'datarepo-dev-e53e74aa', 'ANVIL_1000G_2019_Dev_20230609_ANV5_202306121732', 6804),
mksrc('bigquery', 'datarepo-dev-42c70e6a', 'ANVIL_CCDG_Sample_1_20230228_ANV5_202302281520', 28),
mksrc('bigquery', 'datarepo-dev-97ad270b', 'ANVIL_CMG_Sample_1_20230225_ANV5_202302281509', 25)
]))


Expand Down
12 changes: 7 additions & 5 deletions deployments/anvildev/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
)
import json
from typing import (
Literal,
Optional,
)

Expand All @@ -22,7 +23,8 @@ def partition_prefix_length(n: int) -> int:
pop = 2 # remove snapshot


def mksrc(google_project,
def mksrc(source_type: Literal['bigquery', 'parquet'],
google_project,
snapshot,
subgraphs,
flags: int = 0
Expand All @@ -31,7 +33,7 @@ def mksrc(google_project,
assert flags <= ma | pop
source = None if flags & pop else ':'.join([
'tdr',
'bigquery',
source_type,
'gcp',
google_project,
snapshot,
Expand Down Expand Up @@ -62,9 +64,9 @@ def mkdict(previous_catalog: dict[str, str],


anvil_sources = mkdict({}, 3, mkdelta([
mksrc('datarepo-dev-e53e74aa', 'ANVIL_1000G_2019_Dev_20230609_ANV5_202306121732', 6804),
mksrc('datarepo-dev-42c70e6a', 'ANVIL_CCDG_Sample_1_20230228_ANV5_202302281520', 28),
mksrc('datarepo-dev-97ad270b', 'ANVIL_CMG_Sample_1_20230225_ANV5_202302281509', 25)
mksrc('bigquery', 'datarepo-dev-e53e74aa', 'ANVIL_1000G_2019_Dev_20230609_ANV5_202306121732', 6804),
mksrc('bigquery', 'datarepo-dev-42c70e6a', 'ANVIL_CCDG_Sample_1_20230228_ANV5_202302281520', 28),
mksrc('bigquery', 'datarepo-dev-97ad270b', 'ANVIL_CMG_Sample_1_20230225_ANV5_202302281509', 25)
]))


Expand Down
1,242 changes: 624 additions & 618 deletions deployments/anvilprod/environment.py

Large diffs are not rendered by default.

242 changes: 123 additions & 119 deletions deployments/dev/environment.py

Large diffs are not rendered by default.

1,242 changes: 624 additions & 618 deletions deployments/hammerbox/environment.py

Large diffs are not rendered by default.

2,917 changes: 1,937 additions & 980 deletions deployments/prod/environment.py

Large diffs are not rendered by default.

244 changes: 125 additions & 119 deletions deployments/sandbox/environment.py

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions deployments/tempdev/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
)
import json
from typing import (
Literal,
Optional,
)

Expand All @@ -22,7 +23,8 @@ def partition_prefix_length(n: int) -> int:
pop = 2 # remove snapshot


def mksrc(google_project,
def mksrc(source_type: Literal['bigquery', 'parquet'],
google_project,
snapshot,
subgraphs,
flags: int = 0
Expand All @@ -31,7 +33,7 @@ def mksrc(google_project,
assert flags <= ma | pop
source = None if flags & pop else ':'.join([
'tdr',
'bigquery',
source_type,
'gcp',
google_project,
snapshot,
Expand Down Expand Up @@ -62,9 +64,9 @@ def mkdict(previous_catalog: dict[str, str],


anvil_sources = mkdict({}, 3, mkdelta([
mksrc('datarepo-dev-e53e74aa', 'ANVIL_1000G_2019_Dev_20230609_ANV5_202306121732', 6804),
mksrc('datarepo-dev-42c70e6a', 'ANVIL_CCDG_Sample_1_20230228_ANV5_202302281520', 28),
mksrc('datarepo-dev-97ad270b', 'ANVIL_CMG_Sample_1_20230225_ANV5_202302281509', 25)
mksrc('bigquery', 'datarepo-dev-e53e74aa', 'ANVIL_1000G_2019_Dev_20230609_ANV5_202306121732', 6804),
mksrc('bigquery', 'datarepo-dev-42c70e6a', 'ANVIL_CCDG_Sample_1_20230228_ANV5_202302281520', 28),
mksrc('bigquery', 'datarepo-dev-97ad270b', 'ANVIL_CMG_Sample_1_20230225_ANV5_202302281509', 25)
]))


Expand Down

0 comments on commit 5948841

Please sign in to comment.