You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by da...@apache.org on 2023/01/12 14:22:57 UTC
[beam] branch master updated: [Playground] Fix for failing CI/CD in playground (#24984)
This is an automated email from the ASF dual-hosted git repository.
damccorm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new ad4410aa23a [Playground] Fix for failing CI/CD in playground (#24984)
ad4410aa23a is described below
commit ad4410aa23a81736beab888a7e840545127d0704
Author: Timur Sultanov <ti...@akvelon.com>
AuthorDate: Thu Jan 12 18:22:50 2023 +0400
[Playground] Fix for failing CI/CD in playground (#24984)
* Fix test running for CI/CD scripts
* Require --datastore-project in ci_Cd.py only for CD step
---
.github/workflows/playground_examples_ci_reusable.yml | 1 -
playground/infrastructure/ci_cd.py | 10 ++++++----
playground/infrastructure/test_ci_cd.py | 1 +
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/playground_examples_ci_reusable.yml b/.github/workflows/playground_examples_ci_reusable.yml
index 8bf8e4ccad4..7c5f039c348 100644
--- a/.github/workflows/playground_examples_ci_reusable.yml
+++ b/.github/workflows/playground_examples_ci_reusable.yml
@@ -173,7 +173,6 @@ jobs:
- name: Run ci_cd.py
run: |
python3 ci_cd.py \
- --datastore-project $GOOGLE_CLOUD_PROJECT \
--step $STEP \
--sdk SDK_${SDK^^} \
--origin $ORIGIN \
diff --git a/playground/infrastructure/ci_cd.py b/playground/infrastructure/ci_cd.py
index 3c1d6258327..470d5049c6d 100644
--- a/playground/infrastructure/ci_cd.py
+++ b/playground/infrastructure/ci_cd.py
@@ -52,8 +52,8 @@ parser.add_argument(
parser.add_argument(
"--datastore-project",
dest="datastore_project",
- help="Datastore project to use when saving data",
- required=True
+ help="Datastore project to use when saving data (CD step only)",
+ default=None
)
parser.add_argument(
"--sdk",
@@ -113,7 +113,9 @@ def _run_ci_cd(step: str, raw_sdk: str, origin: Origin, project: str, namespace:
if __name__ == "__main__":
- parser = parser.parse_args()
+ args = parser.parse_args()
+ if args.step == Config.CD_STEP_NAME and args.datastore_project is None:
+ parser.error(f"--datastore-project is required when --step {Config.CD_STEP_NAME} is selected")
_check_envs()
setup_logger()
- _run_ci_cd(parser.step, parser.sdk, parser.origin, parser.datastore_project, parser.namespace, parser.subdirs)
+ _run_ci_cd(args.step, args.sdk, args.origin, args.datastore_project, args.namespace, args.subdirs)
diff --git a/playground/infrastructure/test_ci_cd.py b/playground/infrastructure/test_ci_cd.py
index 7daf631ccec..fbfe03ff8f1 100644
--- a/playground/infrastructure/test_ci_cd.py
+++ b/playground/infrastructure/test_ci_cd.py
@@ -37,6 +37,7 @@ def test_ci_step(
step,
"SDK_JAVA",
Origin.PG_EXAMPLES,
+ "test",
Config.DEFAULT_NAMESPACE,
[
"../../examples",