Skip to content

Commit

Permalink
Backport: a9d2087 (#6658, #6664, PR #6659), cb2393a+8334ae06 (#6648, PR
Browse files Browse the repository at this point in the history
#6654, PR #6650) and e3a710f (#6644, PR #6651, PR #6655)
  • Loading branch information
achave11-ucsc committed Nov 4, 2024
2 parents 24aaa42 + 340dede commit 1cc7535
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
7 changes: 2 additions & 5 deletions deployments/prod/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -1136,8 +1136,7 @@ def mkdict(previous_catalog: dict[str, str],
mksrc('bigquery', 'datarepo-1dbd3c50', 'hca_prod_ae9f439bbd474d6ebd7232dc70b35d97__20241004_dcp2_20241004_dcp43', ma), # noqa E501
mksrc('bigquery', 'datarepo-21d1f89b', 'hca_prod_b39381584e8d4fdb9e139e94270dde16__20241004_dcp2_20241004_dcp43'),
mksrc('bigquery', 'datarepo-550c8f98', 'hca_prod_c3dd819dabab4957b20988f1e0900368__20241004_dcp2_20241004_dcp43'),
mksrc('bigquery', 'datarepo-06a00830', 'hca_prod_c5ca43aa3b2b42168eb3f57adcbc99a1__20220118_dcp2_20241004_dcp43'),
mksrc('bigquery', 'datarepo-55151ed4', 'hca_prod_cdabcf0b76024abf9afb3b410e545703__20230201_dcp2_20241008_dcp43')
mksrc('bigquery', 'datarepo-06a00830', 'hca_prod_c5ca43aa3b2b42168eb3f57adcbc99a1__20220118_dcp2_20241004_dcp43')
# @formatter:on
]))

Expand Down Expand Up @@ -1182,7 +1181,6 @@ def mkdict(previous_catalog: dict[str, str],
mksrc('bigquery', 'datarepo-c9158593', 'lungmap_prod_20037472ea1d4ddb9cd356a11a6f0f76__20220307_20241002_lm8'),
mksrc('bigquery', 'datarepo-35a6d7ca', 'lungmap_prod_3a02d15f9c6a4ef7852b4ddec733b70b__20241001_20241002_lm8'),
mksrc('bigquery', 'datarepo-131a1234', 'lungmap_prod_4ae8c5c91520437198276935661f6c84__20231004_20241002_lm8'),
mksrc('bigquery', 'datarepo-3377446f', 'lungmap_prod_6135382f487d4adb9cf84d6634125b68__20230207_20241002_lm8'),
mksrc('bigquery', 'datarepo-3c4905d2', 'lungmap_prod_834e0d1671b64425a8ab022b5000961c__20241001_20241002_lm8'),
mksrc('bigquery', 'datarepo-d7447983', 'lungmap_prod_f899709cae2c4bb988f0131142e6c7ec__20220310_20241002_lm8'),
mksrc('bigquery', 'datarepo-c11ef363', 'lungmap_prod_fdadee7e209745d5bf81cc280bd8348e__20240206_20241002_lm8'),
Expand Down Expand Up @@ -1227,7 +1225,6 @@ def env() -> Mapping[str, Optional[str]]:
repository=dict(name='tdr_hca')),
sources=mklist(sources))
for atlas, catalog, sources in [
('hca', 'dcp42', dcp42_sources),
('hca', 'dcp43', dcp43_sources),
('lungmap', 'lm7', lm7_sources),
('lungmap', 'lm8', lm8_sources)
Expand Down Expand Up @@ -1270,5 +1267,5 @@ def env() -> Mapping[str, Optional[str]]:
'channel_id': 'C04JWDFCPFZ' # #team-boardwalk-prod
}),

'AZUL_ENABLE_REPLICAS': '1',
'AZUL_ENABLE_REPLICAS': '0',
}
25 changes: 15 additions & 10 deletions scripts/generate_openapi_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,21 @@ def main():
new_callable=PropertyMock,
return_value=False):
assert not config.enable_log_forwarding
lambda_endpoint = furl('http://localhost')
with patch.object(target=AzulChaliceApp,
attribute='base_url',
new=lambda_endpoint):
app_module = load_app_module(lambda_name)
assert app_module.app.base_url == lambda_endpoint
app_spec = app_module.app.spec()
doc_path = Path(config.project_root) / 'lambdas' / lambda_name / 'openapi.json'
with write_file_atomically(doc_path) as file:
json.dump(app_spec, file, indent=4)
with patch.object(target=type(config),
attribute='enable_replicas',
new_callable=PropertyMock,
return_value=True):
assert config.enable_replicas
lambda_endpoint = furl('http://localhost')
with patch.object(target=AzulChaliceApp,
attribute='base_url',
new=lambda_endpoint):
app_module = load_app_module(lambda_name)
assert app_module.app.base_url == lambda_endpoint
app_spec = app_module.app.spec()
doc_path = Path(config.project_root) / 'lambdas' / lambda_name / 'openapi.json'
with write_file_atomically(doc_path) as file:
json.dump(app_spec, file, indent=4)


if __name__ == '__main__':
Expand Down

0 comments on commit 1cc7535

Please sign in to comment.