-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[buildkite] stop using str Enum #25874
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,11 @@ | |
GCP_CREDS_LOCAL_FILE, | ||
LATEST_DAGSTER_RELEASE, | ||
) | ||
from dagster_buildkite.package_spec import PackageSpec, UnsupportedVersionsFunction | ||
from dagster_buildkite.package_spec import ( | ||
PackageSpec, | ||
PytestExtraCommandsFunction, | ||
UnsupportedVersionsFunction, | ||
) | ||
from dagster_buildkite.python_version import AvailablePythonVersion | ||
from dagster_buildkite.step_builder import BuildkiteQueue | ||
from dagster_buildkite.steps.test_project import test_project_depends_fn | ||
|
@@ -60,12 +64,12 @@ def build_backcompat_suite_steps() -> List[BuildkiteTopLevelStep]: | |
) | ||
|
||
|
||
def backcompat_extra_cmds(_, factor: str) -> List[str]: | ||
def backcompat_extra_cmds(_, factor: Optional[str]) -> List[str]: | ||
tox_factor_map = { | ||
"user-code-latest-release": LATEST_DAGSTER_RELEASE, | ||
"user-code-earliest-release": EARLIEST_TESTED_RELEASE, | ||
} | ||
|
||
assert factor | ||
webserver_version = DAGSTER_CURRENT_BRANCH | ||
webserver_library_version = _get_library_version(webserver_version) | ||
user_code_version = tox_factor_map[factor] | ||
|
@@ -163,7 +167,7 @@ def build_auto_materialize_perf_suite_steps(): | |
|
||
def daemon_pytest_extra_cmds(version: AvailablePythonVersion, _): | ||
return [ | ||
"export DAGSTER_DOCKER_IMAGE_TAG=$${BUILDKITE_BUILD_ID}-" + version, | ||
"export DAGSTER_DOCKER_IMAGE_TAG=$${BUILDKITE_BUILD_ID}-" + version.value, | ||
'export DAGSTER_DOCKER_REPOSITORY="$${AWS_ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com"', | ||
"pushd integration_tests/test_suites/daemon-test-suite/monitoring_daemon_tests/", | ||
"docker-compose up -d --remove-orphans", | ||
|
@@ -182,7 +186,7 @@ def daemon_pytest_extra_cmds(version: AvailablePythonVersion, _): | |
# ######################## | ||
|
||
|
||
def build_k8s_suite_steps(): | ||
def build_k8s_suite_steps() -> List[BuildkiteTopLevelStep]: | ||
pytest_tox_factors = ["-default", "-subchart"] | ||
directory = os.path.join("integration_tests", "test_suites", "k8s-test-suite") | ||
return build_integration_suite_steps( | ||
|
@@ -201,7 +205,7 @@ def build_k8s_suite_steps(): | |
def build_integration_suite_steps( | ||
directory: str, | ||
pytest_tox_factors: Optional[List[str]], | ||
pytest_extra_cmds: Optional[Callable] = None, | ||
pytest_extra_cmds: Optional[PytestExtraCommandsFunction] = None, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [1] |
||
queue=None, | ||
always_run_if: Optional[Callable[[], bool]] = None, | ||
unsupported_python_versions: Optional[ | ||
|
@@ -229,19 +233,19 @@ def build_integration_suite_steps( | |
).build_steps() | ||
|
||
|
||
def k8s_integration_suite_pytest_extra_cmds(version: str, _) -> List[str]: | ||
def k8s_integration_suite_pytest_extra_cmds(version: AvailablePythonVersion, _) -> List[str]: | ||
return [ | ||
"export DAGSTER_DOCKER_IMAGE_TAG=$${BUILDKITE_BUILD_ID}-" + version, | ||
"export DAGSTER_DOCKER_IMAGE_TAG=$${BUILDKITE_BUILD_ID}-" + version.value, | ||
'export DAGSTER_DOCKER_REPOSITORY="$${AWS_ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com"', | ||
"aws ecr get-login --no-include-email --region us-west-2 | sh", | ||
] | ||
|
||
|
||
def celery_k8s_integration_suite_pytest_extra_cmds(version: str, _) -> List[str]: | ||
def celery_k8s_integration_suite_pytest_extra_cmds(version: AvailablePythonVersion, _) -> List[str]: | ||
cmds = [ | ||
'export AIRFLOW_HOME="/airflow"', | ||
"mkdir -p $${AIRFLOW_HOME}", | ||
"export DAGSTER_DOCKER_IMAGE_TAG=$${BUILDKITE_BUILD_ID}-" + version, | ||
"export DAGSTER_DOCKER_IMAGE_TAG=$${BUILDKITE_BUILD_ID}-" + version.value, | ||
'export DAGSTER_DOCKER_REPOSITORY="$${AWS_ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com"', | ||
"aws ecr get-login --no-include-email --region us-west-2 | sh", | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aligning the typing [1] makes
factor
Optional
but we must always be getting it in this context so i just asserted to make the type checker happy