Skip to content

Commit

Permalink
refactor: move taskcluster root url definitions to their own file (#223)
Browse files Browse the repository at this point in the history
This allows them to be imported without depending on any of the imports that `util/integration.py` does. (This is going to become a problem in #210, when I'm adding a `taskgraph` import there.)
  • Loading branch information
bhearsum authored Dec 16, 2024
1 parent ac3a782 commit 00ee798
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@

from taskgraph.transforms.base import TransformSequence

from fxci_config_taskgraph.util.integration import (
STAGING_ROOT_URL,
find_tasks,
)
from fxci_config_taskgraph.util.constants import STAGING_ROOT_URL
from fxci_config_taskgraph.util.integration import find_tasks

transforms = TransformSequence()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@

from taskgraph.transforms.base import TransformSequence

from fxci_config_taskgraph.util.integration import (
FIREFOXCI_ROOT_URL,
STAGING_ROOT_URL,
find_tasks,
get_taskcluster_client,
)
from fxci_config_taskgraph.util.constants import FIREFOXCI_ROOT_URL, STAGING_ROOT_URL
from fxci_config_taskgraph.util.integration import find_tasks, get_taskcluster_client

transforms = TransformSequence()

Expand Down
2 changes: 2 additions & 0 deletions taskcluster/fxci_config_taskgraph/util/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FIREFOXCI_ROOT_URL = "https://firefox-ci-tc.services.mozilla.com"
STAGING_ROOT_URL = "https://stage.taskcluster.nonprod.cloudops.mozgcp.net"
3 changes: 1 addition & 2 deletions taskcluster/fxci_config_taskgraph/util/integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
import requests
import taskcluster

FIREFOXCI_ROOT_URL = "https://firefox-ci-tc.services.mozilla.com"
STAGING_ROOT_URL = "https://stage.taskcluster.nonprod.cloudops.mozgcp.net"
from fxci_config_taskgraph.util.constants import FIREFOXCI_ROOT_URL


@cache
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/scripts/fetch-firefoxci-artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import requests
import taskcluster

from fxci_config_taskgraph.util.integration import FIREFOXCI_ROOT_URL, STAGING_ROOT_URL
from fxci_config_taskgraph.util.constants import FIREFOXCI_ROOT_URL, STAGING_ROOT_URL


def get_firefoxci_credentials() -> dict[str, str]:
Expand Down
7 changes: 2 additions & 5 deletions taskcluster/test/test_transforms_firefoxci_artifact.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@
from taskgraph.util.templates import merge

from fxci_config_taskgraph.transforms.firefoxci_artifact import transforms
from fxci_config_taskgraph.util.integration import (
FIREFOXCI_ROOT_URL,
STAGING_ROOT_URL,
find_tasks,
)
from fxci_config_taskgraph.util.constants import FIREFOXCI_ROOT_URL, STAGING_ROOT_URL
from fxci_config_taskgraph.util.integration import find_tasks


@pytest.fixture
Expand Down
7 changes: 2 additions & 5 deletions taskcluster/test/test_transforms_integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@
from taskgraph.util.templates import merge

from fxci_config_taskgraph.transforms.integration_test import transforms
from fxci_config_taskgraph.util.integration import (
FIREFOXCI_ROOT_URL,
STAGING_ROOT_URL,
find_tasks,
)
from fxci_config_taskgraph.util.constants import FIREFOXCI_ROOT_URL, STAGING_ROOT_URL
from fxci_config_taskgraph.util.integration import find_tasks


@pytest.fixture
Expand Down

0 comments on commit 00ee798

Please sign in to comment.