Skip to content

Commit b60c560

Browse files
authored
fix ci auth issues (#3320)
1 parent 267ce32 commit b60c560

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/_e2e_tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
MONGO_PORT: ${{ env.mongo-port }}
5454
MONGO_REPLICASET: ${{ env.replicaset }}
5555
COMMON_BLOCKED_DATASETS: "DVUser/blocked-*"
56-
ADMIN_HF_ORGANIZATION: "valid_org"
56+
ADMIN_HF_ORGANIZATION: "DVAdminsOrg"
5757
E2E_ADMIN_USER_TOKEN: "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"
5858
# the containers need to access S3 and Cloudfront
5959
ASSETS_BASE_URL: "https://datasets-server-test.us.dev.moon.huggingface.tech/assets"
@@ -110,7 +110,7 @@ jobs:
110110
PROMETHEUS_MULTIPROC_DIR: "/tmp"
111111
WORKER_SLEEP_SECONDS: "1"
112112
COMMON_BLOCKED_DATASETS: "DVUser/blocked-*"
113-
ADMIN_HF_ORGANIZATION: "valid_org"
113+
ADMIN_HF_ORGANIZATION: "DVAdminsOrg"
114114
E2E_ADMIN_USER_TOKEN: "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"
115115
run: |
116116
poetry run python -m pytest -vv -s tests

e2e/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export WORKER_UVICORN_NUM_WORKERS := 2
2828
export WORKER_UVICORN_PORT := 9086
2929

3030
# see https://github.com/huggingface/moon-landing/blob/main/server/scripts/staging-seed-db.ts
31-
export ADMIN_HF_ORGANIZATION := valid_org
31+
export ADMIN_HF_ORGANIZATION := DVAdminsOrg
3232
export E2E_ADMIN_USER_TOKEN := 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
3333

3434
export COMPOSE_PROJECT_NAME := e2e

libs/libapi/tests/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def test_get_cache_entry_from_step_no_cache_private_enterprise(hf_endpoint: str)
229229
id=dataset, sha=revision, private=True, downloads=0, likes=0, tags=[], author=author
230230
),
231231
),
232-
patch("libcommon.operations.get_entity_info", return_value=EntityInfo(isPro=False, isEnterprise=True)),
232+
patch("libcommon.operations.get_entity_info", return_value=EntityInfo(isPro=False, plan="enterprise")),
233233
):
234234
# ^ the dataset and the author do not exist on the Hub, we don't want to raise an issue here
235235
with raises(ResponseNotReadyError):

libs/libcommon/src/libcommon/operations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class EntityInfo:
5656

5757
def __init__(self, **kwargs) -> None: # type: ignore
5858
self.is_pro = kwargs.pop("isPro", None)
59-
self.is_enterprise = True if kwargs.pop("plan", None) is not None else False
59+
self.is_enterprise = kwargs["plan"] is not None if "plan" in kwargs else None
6060

6161

6262
class CustomHfApi(HfApi):

libs/libcommon/tests/test_operations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def test_get_revision_timeout() -> None:
7474
[
7575
(NORMAL_USER, False, None),
7676
(PRO_USER, True, None),
77-
(NORMAL_ORG, None, False),
77+
(NORMAL_ORG, None, None),
7878
(ENTERPRISE_ORG, None, True),
7979
],
8080
)

0 commit comments

Comments
 (0)