Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge upstream HEAD(bea04d9, 2024-05-21) [release] 0.2.130 (#14454) #335

Merged
merged 199 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from 198 commits
Commits
Show all changes
199 commits
Select commit Hold shift + click to select a range
cf293b9
[batch] adds requester pays config to `hailtop.fs.open` (#13795)
iris-garden Jan 3, 2024
caea515
[hailctl] fix hailctl for YHJ (#14118)
danking Jan 3, 2024
dfc87fc
[grafana] encode azure monitor in grafana yaml (#14106)
danking Jan 3, 2024
ff8c7e2
[query] fix and enforce that workers transmit stack traces (#14122)
danking Jan 3, 2024
da27902
[lint] reintroduces black for hail directory (#14119)
iris-garden Jan 4, 2024
fe5ed32
[compiler] Code-Generated TableIntervalJoin(..., product = true) (#13…
ehigham Jan 4, 2024
7d51533
[doctest] reduce doctest setup time (#14111)
danking Jan 4, 2024
67c4f8e
[precommit] ignore hail/python/(hail|test) from pyright (#14124)
danking Jan 4, 2024
42bf451
[lint] ignores blackening commit (#14120)
iris-garden Jan 5, 2024
1718f07
[hailtop] Add subpath to deploy config (#14056)
daniel-goldstein Jan 8, 2024
5606d94
[compiler] Add `scalafix` and `scalafmt` configs (#14126)
ehigham Jan 8, 2024
422edf6
[compiler] apply scalafmt to all scala sources (#14129)
ehigham Jan 8, 2024
d1823fa
[hailtop.batch] eliminate unittest; use single, session-wide event lo…
danking Jan 9, 2024
965f102
[qob] Fix IBD and enable tests (#14062)
jigold Jan 9, 2024
15c2ba5
[batch][query] silence warnings in plotly (#13974)
danking Jan 9, 2024
b543093
[hailctl] make the output of dry-run copy-pasteable (#14127)
danking Jan 9, 2024
c45a81c
[doctest] actually test the docs (#14112)
danking Jan 9, 2024
0cdf992
[hailctl] update to dataproc 2.1.33 (#14093)
danking Jan 9, 2024
3ddbf5f
[query] Avoid Class A Operations. (#13885)
danking Jan 9, 2024
cb87096
[hailctl] Fix uploading files from parent directories of cwd (#13812)
jigold Jan 9, 2024
1a5f485
[batch] Remove worker shim classes for cloud credentials (#14125)
daniel-goldstein Jan 10, 2024
24525ad
[query] better error message when info array field has missing elemen…
danking Jan 11, 2024
fa2ef0f
[lint] replaces black formatting with ruff (#14132)
iris-garden Jan 11, 2024
4040c9c
[dependencies] update jinja2 everywhere (#14137)
danking Jan 12, 2024
d601d8c
[repo] exclude 422edf638 from blame (#14142)
ehigham Jan 12, 2024
bb535cd
[release] 0.2.127 (#14086)
danking Jan 12, 2024
7ee4141
[qob] Fix VEP for GRCh38 (#14071)
jigold Jan 12, 2024
f49789f
[aiotools] add basename to FileStatus; rename name in FileListEntry (…
danking Jan 12, 2024
72669f7
[batch] provide sufficient information to debug transient errors (#14…
danking Jan 12, 2024
3b33ee9
[compiler] enforce scala formatting in ci (#14143)
ehigham Jan 12, 2024
8a0e8e3
[query] add many more examples to the Table docs (#14113)
danking Jan 16, 2024
ce58fa9
[lint] ignores black->ruff formatting commit (#14133)
iris-garden Jan 16, 2024
e59ae89
[ruff] use --diff instead of --check (#14157)
danking Jan 16, 2024
e7b8442
[copier] raise on BaseException & better debug info (#14162)
danking Jan 16, 2024
d2a8760
[httpx][Makefile][copier] add --timeout to copier; use in Makefile (#…
danking Jan 16, 2024
485d606
[ci] Use appkeys instead of strings for application storage. (#14155)
daniel-goldstein Jan 17, 2024
bfb5ec1
[ci] types and fixes (#14165)
danking Jan 17, 2024
cff9dc5
[ci] Push cleanup methods in on_startup to ensure proper execution or…
daniel-goldstein Jan 18, 2024
90605e8
[services] Fix domain configuration in dev namespaces (#14164)
daniel-goldstein Jan 18, 2024
1ffc3de
[ruff] update to ruff 0.1.13 (#14153)
danking Jan 18, 2024
b10274c
[hailctl] Dev config set should only change one property (#14169)
daniel-goldstein Jan 19, 2024
68a51df
[compiler] apply scalafix to all scala sources (#14156)
patrick-schultz Jan 19, 2024
72eb8e6
[tests] yank hailctl batch submit tests (#14175)
jigold Jan 19, 2024
9595b48
[monitoring] Use aiohttp.AppKey to add static typing to Application s…
daniel-goldstein Jan 19, 2024
ad3ccdf
Correct the dates of recent releases (#14161)
jmarshall Jan 19, 2024
2bfa530
[hailtop] remove dead code in test (#14181)
danking Jan 22, 2024
ae7b87f
[hailtop.utils] Add address not available as a retryable error (#14185)
jigold Jan 22, 2024
2858259
[batch] Add json parsing and severity to GCP Ops Agent config (#14187)
daniel-goldstein Jan 22, 2024
8ae336f
[compiler] Emit `Let` Bindings Iteratively (#14163)
ehigham Jan 22, 2024
42a072e
[prometheus] 90 day retention (#14194)
danking Jan 23, 2024
0411c89
[gear] Make csrf cookie samesite=strict (#14180)
daniel-goldstein Jan 24, 2024
b7bde56
[batch] Stop writing to v2 billing tables (#13892)
jigold Jan 24, 2024
728f43b
[query] fix remaining scala warnings (#14188)
patrick-schultz Jan 26, 2024
5fde6f2
[spark_backend] avoid infinite recursion when initialization fails (#…
danking Jan 26, 2024
feed09d
[rotate_keys.py] make deletion non-interactive as well (#14208)
danking Jan 29, 2024
4324736
[hailtop] allow configuration of default HTTP timeout (#14206)
danking Jan 29, 2024
f56f579
[vds/combiner] Better calculation of ref_block_max_length (#14178)
chrisvittal Jan 29, 2024
497f8a9
Bump jupyterlab from 4.0.9 to 4.0.12 in /hail/python/dev (#14218)
dependabot[bot] Jan 31, 2024
ef5c352
[vds/combiner] Add sanity check on uniqueness of gvcf paths/sample na…
chrisvittal Jan 31, 2024
5340378
[batch] Add metadata server to batch jobs in GCP (#14019)
daniel-goldstein Feb 1, 2024
f47efb4
[qob] Update scala deploy config to use new base_path field (#14195)
daniel-goldstein Feb 1, 2024
171b39d
[batch] Update IP Fee pricing for February 2024 price increase (#14190)
jigold Feb 1, 2024
7f12473
[query] avoid code explosion for trivial upcasts (#14232)
danking Feb 1, 2024
dace919
[hailtop.batch] add default_regions to hb.Batch, improve docs (#14224)
danking Feb 2, 2024
3cb79ec
[batch] silence instance logs (#14243)
danking Feb 2, 2024
d261554
[dependencies] mass update (#14233)
danking Feb 2, 2024
d4679eb
[query] Use valid globals reference in MWZJ and TABK (#14246)
danking Feb 2, 2024
0b92923
[query] support importing empty JSON objects (#14202)
danking Feb 3, 2024
7a418eb
Fix an error in the MatrixTable tutorial (#14239)
Will-Tyler Feb 3, 2024
671deef
[fs] support hfs.ls on a bucket (#14176)
danking Feb 6, 2024
f1542f3
[batch] Do not log user errors as exceptions (#14253)
daniel-goldstein Feb 6, 2024
14c9457
[gear] Change deadlock logs from warning to info (#14251)
daniel-goldstein Feb 6, 2024
977eb75
[release] set gcp artifact cleanup policies on deploy (#14198)
ehigham Feb 6, 2024
7885cfb
[query] move build system from Gradle to Mill (#14147)
patrick-schultz Feb 6, 2024
70ae91b
Update Table method examples (#14242)
Will-Tyler Feb 7, 2024
7f5fe68
[batch] Drop redunant port mapping on worker container run (#14252)
daniel-goldstein Feb 8, 2024
ac0ec53
[infra] Make CI an admin of the artifact registry (#14266)
daniel-goldstein Feb 8, 2024
59fdaac
[compiler] replace Begin with Let (#14068)
patrick-schultz Feb 8, 2024
3af980e
[release] remove unused old stuff (#14273)
danking Feb 9, 2024
e0299d7
update test-gcp.sh to be closer to modern use (#14272)
danking Feb 9, 2024
71cd318
[benchmark] build hail in release mode (#14197)
ehigham Feb 9, 2024
faae93c
[query] Fix NullPointerException in Avro import (#14258)
chrisvittal Feb 9, 2024
a515ccd
[compiler] Add `If` and `MakeStruct` Simplifications (#14231)
ehigham Feb 10, 2024
ef6212c
[fs] Refresh blob client on every range read (#14278)
daniel-goldstein Feb 12, 2024
bbb800f
[algolia] update to current "application" (#14283)
danking Feb 12, 2024
a0f824c
[algolia] also update the search bar on the docs page (#14284)
danking Feb 12, 2024
e33b50c
[tutorials] fix broken link to joins tutorial (#14285)
danking Feb 12, 2024
6eacd66
[annotationdb][datasets] regional buckets (#14286)
danking Feb 13, 2024
2ff8fd3
[query] Add `isIsomorphicTo` for virtual types (#14265)
ehigham Feb 13, 2024
940c083
[auth|monitoring] Push exit stack callbacks on initialization (#14279)
daniel-goldstein Feb 14, 2024
2b5edbc
[infra] Use https instead of hail-az in service configs (#14290)
daniel-goldstein Feb 14, 2024
61a5d48
[fs] Drop support for the deprecated hail-az scheme (#14293)
daniel-goldstein Feb 14, 2024
85c7dd7
[test-dataproc] use regional buckets instead of soon-to-be-deleted mu…
danking Feb 14, 2024
b3df763
[release] 0.2.128 (#14287)
danking Feb 14, 2024
e68103e
[batch] Remove all v2 billing tables (#13893)
jigold Feb 15, 2024
391abe4
[query] remove unneeded deps from memory module (#14298)
patrick-schultz Feb 15, 2024
1bc5099
[query] avoid orjson-caused segfault in py4j_backend.py (#14300)
danking Feb 15, 2024
ea1d72d
[ci] Use the public networks where possible (#14294)
daniel-goldstein Feb 15, 2024
5475705
[infra] Apply same CI admin role as gcp-broad in normal gcp terraform…
daniel-goldstein Feb 15, 2024
3fcbb27
[release] Release 0.2.128 (#14304)
daniel-goldstein Feb 15, 2024
dc7fce0
[ci] Use CI's credentials for image pushing instead of gcr-push (#14301)
daniel-goldstein Feb 16, 2024
eead810
[ci] Remove unused arguments to release script (#14307)
daniel-goldstein Feb 16, 2024
d1f07e6
[gear] Retry transient errors on database pool creation (#14309)
daniel-goldstein Feb 16, 2024
16d9bdf
[batch] fix handle_arg and fix unused TypeVar (#14310)
danking Feb 16, 2024
17247d8
[hailtop] eliminate pyright warning (#14317)
danking Feb 17, 2024
cd9bed9
[batch] Remove GOOGLE_APPLICATION_CREDENTIALS from the batch docs (#1…
daniel-goldstein Feb 20, 2024
a039764
[ci] Remove unnecessary GSA activation for GAR policy step (#14308)
daniel-goldstein Feb 21, 2024
c7e20a2
[batch][website][docs] eliminate fontawesome (#14302)
danking Feb 21, 2024
b48da75
[release] correct argument ordering (#14323)
danking Feb 21, 2024
3966066
[ci] Remove unused ci-utils requirements file (#14331)
daniel-goldstein Feb 21, 2024
86db498
[query] Support `!=` contig comparisons in filter intervals (#14335)
ehigham Feb 22, 2024
c4cba0d
[batch] Use select instead of execute for retryable billing project q…
daniel-goldstein Feb 22, 2024
e002b4b
[references] add references since 2021 (#14339)
danking Feb 22, 2024
ce0d0a5
[batch] extract service backend test fixtures to separate file (#14313)
danking Feb 22, 2024
4dea227
[uvloopx] consolidate uvloop initialization code to one place (#14341)
danking Feb 22, 2024
bb3de9b
[lint] add trailing newlines (#14342)
danking Feb 23, 2024
3135946
[hailtop] ensure delete also deletes single files (#14345)
danking Feb 23, 2024
103d45e
[rich_progress_bar] show two sigfigs when rate <1 (#14348)
danking Feb 23, 2024
5955a19
[hailtop] in WithoutSemaphore, optionally do not acquire the semaphor…
danking Feb 23, 2024
73bd085
[infra] Remove unused registry-push-credentials secret (#14320)
daniel-goldstein Feb 23, 2024
298af4c
[pip] Bulk update dependencies (#14336)
daniel-goldstein Feb 23, 2024
7ccd47c
[ci] Retry more for auth copy paste logins (#14353)
daniel-goldstein Feb 23, 2024
fbd22a3
[aiogoogle] clean up storage client Task management (#14347)
danking Feb 23, 2024
ad60919
[aiotools.fs] tighter type on AsyncFS.__aenter__ (#14346)
danking Feb 26, 2024
13de4e6
[batch] Add Job Groups to Batch (#14282)
jigold Feb 26, 2024
4e4b3d7
[query] Refactor vds.sample_qc to use independent aggregators (#14297)
chrisvittal Feb 27, 2024
51e3b15
[batch] extract python job specific tests to separate file (#14314)
danking Feb 27, 2024
5900dd6
[lint] Fix tabs in release.sh script (#14363)
daniel-goldstein Feb 27, 2024
a325690
[batch] reduce CPU use of delete_prev_..._resource_records (#14366)
danking Feb 27, 2024
093cbcb
[batch] Make insert_jobs_into_db retryable (#14370)
daniel-goldstein Feb 28, 2024
d20fc39
[batch] Correct ordering of batch_id and job_group_id in mark_job_err…
daniel-goldstein Feb 28, 2024
130e64f
[query] make mill print debug/release mode (#14306)
patrick-schultz Feb 28, 2024
eebc7be
[query] add scalafix check to check-hail (#14276)
patrick-schultz Feb 28, 2024
f6b56c2
[query] Fix #14303 - missing when sampling MatrixTable entries (#14371)
ehigham Feb 28, 2024
615ac31
[batch] ensure exactly one request creates each update (#14367)
danking Feb 28, 2024
026a64d
[internal-gateway] Greatly reduce rate limit for batch-driver request…
daniel-goldstein Feb 28, 2024
bc27ada
[batch] reduce runtime of listing batches and job groups (#14377)
danking Feb 28, 2024
f1f1b41
[batch] eliminate unused imports in hailtop.batch tests (#14315)
danking Feb 29, 2024
aae8027
[query] Don't error on VCF export when haploid call is unphased (#14375)
chrisvittal Feb 29, 2024
358542f
[gear] simplify database retry logic (#14369)
danking Feb 29, 2024
c547bd8
[batch] Dont grab an X lock on the batches table in attempts after up…
daniel-goldstein Feb 29, 2024
8c9e9fe
Revert "[internal-gateway] Greatly reduce rate limit for batch-driver…
daniel-goldstein Feb 29, 2024
5c274a8
[batch] also check hailtop.batch tests (#14316)
danking Mar 1, 2024
ce3ca9c
[query] deprecate `MatrixTable.make_table` (#14386)
ehigham Mar 1, 2024
426e16b
[ci] switch to a new personal access token (#14384)
danking Mar 1, 2024
f40d1c9
[batch] Support deployment mode as a Terra on Azure app (#13944)
daniel-goldstein Mar 1, 2024
90d0344
[release] Use consistent directory naming for azure wheel (#14325)
daniel-goldstein Mar 1, 2024
6f8a4cb
Prevent iteration of Job and ResourceGroup objects (#14390)
jmarshall Mar 4, 2024
2863e0e
[infra] Update Azure provider 3.93.0 (#14385)
daniel-goldstein Mar 4, 2024
4c9d6f6
[dev-docs] add releasing.md (#14322)
danking Mar 5, 2024
89ca474
[query] Add AlleleType Enum (#14360)
chrisvittal Mar 5, 2024
a26360c
[pip] Move protobuf pin from query to gear (#14393)
daniel-goldstein Mar 5, 2024
42ded4e
[query] Include traceback in code-generated asserts in debug builds (…
ehigham Mar 6, 2024
626383a
[batch] 400 on bad job group specs instead of 500 (#14389)
daniel-goldstein Mar 7, 2024
923cc55
[docs] parting docs (#14388)
danking Mar 7, 2024
950ce28
[query] Remove read/writeUTF from Input/OutputBuffer (#14401)
chrisvittal Mar 8, 2024
375fead
[query/vds] Don't error if combiner is finished and output exists (#1…
chrisvittal Mar 8, 2024
9d10a2b
Add Cochran-Mantel-Haenszel statistical test for association (#14255)
Will-Tyler Mar 11, 2024
01a6a6a
[lint] organizes python imports (#14260)
iris-garden Mar 13, 2024
ebe7992
[batch] Remove hardcoded eastus assert (#14416)
daniel-goldstein Mar 15, 2024
858dd08
[query] Load each missing byte once during struct decoding. (#14406)
chrisvittal Mar 15, 2024
443ce2f
[qob] Remove mount_tokens job spec parameter for worker jobs (#14417)
daniel-goldstein Mar 18, 2024
6a6c38d
[ci] Expose `HAIL_CI_STORAGE_URI` as `ci_storage_uri` in CI Steps (#1…
ehigham Mar 19, 2024
0c17a8f
[query/vds] Add ref_block_max_length check to VariantDataset.validate…
chrisvittal Mar 19, 2024
a4e1bc3
Remove `auth` from `check-pip-requirements` make target (#14421)
ehigham Mar 20, 2024
59bbd1c
[lint] ignores import linting for blame (#14152)
iris-garden Mar 20, 2024
2c9080a
[lint] Applies remaining ruff linter changes to hail/ folder (#14415)
iris-garden Mar 26, 2024
7fc2c3e
[batch] Close the aiohttp client session used by the gcp WorkerAPI (#…
daniel-goldstein Mar 28, 2024
ad1fcee
[query] fix bad bug in IndexedRVDSpec2 (#14420)
patrick-schultz Mar 28, 2024
0ae534e
[release] submit hail query benchmarks on release (#14398)
ehigham Mar 29, 2024
6198e42
fix deploy failure caused by use of relative paths (#14429)
ehigham Mar 29, 2024
697ea42
[fs] Add sink write failure in ABS to transient errors (#14430)
daniel-goldstein Apr 1, 2024
3dfb03c
[release] 0.2.129 (#14426)
ehigham Apr 2, 2024
a89d64a
[release] Retry 0.2.129 (#14434)
ehigham Apr 2, 2024
106dbaf
[release] Fix EV syntax in release job for WHEEL variable (#14436)
daniel-goldstein Apr 2, 2024
7bec3b3
[release] split export statements out of desperation more than anythi…
ehigham Apr 3, 2024
eaccef4
[ci] Allow GCP g2 test to timeout (#14435)
daniel-goldstein Apr 4, 2024
e7c152a
[batch] Do not lock when querying billing projects (#14443)
daniel-goldstein Apr 4, 2024
41126be
[release] dont rely on release.sh being executable (#14445)
ehigham Apr 4, 2024
c21cbcb
[batch] Use spend instead of cost on the billing page (#14437)
daniel-goldstein Apr 4, 2024
6b97ef8
[query] Remove native llvm experiment (#14446)
daniel-goldstein Apr 4, 2024
6c970d5
[batch/ui] adds "always run" to job and batch UIs (#14425)
iris-garden Apr 4, 2024
596d64e
[query] reorganize Binds.scala (#14404)
patrick-schultz Apr 4, 2024
089f9dc
[query] Copy spark driver log to remote tmpdir on error (#14447)
ehigham Apr 5, 2024
b27737f
[query] Unify Let and AggLet into new Block node (#14402)
patrick-schultz Apr 9, 2024
57e8dca
[release] build release wheel with correct `deploy.yaml` (#14453)
ehigham Apr 10, 2024
bea04d9
[release] 0.2.130 (#14454)
ehigham Apr 10, 2024
82e5406
Merge upstream HEAD(b7bde56d5, 2024-05-14) Stop writing to V2 tables
milo-hyben May 14, 2024
7094105
Fixing merged conflicts.
milo-hyben May 14, 2024
6146638
Merge upstream HEAD(e68103e03, 2024-05-14) Remove V2 tables
milo-hyben May 14, 2024
a19a9f1
Fixing merged conflicts.
milo-hyben May 14, 2024
4fe048f
Merge upstream HEAD(dc7fce0e3, 2024-05-14) Use CI's credentials for i…
milo-hyben May 14, 2024
f73747b
Merge upstream HEAD(13de4e6ff, 2024-05-14) Add job groups [migration …
milo-hyben May 14, 2024
a3cbc74
Fixing merged conflicts.
milo-hyben May 14, 2024
f50d5f5
Removing the module ukbb clause
milo-hyben May 20, 2024
b37df1e
Updating sql for func get_completed_batches_ordered_by_completed_time.
milo-hyben May 20, 2024
82b13e5
Merge upstream HEAD(6a6c38d5a, 2024-05-21) Expose HAIL_CI_STORAGE_URI…
milo-hyben May 21, 2024
8dd30c3
Merge upstream HEAD(bea04d9, 2024-05-21) [release] 0.2.130 (#14454)
milo-hyben May 21, 2024
f8a4e39
Allow os.PathLike paths for Batch.read_input()/read_input_group() (#1…
jmarshall May 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@
4fccbe2d18c6d2f4059036d61489467c780bbc0e
# Delete `FastIndexedSeq`
fcc9ffab3cd68c4cfb26a1553d65118797c59d6e
# blackens hail directory
da2790242a40ec425a53a02707d261c893b264f7
# scalafmt
422edf6386616711ca70f87c455f76781ac925d4
# replaces black formatting with ruff
fa2ef0f2c76654d0c037ff6db60ccb8842fb8539
# ruff lint python imports
01a6a6a107faf204d4f5c20f8ae510d2c35518e9
34 changes: 0 additions & 34 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ hail/python/hail/backend/extra_classpath
hail/python/hail/backend/hail.jar
hail/install-editable
_/
.helix
12 changes: 7 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,26 @@ repos:
language: system
types: [python]
require_serial: true
- id: ruff-format
name: ruff-format
entry: ruff format
language: system
types: [python]
require_serial: true
- id: pyright
name: pyright
entry: pyright
language: system
types: [python]
require_serial: true
exclude: hail/python/(hail|test)
stages:
- pre-push
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
language_version: python3
- repo: https://github.com/thibaudcolas/curlylint
rev: v0.13.1
hooks:
Expand Down
17 changes: 10 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ CHECK_SERVICES_MODULES := $(patsubst %, check-%, $(SERVICES_MODULES))
SPECIAL_IMAGES := hail-ubuntu batch-worker letsencrypt

HAILGENETICS_IMAGES = $(foreach img,hail vep-grch37-85 vep-grch38-95,hailgenetics-$(img))
CI_IMAGES = ci-utils ci-buildkit base hail-run
CI_IMAGES = ci-utils hail-buildkit base hail-run
PRIVATE_REGISTRY_IMAGES = $(patsubst %, pushed-private-%-image, $(SPECIAL_IMAGES) $(SERVICES_PLUS_ADMIN_POD) $(CI_IMAGES) $(HAILGENETICS_IMAGES))

HAILTOP_VERSION := hail/python/hailtop/hail_version
Expand Down Expand Up @@ -39,17 +39,21 @@ check-all: check-hail check-services

.PHONY: check-hail-fast
check-hail-fast:
ruff check hail/python/hail
ruff check hail/python/hailtop
ruff check hail
ruff format hail --diff
$(PYTHON) -m pyright hail/python/hailtop

ruff check hail/python/test/hailtop/batch
$(PYTHON) -m pyright hail/python/test/hailtop/batch

.PHONY: pylint-hailtop
pylint-hailtop:
# pylint on hail is still a work in progress
$(PYTHON) -m pylint --rcfile pylintrc hail/python/hailtop --score=n

.PHONY: check-hail
check-hail: check-hail-fast pylint-hailtop
cd hail && sh millw __.checkFormat + __.fix --check

.PHONY: check-services
check-services: $(CHECK_SERVICES_MODULES)
Expand All @@ -61,8 +65,8 @@ pylint-%:
.PHONY: check-%-fast
check-%-fast:
ruff check $*
ruff format $* --diff
$(PYTHON) -m pyright $*
$(PYTHON) -m black $* --check --diff
curlylint $*
cd $* && bash ../check-sql.sh

Expand All @@ -82,7 +86,6 @@ check-pip-requirements:
hail/python/dev \
gear \
web_common \
auth \
batch \
ci

Expand All @@ -94,7 +97,6 @@ check-linux-pip-requirements:
hail/python/dev \
gear \
web_common \
auth \
batch \
ci

Expand Down Expand Up @@ -173,7 +175,8 @@ hail-0.1-docs-5a6778710097.tar.gz:
gcloud storage cp gs://hail-common/builds/0.1/docs/$@ .

hail/build/www: hail-0.1-docs-5a6778710097.tar.gz $(shell git ls-files hail)
$(MAKE) -C hail hail-docs-no-test batch-docs
@echo !!! This target does not render the notebooks because it takes a long time !!!
$(MAKE) -C hail hail-docs-do-not-render-notebooks batch-docs
mkdir -p hail/build/www/docs/0.1
tar -xvf hail-0.1-docs-5a6778710097.tar.gz -C hail/build/www/docs/0.1 --strip-components 2
touch $@ # Copying into the dir does not necessarily touch it
Expand Down
60 changes: 33 additions & 27 deletions auth/auth/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import kubernetes_asyncio.client
import kubernetes_asyncio.client.rest
import kubernetes_asyncio.config
import uvloop
from aiohttp import web
from prometheus_async.aio.web import server_stats # type: ignore

Expand All @@ -33,11 +32,10 @@
from gear.auth import AIOHTTPHandler, get_session_id
from gear.cloud_config import get_global_config
from gear.profiling import install_profiler_if_requested
from hailtop import httpx
from hailtop import httpx, uvloopx
from hailtop.auth import AzureFlow, Flow, GoogleFlow, IdentityProvider
from hailtop.config import get_deploy_config
from hailtop.hail_logging import AccessLogger
from hailtop.tls import internal_server_ssl_context
from hailtop.utils import secret_alnum_string
from web_common import render_template, set_message, setup_aiohttp_jinja2, setup_common_static_routes

Expand All @@ -56,8 +54,6 @@

log = logging.getLogger('auth')

uvloop.install()

CLOUD = get_global_config()['cloud']
DEFAULT_NAMESPACE = os.environ['HAIL_DEFAULT_NAMESPACE']

Expand Down Expand Up @@ -164,10 +160,10 @@ async def _insert(tx):
return False

await tx.execute_insertone(
'''
"""
INSERT INTO users (state, username, login_id, is_developer, is_service_account, hail_identity, hail_credentials_secret_name)
VALUES (%s, %s, %s, %s, %s, %s, %s);
''',
""",
(
'creating',
username,
Expand Down Expand Up @@ -482,9 +478,11 @@ async def rest_login(request: web.Request) -> web.Response:
flow_data['callback_uri'] = callback_uri

# keeping authorization_url and state for backwards compatibility
return json_response(
{'flow': flow_data, 'authorization_url': flow_data['authorization_url'], 'state': flow_data['state']}
)
return json_response({
'flow': flow_data,
'authorization_url': flow_data['authorization_url'],
'state': flow_data['state'],
})


@routes.get('/api/v1alpha/oauth2-client')
Expand All @@ -511,10 +509,10 @@ async def post_create_role(request: web.Request, _) -> NoReturn:
name = str(post['name'])

role_id = await db.execute_insertone(
'''
"""
INSERT INTO `roles` (`name`)
VALUES (%s);
''',
""",
(name),
)

Expand Down Expand Up @@ -564,10 +562,10 @@ async def rest_get_users(request: web.Request, userdata: UserData) -> web.Respon
raise web.HTTPUnauthorized()

db = request.app[AppKeys.DB]
_query = '''
_query = """
SELECT id, username, login_id, state, is_developer, is_service_account, hail_identity
FROM users;
'''
"""
users = [x async for x in db.select_and_fetchall(_query)]
return json_response(users)

Expand All @@ -579,10 +577,10 @@ async def rest_get_user(request: web.Request, _) -> web.Response:
username = request.match_info['user']

user = await db.select_and_fetchone(
'''
"""
SELECT id, username, login_id, state, is_developer, is_service_account, hail_identity FROM users
WHERE username = %s;
''',
""",
(username,),
)
if user is None:
Expand All @@ -599,11 +597,11 @@ async def _delete_user(db: Database, username: str, id: Optional[str]):
where_args.append(id)

n_rows = await db.execute_update(
f'''
f"""
UPDATE users
SET state = 'deleting'
WHERE {' AND '.join(where_conditions)};
''',
""",
where_args,
)

Expand Down Expand Up @@ -743,11 +741,11 @@ async def get_userinfo_from_login_id_or_hail_identity_id(
users = [
x
async for x in db.select_and_fetchall(
'''
"""
SELECT users.*
FROM users
WHERE (users.login_id = %s OR users.hail_identity_uid = %s) AND users.state = 'active'
''',
""",
(login_id_or_hail_idenity_uid, login_id_or_hail_idenity_uid),
)
]
Expand All @@ -767,12 +765,12 @@ async def get_userinfo_from_hail_session_id(request: web.Request, session_id: st
users = [
x
async for x in db.select_and_fetchall(
'''
"""
SELECT users.*
FROM users
INNER JOIN sessions ON users.id = sessions.user_id
WHERE users.state = 'active' AND sessions.session_id = %s AND (ISNULL(sessions.max_age_secs) OR (NOW() < TIMESTAMPADD(SECOND, sessions.max_age_secs, sessions.created)));
''',
""",
session_id,
'get_userinfo',
)
Expand Down Expand Up @@ -812,13 +810,20 @@ class AppKeys:
HAILCTL_CLIENT_CONFIG = web.AppKey('hailctl_client_config', dict)
K8S_CLIENT = web.AppKey('k8s_client', kubernetes_asyncio.client.CoreV1Api)
K8S_CACHE = web.AppKey('k8s_cache', K8sCache)
EXIT_STACK = web.AppKey('exit_stack', AsyncExitStack)


async def on_startup(app):
exit_stack = AsyncExitStack()
app[AppKeys.EXIT_STACK] = exit_stack

db = Database()
await db.async_init(maxsize=50)
exit_stack.push_async_callback(db.async_close)
app[AppKeys.DB] = db

app[AppKeys.CLIENT_SESSION] = httpx.client_session()
exit_stack.push_async_callback(app[AppKeys.CLIENT_SESSION].close)

credentials_file = '/auth-oauth2-client-secret/client_secret.json'
if CLOUD == 'gcp':
Expand All @@ -832,14 +837,13 @@ async def on_startup(app):

kubernetes_asyncio.config.load_incluster_config()
app[AppKeys.K8S_CLIENT] = kubernetes_asyncio.client.CoreV1Api()
exit_stack.push_async_callback(app[AppKeys.K8S_CLIENT].api_client.rest_client.pool_manager.close)

app[AppKeys.K8S_CACHE] = K8sCache(app[AppKeys.K8S_CLIENT])


async def on_cleanup(app):
async with AsyncExitStack() as cleanup:
cleanup.push_async_callback(app[AppKeys.K8S_CLIENT].api_client.rest_client.pool_manager.close)
cleanup.push_async_callback(app[AppKeys.DB].async_close)
cleanup.push_async_callback(app[AppKeys.CLIENT_SESSION].close)
await app[AppKeys.EXIT_STACK].aclose()


class AuthAccessLogger(AccessLogger):
Expand Down Expand Up @@ -879,6 +883,8 @@ async def auth_check_csrf_token(request: web.Request, handler: AIOHTTPHandler):


def run():
uvloopx.install()

install_profiler_if_requested('auth')

app = web.Application(middlewares=[auth_check_csrf_token, monitor_endpoints_middleware])
Expand All @@ -898,5 +904,5 @@ def run():
host='0.0.0.0',
port=443,
access_log_class=AuthAccessLogger,
ssl_context=internal_server_ssl_context(),
ssl_context=deploy_config.server_ssl_context(),
)
Loading