From 49e87be94f96b268f91406b850d8d162585aed41 Mon Sep 17 00:00:00 2001 From: Zhu Zhanyan Date: Thu, 10 Sep 2020 22:44:13 +0800 Subject: [PATCH 01/15] Update version lint script to detect maven, docker image and stable version . --- infra/scripts/validate-version-consistency.sh | 107 ++++++++++++------ 1 file changed, 75 insertions(+), 32 deletions(-) diff --git a/infra/scripts/validate-version-consistency.sh b/infra/scripts/validate-version-consistency.sh index f33cb8a56f..b7a3a94010 100755 --- a/infra/scripts/validate-version-consistency.sh +++ b/infra/scripts/validate-version-consistency.sh @@ -1,52 +1,89 @@ #!/usr/bin/env bash # This script will scan through a list of files to validate that all versions are consistent with -# - Master version (could be snapshot) -# - Highest stable commit (latest tag) +# - fix-version-cross-branch-ref version: (could be snapshot) +# - Docker images version: 'dev' on fix-version-cross-branch-ref, Highest tag on release branches +# - Release version: Highest stable commit. Latest tag repo wide, release candidates not included set -e +# Matches (ie vMAJOR.MINOR-branch) release branch names +RELEASE_BRANCH_REGEX="v[0-9]+\.[0-9]+-branch" + # Determine the current Feast version from Maven (pom.xml) -export FEAST_MASTER_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) -[[ -z "$FEAST_MASTER_VERSION" ]] && { - echo "$FEAST_MASTER_VERSION is missing, please check pom.xml and maven" +export FEAST_MAVEN_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) +[[ -z "$FEAST_MAVEN_VERSION" ]] && { + echo "$FEAST_MAVEN_VERSION is missing, please check pom.xml and maven" exit 1 } +echo "Linting Maven version: $FEAST_MAVEN_VERSION" -# Determine the highest released version from Git history -git fetch --prune --unshallow --tags || true -FEAST_RELEASE_VERSION_WITH_V=$(git tag -l --sort -version:refname | head -n 1) -echo $FEAST_RELEASE_VERSION_WITH_V - -export FEAST_RELEASE_VERSION=${FEAST_RELEASE_VERSION_WITH_V#"v"} -echo $FEAST_RELEASE_VERSION +# Determine Docker image version tag relative to current branch +BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) +if [ $BRANCH_NAME = "fix-version-cross-branch-ref" ] +then + # Use development version + FEAST_DOCKER_VERSION="dev" +elif echo "$BRANCH_NAME" | grep -P $RELEASE_BRANCH_REGEX &>/dev/null +then + # Use last release tag tagged on the release branch + LAST_MERGED_TAG=$(git tag -l --sort -version:refname --merged | head -n 1) + FEAST_DOCKER_VERSION=${LAST_MERGED_TAG:"v"} +else + # Do not enforce version linting as we don't know if the target merge branch + FEAST_DOCKER_VERSION="_ANY" +fi +[[ -z "$FEAST_DOCKER_VERSION" ]] && { + echo "FEAST_DOCKER_VERSION is missing" + exit 1 +} +export FEAST_DOCKER_VERSION +echo "Linting docker image version: $FEAST_DOCKER_VERSION" -[[ -z "$FEAST_RELEASE_VERSION" ]] && { - echo "FEAST_RELEASE_VERSION is missing" +# Determine highest stable version relative to current branch +# Regular expression for matching stable tags in the format vMAJOR.MINOR.PATCH +STABLE_TAG_REGEX="v[0-9]+\.[0-9]+\.[0-9]+" +if [ $BRANCH_NAME = "fix-version-cross-branch-ref" ] +then + # Use last stable tag repo wide + LAST_STABLE_TAG=$(git tag --sort -version:refname | grep -P "$STABLE_TAG_REGEX" | head -n 1) + FEAST_STABLE_VERSION=${LAST_STABLE_TAG#"v"} +elif echo "$BRANCH_NAME" | grep -P $RELEASE_BRANCH_REGEX &>/dev/null +then + # Use last stable tag tagged on the release branch + LAST_STABLE_MERGE_TAG=$(git tag --sort -version:refname --merged | grep -P "$STABLE_TAG_REGEX" | head -n 1) + FEAST_STABLE_VERSION=${LAST_STABLE_MERGE_TAG#"v"} +else + # Do not enforce version linting as we don't know if the target merge branch + FEAST_STABLE_VERSION="_ANY" +fi +[[ -z "$FEAST_STABLE_VERSION" ]] && { + echo "FEAST_STABLE_VERSION is missing" exit 1 } +export FEAST_STABLE_VERSION +echo "Linting stable version: $FEAST_STABLE_VERSION" -# List of files to validate with master version (from pom.xml) +# List of files to validate with fix-version-cross-branch-ref version (from pom.xml) # Structure is a comma separated list of structure # , , -# declare -a files_to_validate_version=( - "infra/charts/feast/Chart.yaml,1,${FEAST_MASTER_VERSION}" - "infra/charts/feast/charts/feast-core/Chart.yaml,1,${FEAST_MASTER_VERSION}" - "infra/charts/feast/charts/feast-core/values.yaml,1,${FEAST_RELEASE_VERSION}" - "infra/charts/feast/charts/feast-core/README.md,1,${FEAST_RELEASE_VERSION}" - "infra/charts/feast/charts/feast-serving/Chart.yaml,1,${FEAST_MASTER_VERSION}" - "infra/charts/feast/charts/feast-jupyter/values.yaml,1,${FEAST_RELEASE_VERSION}" - "infra/charts/feast/charts/feast-jupyter/README.md,1,${FEAST_RELEASE_VERSION}" - "infra/charts/feast/charts/feast-jupyter/Chart.yaml,1,${FEAST_MASTER_VERSION}" - "infra/charts/feast/charts/feast-serving/values.yaml,1,${FEAST_RELEASE_VERSION}" - "infra/charts/feast/charts/feast-serving/README.md,1,${FEAST_RELEASE_VERSION}" - "infra/charts/feast/charts/feast-jobcontroller/Chart.yaml,1,${FEAST_MASTER_VERSION}" - "infra/charts/feast/charts/feast-jobcontroller/values.yaml,1,${FEAST_RELEASE_VERSION}" - "infra/charts/feast/charts/feast-jobcontroller/README.md,1,${FEAST_RELEASE_VERSION}" - "infra/charts/feast/requirements.yaml,4,${FEAST_MASTER_VERSION}" - "infra/charts/feast/requirements.lock,4,${FEAST_RELEASE_VERSION}" - "infra/docker-compose/.env.sample,1,${FEAST_RELEASE_VERSION}" + "infra/charts/feast/Chart.yaml,1,${FEAST_MAVEN_VERSION}" + "infra/charts/feast/charts/feast-core/Chart.yaml,1,${FEAST_MAVEN_VERSION}" + "infra/charts/feast/charts/feast-core/values.yaml,1,${FEAST_STABLE_VERSION}" + "infra/charts/feast/charts/feast-core/README.md,1,${FEAST_STABLE_VERSION}" + "infra/charts/feast/charts/feast-serving/Chart.yaml,1,${FEAST_MAVEN_VERSION}" + "infra/charts/feast/charts/feast-jupyter/values.yaml,1,${FEAST_STABLE_VERSION}" + "infra/charts/feast/charts/feast-jupyter/README.md,1,${FEAST_STABLE_VERSION}" + "infra/charts/feast/charts/feast-jupyter/Chart.yaml,1,${FEAST_MAVEN_VERSION}" + "infra/charts/feast/charts/feast-serving/values.yaml,1,${FEAST_STABLE_VERSION}" + "infra/charts/feast/charts/feast-serving/README.md,1,${FEAST_STABLE_VERSION}" + "infra/charts/feast/charts/feast-jobcontroller/Chart.yaml,1,${FEAST_MAVEN_VERSION}" + "infra/charts/feast/charts/feast-jobcontroller/values.yaml,1,${FEAST_STABLE_VERSION}" + "infra/charts/feast/charts/feast-jobcontroller/README.md,1,${FEAST_STABLE_VERSION}" + "infra/charts/feast/requirements.yaml,4,${FEAST_MAVEN_VERSION}" + "infra/charts/feast/requirements.lock,4,${FEAST_STABLE_VERSION}" + "infra/docker-compose/.env.sample,1,${FEAST_STABLE_VERSION}" ) echo @@ -55,6 +92,12 @@ echo for i in "${files_to_validate_version[@]}"; do IFS=',' read -r FILE_PATH EXPECTED_OCCURRENCES VERSION <<<"${i}" + # Disable version lint if '_ANY' specified as version. + if [ "$VERSION" = "_ANY" ] + then + continue + fi + echo echo echo "Testing whether versions are correctly set within file: $FILE_PATH" From a76e2828d94a8f01336ae19830321a860117f1c1 Mon Sep 17 00:00:00 2001 From: Zhu Zhanyan Date: Thu, 10 Sep 2020 23:13:13 +0800 Subject: [PATCH 02/15] Allow users to lint versions against their merge branch of choice by branch TARGET_MERGE_BRANCH --- infra/scripts/validate-version-consistency.sh | 44 ++++++++++--------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/infra/scripts/validate-version-consistency.sh b/infra/scripts/validate-version-consistency.sh index b7a3a94010..5a6bd90ed3 100755 --- a/infra/scripts/validate-version-consistency.sh +++ b/infra/scripts/validate-version-consistency.sh @@ -1,13 +1,16 @@ #!/usr/bin/env bash # This script will scan through a list of files to validate that all versions are consistent with -# - fix-version-cross-branch-ref version: (could be snapshot) -# - Docker images version: 'dev' on fix-version-cross-branch-ref, Highest tag on release branches +# - master version: (could be snapshot) +# - Docker images version: 'dev' on master, Highest tag on release branches # - Release version: Highest stable commit. Latest tag repo wide, release candidates not included +# Usage: ./validate-version-consistency.sh +# Optionaly set TARGET_MERGE_BRANCH var to the target merge branch to lint against the given merge branch. set -e +BRANCH_NAME=${TARGET_MERGE_BRANCH-$(git rev-parse --abbrev-ref HEAD)} # Matches (ie vMAJOR.MINOR-branch) release branch names -RELEASE_BRANCH_REGEX="v[0-9]+\.[0-9]+-branch" +RELEASE_BRANCH_REGEX="^v[0-9]+\.[0-9]+-branch$" # Determine the current Feast version from Maven (pom.xml) export FEAST_MAVEN_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) @@ -18,8 +21,7 @@ export FEAST_MAVEN_VERSION=$(mvn help:evaluate -Dexpression=project.version -q - echo "Linting Maven version: $FEAST_MAVEN_VERSION" # Determine Docker image version tag relative to current branch -BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) -if [ $BRANCH_NAME = "fix-version-cross-branch-ref" ] +if [ $BRANCH_NAME = "master" ] then # Use development version FEAST_DOCKER_VERSION="dev" @@ -27,10 +29,11 @@ elif echo "$BRANCH_NAME" | grep -P $RELEASE_BRANCH_REGEX &>/dev/null then # Use last release tag tagged on the release branch LAST_MERGED_TAG=$(git tag -l --sort -version:refname --merged | head -n 1) - FEAST_DOCKER_VERSION=${LAST_MERGED_TAG:"v"} + FEAST_DOCKER_VERSION=${LAST_MERGED_TAG#"v"} else # Do not enforce version linting as we don't know if the target merge branch FEAST_DOCKER_VERSION="_ANY" + echo "WARNING: Skipping docker version lint" fi [[ -z "$FEAST_DOCKER_VERSION" ]] && { echo "FEAST_DOCKER_VERSION is missing" @@ -41,8 +44,8 @@ echo "Linting docker image version: $FEAST_DOCKER_VERSION" # Determine highest stable version relative to current branch # Regular expression for matching stable tags in the format vMAJOR.MINOR.PATCH -STABLE_TAG_REGEX="v[0-9]+\.[0-9]+\.[0-9]+" -if [ $BRANCH_NAME = "fix-version-cross-branch-ref" ] +STABLE_TAG_REGEX="^v[0-9]+\.[0-9]+\.[0-9]+$" +if [ $BRANCH_NAME = "master" ] then # Use last stable tag repo wide LAST_STABLE_TAG=$(git tag --sort -version:refname | grep -P "$STABLE_TAG_REGEX" | head -n 1) @@ -55,6 +58,7 @@ then else # Do not enforce version linting as we don't know if the target merge branch FEAST_STABLE_VERSION="_ANY" + echo "WARNING: Skipping stable version lint" fi [[ -z "$FEAST_STABLE_VERSION" ]] && { echo "FEAST_STABLE_VERSION is missing" @@ -63,27 +67,27 @@ fi export FEAST_STABLE_VERSION echo "Linting stable version: $FEAST_STABLE_VERSION" -# List of files to validate with fix-version-cross-branch-ref version (from pom.xml) +# List of files to validate with master version (from pom.xml) # Structure is a comma separated list of structure # , , declare -a files_to_validate_version=( "infra/charts/feast/Chart.yaml,1,${FEAST_MAVEN_VERSION}" "infra/charts/feast/charts/feast-core/Chart.yaml,1,${FEAST_MAVEN_VERSION}" - "infra/charts/feast/charts/feast-core/values.yaml,1,${FEAST_STABLE_VERSION}" - "infra/charts/feast/charts/feast-core/README.md,1,${FEAST_STABLE_VERSION}" + "infra/charts/feast/charts/feast-core/values.yaml,1,${FEAST_DOCKER_VERSION}" + "infra/charts/feast/charts/feast-core/README.md,1,${FEAST_DOCKER_VERSION}" "infra/charts/feast/charts/feast-serving/Chart.yaml,1,${FEAST_MAVEN_VERSION}" - "infra/charts/feast/charts/feast-jupyter/values.yaml,1,${FEAST_STABLE_VERSION}" - "infra/charts/feast/charts/feast-jupyter/README.md,1,${FEAST_STABLE_VERSION}" + "infra/charts/feast/charts/feast-jupyter/values.yaml,1,${FEAST_DOCKER_VERSION}" + "infra/charts/feast/charts/feast-jupyter/README.md,1,${FEAST_DOCKER_VERSION}" "infra/charts/feast/charts/feast-jupyter/Chart.yaml,1,${FEAST_MAVEN_VERSION}" - "infra/charts/feast/charts/feast-serving/values.yaml,1,${FEAST_STABLE_VERSION}" - "infra/charts/feast/charts/feast-serving/README.md,1,${FEAST_STABLE_VERSION}" + "infra/charts/feast/charts/feast-serving/values.yaml,1,${FEAST_DOCKER_VERSION}" + "infra/charts/feast/charts/feast-serving/README.md,1,${FEAST_DOCKER_VERSION}" "infra/charts/feast/charts/feast-jobcontroller/Chart.yaml,1,${FEAST_MAVEN_VERSION}" - "infra/charts/feast/charts/feast-jobcontroller/values.yaml,1,${FEAST_STABLE_VERSION}" - "infra/charts/feast/charts/feast-jobcontroller/README.md,1,${FEAST_STABLE_VERSION}" + "infra/charts/feast/charts/feast-jobcontroller/values.yaml,1,${FEAST_DOCKER_VERSION}" + "infra/charts/feast/charts/feast-jobcontroller/README.md,1,${FEAST_DOCKER_VERSION}" "infra/charts/feast/requirements.yaml,4,${FEAST_MAVEN_VERSION}" - "infra/charts/feast/requirements.lock,4,${FEAST_STABLE_VERSION}" - "infra/docker-compose/.env.sample,1,${FEAST_STABLE_VERSION}" + "infra/charts/feast/requirements.lock,4,${FEAST_DOCKER_VERSION}" + "infra/docker-compose/.env.sample,1,${FEAST_DOCKER_VERSION}" ) echo @@ -107,7 +111,7 @@ for i in "${files_to_validate_version[@]}"; do cat "$FILE_PATH" echo echo "=========================================================" - ACTUAL_OCCURRENCES=$(grep -c "$VERSION" "$FILE_PATH" || true) + ACTUAL_OCCURRENCES=$(grep -c -P "\bv?$VERSION\b" "$FILE_PATH" || true) if [ "${ACTUAL_OCCURRENCES}" -eq "${EXPECTED_OCCURRENCES}" ]; then echo "SUCCESS" From 8d608855c5d3fc819fb50f7ffdc44f73009f74fe Mon Sep 17 00:00:00 2001 From: Zhu Zhanyan Date: Thu, 10 Sep 2020 23:18:03 +0800 Subject: [PATCH 03/15] Update development image tag version from 'dev' to 'develop' to make it easier to lint version. --- .github/workflows/master_only.yml | 8 ++++---- infra/scripts/validate-version-consistency.sh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/master_only.yml b/.github/workflows/master_only.yml index 501630a318..cda2a55d81 100644 --- a/.github/workflows/master_only.yml +++ b/.github/workflows/master_only.yml @@ -31,15 +31,15 @@ jobs: run: make build-${{ matrix.component }}-docker REGISTRY=gcr.io/kf-feast VERSION=${GITHUB_SHA} - name: Push image run: make push-${{ matrix.component }}-docker REGISTRY=gcr.io/kf-feast VERSION=${GITHUB_SHA} - - name: Push image to feast dev + - name: Push development Docker image run: | if [ ${GITHUB_REF#refs/*/} == "master" ]; then - docker tag gcr.io/kf-feast/feast-${{ matrix.component }}:${GITHUB_SHA} gcr.io/kf-feast/feast-${{ matrix.component }}:dev - docker push gcr.io/kf-feast/feast-${{ matrix.component }}:dev + docker tag gcr.io/kf-feast/feast-${{ matrix.component }}:${GITHUB_SHA} gcr.io/kf-feast/feast-${{ matrix.component }}:develop + docker push gcr.io/kf-feast/feast-${{ matrix.component }}:develop fi - name: Get version run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF#refs/*/} - - name: Push versioned release + - name: Push versioned Docker image run: | # Build and push semver tagged commits # Regular expression should match MAJOR.MINOR.PATCH[-PRERELEASE[.IDENTIFIER]] diff --git a/infra/scripts/validate-version-consistency.sh b/infra/scripts/validate-version-consistency.sh index 5a6bd90ed3..c6d0e9dd95 100755 --- a/infra/scripts/validate-version-consistency.sh +++ b/infra/scripts/validate-version-consistency.sh @@ -24,7 +24,7 @@ echo "Linting Maven version: $FEAST_MAVEN_VERSION" if [ $BRANCH_NAME = "master" ] then # Use development version - FEAST_DOCKER_VERSION="dev" + FEAST_DOCKER_VERSION="develop" elif echo "$BRANCH_NAME" | grep -P $RELEASE_BRANCH_REGEX &>/dev/null then # Use last release tag tagged on the release branch From 6c67443229aed7ec60a1c435acccb248734d4cdb Mon Sep 17 00:00:00 2001 From: Zhu Zhanyan Date: Thu, 10 Sep 2020 23:19:47 +0800 Subject: [PATCH 04/15] Update lint version script to only echo file contents when version is wrong. --- infra/scripts/validate-version-consistency.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/infra/scripts/validate-version-consistency.sh b/infra/scripts/validate-version-consistency.sh index c6d0e9dd95..d6c93a4516 100755 --- a/infra/scripts/validate-version-consistency.sh +++ b/infra/scripts/validate-version-consistency.sh @@ -102,15 +102,9 @@ for i in "${files_to_validate_version[@]}"; do continue fi - echo - echo - echo "Testing whether versions are correctly set within file: $FILE_PATH" - echo - echo "File contents:" echo "=========================================================" - cat "$FILE_PATH" + echo "Testing whether versions are correctly set within file: $FILE_PATH" echo - echo "=========================================================" ACTUAL_OCCURRENCES=$(grep -c -P "\bv?$VERSION\b" "$FILE_PATH" || true) if [ "${ACTUAL_OCCURRENCES}" -eq "${EXPECTED_OCCURRENCES}" ]; then @@ -120,8 +114,12 @@ for i in "${files_to_validate_version[@]}"; do else echo "FAILURE" echo + echo "File contents:" + echo "=========================================================" + cat "$FILE_PATH" + echo "=========================================================" + echo echo "Expecting $EXPECTED_OCCURRENCES occurrences of $VERSION in $FILE_PATH, but found $ACTUAL_OCCURRENCES" exit 1 fi - echo "=========================================================" done From 06047c0148747fc1e73e67095308d5cc52493cd3 Mon Sep 17 00:00:00 2001 From: Zhu Zhanyan Date: Thu, 10 Sep 2020 23:23:05 +0800 Subject: [PATCH 05/15] Update lint script to flag all failures instead of just one. --- infra/scripts/validate-version-consistency.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/infra/scripts/validate-version-consistency.sh b/infra/scripts/validate-version-consistency.sh index d6c93a4516..f643dc41d3 100755 --- a/infra/scripts/validate-version-consistency.sh +++ b/infra/scripts/validate-version-consistency.sh @@ -94,6 +94,8 @@ echo echo "Testing list of files to ensure they have the correct version" echo + +IS_LINT_SUCCESS=true for i in "${files_to_validate_version[@]}"; do IFS=',' read -r FILE_PATH EXPECTED_OCCURRENCES VERSION <<<"${i}" # Disable version lint if '_ANY' specified as version. @@ -120,6 +122,8 @@ for i in "${files_to_validate_version[@]}"; do echo "=========================================================" echo echo "Expecting $EXPECTED_OCCURRENCES occurrences of $VERSION in $FILE_PATH, but found $ACTUAL_OCCURRENCES" - exit 1 + IS_LINT_SUCCESS=false fi done + +if $IS_LINT_SUCCESS; then exit 0; else exit 1; fi From fb5dc44e7bb14056803b9991f2dace46d458e463 Mon Sep 17 00:00:00 2001 From: Zhu Zhanyan Date: Thu, 10 Sep 2020 23:23:31 +0800 Subject: [PATCH 06/15] Remove file contents output from lint version script. --- infra/scripts/validate-version-consistency.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/infra/scripts/validate-version-consistency.sh b/infra/scripts/validate-version-consistency.sh index f643dc41d3..1ff7c8d7ff 100755 --- a/infra/scripts/validate-version-consistency.sh +++ b/infra/scripts/validate-version-consistency.sh @@ -116,11 +116,6 @@ for i in "${files_to_validate_version[@]}"; do else echo "FAILURE" echo - echo "File contents:" - echo "=========================================================" - cat "$FILE_PATH" - echo "=========================================================" - echo echo "Expecting $EXPECTED_OCCURRENCES occurrences of $VERSION in $FILE_PATH, but found $ACTUAL_OCCURRENCES" IS_LINT_SUCCESS=false fi From c055f1340f4ea980b8b34d432d466e3631c704ea Mon Sep 17 00:00:00 2001 From: Zhu Zhanyan Date: Thu, 10 Sep 2020 23:25:28 +0800 Subject: [PATCH 07/15] Update lint version script to make output more concise and readable. --- infra/scripts/validate-version-consistency.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/infra/scripts/validate-version-consistency.sh b/infra/scripts/validate-version-consistency.sh index 1ff7c8d7ff..ab955cdadf 100755 --- a/infra/scripts/validate-version-consistency.sh +++ b/infra/scripts/validate-version-consistency.sh @@ -106,17 +106,12 @@ for i in "${files_to_validate_version[@]}"; do echo "=========================================================" echo "Testing whether versions are correctly set within file: $FILE_PATH" - echo ACTUAL_OCCURRENCES=$(grep -c -P "\bv?$VERSION\b" "$FILE_PATH" || true) if [ "${ACTUAL_OCCURRENCES}" -eq "${EXPECTED_OCCURRENCES}" ]; then - echo "SUCCESS" - echo - echo "Expecting $EXPECTED_OCCURRENCES occurrences of $VERSION in $FILE_PATH, and found $ACTUAL_OCCURRENCES" + echo "OK: Expecting $EXPECTED_OCCURRENCES occurrences of $VERSION in $FILE_PATH, and found $ACTUAL_OCCURRENCES" else - echo "FAILURE" - echo - echo "Expecting $EXPECTED_OCCURRENCES occurrences of $VERSION in $FILE_PATH, but found $ACTUAL_OCCURRENCES" + echo "FAIL: Expecting $EXPECTED_OCCURRENCES occurrences of $VERSION in $FILE_PATH, but found $ACTUAL_OCCURRENCES" IS_LINT_SUCCESS=false fi done From 6015b580eed949eda35b19b95c3c79d20f9360f3 Mon Sep 17 00:00:00 2001 From: Zhu Zhanyan Date: Thu, 10 Sep 2020 23:35:06 +0800 Subject: [PATCH 08/15] Use develop images instead of stable images in master deployments. --- infra/charts/feast/charts/feast-core/README.md | 2 +- infra/charts/feast/charts/feast-core/values.yaml | 2 +- .../charts/feast/charts/feast-jobcontroller/README.md | 2 +- .../feast/charts/feast-jobcontroller/values.yaml | 2 +- infra/charts/feast/charts/feast-jupyter/README.md | 2 +- infra/charts/feast/charts/feast-jupyter/values.yaml | 4 ++-- infra/charts/feast/charts/feast-serving/README.md | 2 +- infra/charts/feast/charts/feast-serving/values.yaml | 2 +- infra/charts/feast/requirements.lock | 8 ++++---- infra/docker-compose/.env.sample | 4 ++-- infra/scripts/validate-version-consistency.sh | 10 +++++++--- 11 files changed, 22 insertions(+), 18 deletions(-) diff --git a/infra/charts/feast/charts/feast-core/README.md b/infra/charts/feast/charts/feast-core/README.md index 36d963dd24..af9370dd72 100644 --- a/infra/charts/feast/charts/feast-core/README.md +++ b/infra/charts/feast/charts/feast-core/README.md @@ -23,7 +23,7 @@ Current chart version is `0.7-SNAPSHOT` | gcpServiceAccount.existingSecret.name | string | `"feast-gcp-service-account"` | Name of the existing secret containing the service account | | image.pullPolicy | string | `"IfNotPresent"` | Image pull policy | | image.repository | string | `"gcr.io/kf-feast/feast-core"` | Docker image repository | -| image.tag | string | `"0.6.2"` | Image tag | +| image.tag | string | `"develop"` | Image tag | | ingress.grpc.annotations | object | `{}` | Extra annotations for the ingress | | ingress.grpc.auth.enabled | bool | `false` | Flag to enable auth | | ingress.grpc.class | string | `"nginx"` | Which ingress controller to use | diff --git a/infra/charts/feast/charts/feast-core/values.yaml b/infra/charts/feast/charts/feast-core/values.yaml index e25dba9291..28ab8a1dee 100644 --- a/infra/charts/feast/charts/feast-core/values.yaml +++ b/infra/charts/feast/charts/feast-core/values.yaml @@ -5,7 +5,7 @@ image: # image.repository -- Docker image repository repository: gcr.io/kf-feast/feast-core # image.tag -- Image tag - tag: 0.6.2 + tag: develop # image.pullPolicy -- Image pull policy pullPolicy: IfNotPresent diff --git a/infra/charts/feast/charts/feast-jobcontroller/README.md b/infra/charts/feast/charts/feast-jobcontroller/README.md index 7c27fccedf..628a69f480 100644 --- a/infra/charts/feast/charts/feast-jobcontroller/README.md +++ b/infra/charts/feast/charts/feast-jobcontroller/README.md @@ -23,7 +23,7 @@ Current chart version is `0.7-SNAPSHOT` | gcpServiceAccount.existingSecret.name | string | `"feast-gcp-service-account"` | Name of the existing secret containing the service account | | image.pullPolicy | string | `"IfNotPresent"` | Image pull policy | | image.repository | string | `"gcr.io/kf-feast/feast-jobcontroller"` | Docker image repository | -| image.tag | string | `"0.6.2"` | Image tag | +| image.tag | string | `"develop"` | Image tag | | ingress.grpc.annotations | object | `{}` | Extra annotations for the ingress | | ingress.grpc.auth.enabled | bool | `false` | Flag to enable auth | | ingress.grpc.class | string | `"nginx"` | Which ingress controller to use | diff --git a/infra/charts/feast/charts/feast-jobcontroller/values.yaml b/infra/charts/feast/charts/feast-jobcontroller/values.yaml index bd4856ad54..f57c98032c 100644 --- a/infra/charts/feast/charts/feast-jobcontroller/values.yaml +++ b/infra/charts/feast/charts/feast-jobcontroller/values.yaml @@ -5,7 +5,7 @@ image: # image.repository -- Docker image repository repository: gcr.io/kf-feast/feast-jobcontroller # image.tag -- Image tag - tag: 0.6.2 + tag: develop # image.pullPolicy -- Image pull policy pullPolicy: IfNotPresent diff --git a/infra/charts/feast/charts/feast-jupyter/README.md b/infra/charts/feast/charts/feast-jupyter/README.md index c35da52d82..ec9567190d 100644 --- a/infra/charts/feast/charts/feast-jupyter/README.md +++ b/infra/charts/feast/charts/feast-jupyter/README.md @@ -17,5 +17,5 @@ Current chart version is `0.7-SNAPSHOT` | gcpServiceAccount.existingSecret.name | string | `"feast-gcp-service-account"` | Name of the existing secret containing the service account | | image.pullPolicy | string | `"Always"` | Image pull policy | | image.repository | string | `"gcr.io/kf-feast/feast-jupyter"` | Docker image repository | -| image.tag | string | `"0.6.2"` | Image tag | +| image.tag | string | `"develop"` | Image tag | | replicaCount | int | `1` | Number of pods that will be created | diff --git a/infra/charts/feast/charts/feast-jupyter/values.yaml b/infra/charts/feast/charts/feast-jupyter/values.yaml index 162bb9bf17..b4a42b0c18 100644 --- a/infra/charts/feast/charts/feast-jupyter/values.yaml +++ b/infra/charts/feast/charts/feast-jupyter/values.yaml @@ -5,7 +5,7 @@ image: # image.repository -- Docker image repository repository: gcr.io/kf-feast/feast-jupyter # image.tag -- Image tag - tag: 0.6.2 + tag: develop # image.pullPolicy -- Image pull policy pullPolicy: Always @@ -16,4 +16,4 @@ gcpServiceAccount: # gcpServiceAccount.existingSecret.name -- Name of the existing secret containing the service account name: feast-gcp-service-account # gcpServiceAccount.existingSecret.key -- Key in the secret data (file name of the service account) - key: credentials.json \ No newline at end of file + key: credentials.json diff --git a/infra/charts/feast/charts/feast-serving/README.md b/infra/charts/feast/charts/feast-serving/README.md index ad8862e174..16f39ef569 100644 --- a/infra/charts/feast/charts/feast-serving/README.md +++ b/infra/charts/feast/charts/feast-serving/README.md @@ -23,7 +23,7 @@ Current chart version is `0.7-SNAPSHOT` | gcpServiceAccount.existingSecret.name | string | `"feast-gcp-service-account"` | Name of the existing secret containing the service account | | image.pullPolicy | string | `"IfNotPresent"` | Image pull policy | | image.repository | string | `"gcr.io/kf-feast/feast-serving"` | Docker image repository | -| image.tag | string | `"0.6.2"` | Image tag | +| image.tag | string | `"develop"` | Image tag | | ingress.grpc.annotations | object | `{}` | Extra annotations for the ingress | | ingress.grpc.auth.enabled | bool | `false` | Flag to enable auth | | ingress.grpc.class | string | `"nginx"` | Which ingress controller to use | diff --git a/infra/charts/feast/charts/feast-serving/values.yaml b/infra/charts/feast/charts/feast-serving/values.yaml index 220588156e..6343f4432b 100644 --- a/infra/charts/feast/charts/feast-serving/values.yaml +++ b/infra/charts/feast/charts/feast-serving/values.yaml @@ -5,7 +5,7 @@ image: # image.repository -- Docker image repository repository: gcr.io/kf-feast/feast-serving # image.tag -- Image tag - tag: 0.6.2 + tag: develop # image.pullPolicy -- Image pull policy pullPolicy: IfNotPresent diff --git a/infra/charts/feast/requirements.lock b/infra/charts/feast/requirements.lock index 884e4c7527..9844cc048c 100644 --- a/infra/charts/feast/requirements.lock +++ b/infra/charts/feast/requirements.lock @@ -1,16 +1,16 @@ dependencies: - name: feast-core repository: "" - version: 0.6.2 + version: 0.7-SNAPSHOT - name: feast-serving repository: "" - version: 0.6.2 + version: 0.7-SNAPSHOT - name: feast-serving repository: "" - version: 0.6.2 + version: 0.7-SNAPSHOT - name: feast-jupyter repository: "" - version: 0.6.2 + version: 0.7-SNAPSHOT - name: postgresql repository: https://kubernetes-charts.storage.googleapis.com/ version: 8.6.1 diff --git a/infra/docker-compose/.env.sample b/infra/docker-compose/.env.sample index 4dcca0b60e..e984460f8b 100644 --- a/infra/docker-compose/.env.sample +++ b/infra/docker-compose/.env.sample @@ -1,8 +1,8 @@ COMPOSE_PROJECT_NAME=feast -FEAST_VERSION=0.6.2 +FEAST_VERSION=develop GCP_SERVICE_ACCOUNT=./gcp-service-accounts/key.json FEAST_CORE_CONFIG=./core/core.yml FEAST_JOB_CONTROLLER_CONFIG=./jobcontroller/jobcontroller.yml FEAST_HISTORICAL_SERVING_CONFIG=./serving/historical-serving.yml FEAST_HISTORICAL_SERVING_ENABLED=false -FEAST_ONLINE_SERVING_CONFIG=./serving/online-serving.yml \ No newline at end of file +FEAST_ONLINE_SERVING_CONFIG=./serving/online-serving.yml diff --git a/infra/scripts/validate-version-consistency.sh b/infra/scripts/validate-version-consistency.sh index ab955cdadf..fad31a47e6 100755 --- a/infra/scripts/validate-version-consistency.sh +++ b/infra/scripts/validate-version-consistency.sh @@ -75,18 +75,22 @@ declare -a files_to_validate_version=( "infra/charts/feast/Chart.yaml,1,${FEAST_MAVEN_VERSION}" "infra/charts/feast/charts/feast-core/Chart.yaml,1,${FEAST_MAVEN_VERSION}" "infra/charts/feast/charts/feast-core/values.yaml,1,${FEAST_DOCKER_VERSION}" + "infra/charts/feast/charts/feast-core/README.md,1,${FEAST_MAVEN_VERSION}" "infra/charts/feast/charts/feast-core/README.md,1,${FEAST_DOCKER_VERSION}" "infra/charts/feast/charts/feast-serving/Chart.yaml,1,${FEAST_MAVEN_VERSION}" "infra/charts/feast/charts/feast-jupyter/values.yaml,1,${FEAST_DOCKER_VERSION}" "infra/charts/feast/charts/feast-jupyter/README.md,1,${FEAST_DOCKER_VERSION}" + "infra/charts/feast/charts/feast-jupyter/README.md,1,${FEAST_MAVEN_VERSION}" "infra/charts/feast/charts/feast-jupyter/Chart.yaml,1,${FEAST_MAVEN_VERSION}" "infra/charts/feast/charts/feast-serving/values.yaml,1,${FEAST_DOCKER_VERSION}" "infra/charts/feast/charts/feast-serving/README.md,1,${FEAST_DOCKER_VERSION}" + "infra/charts/feast/charts/feast-serving/README.md,1,${FEAST_MAVEN_VERSION}" "infra/charts/feast/charts/feast-jobcontroller/Chart.yaml,1,${FEAST_MAVEN_VERSION}" "infra/charts/feast/charts/feast-jobcontroller/values.yaml,1,${FEAST_DOCKER_VERSION}" + "infra/charts/feast/charts/feast-jobcontroller/README.md,1,${FEAST_MAVEN_VERSION}" "infra/charts/feast/charts/feast-jobcontroller/README.md,1,${FEAST_DOCKER_VERSION}" "infra/charts/feast/requirements.yaml,4,${FEAST_MAVEN_VERSION}" - "infra/charts/feast/requirements.lock,4,${FEAST_DOCKER_VERSION}" + "infra/charts/feast/requirements.lock,4,${FEAST_MAVEN_VERSION}" "infra/docker-compose/.env.sample,1,${FEAST_DOCKER_VERSION}" ) @@ -109,9 +113,9 @@ for i in "${files_to_validate_version[@]}"; do ACTUAL_OCCURRENCES=$(grep -c -P "\bv?$VERSION\b" "$FILE_PATH" || true) if [ "${ACTUAL_OCCURRENCES}" -eq "${EXPECTED_OCCURRENCES}" ]; then - echo "OK: Expecting $EXPECTED_OCCURRENCES occurrences of $VERSION in $FILE_PATH, and found $ACTUAL_OCCURRENCES" + echo "OK: Expecting $EXPECTED_OCCURRENCES occurrences of '$VERSION' in $FILE_PATH, and found $ACTUAL_OCCURRENCES" else - echo "FAIL: Expecting $EXPECTED_OCCURRENCES occurrences of $VERSION in $FILE_PATH, but found $ACTUAL_OCCURRENCES" + echo "FAIL: Expecting $EXPECTED_OCCURRENCES occurrences of '$VERSION' in $FILE_PATH, but found $ACTUAL_OCCURRENCES" IS_LINT_SUCCESS=false fi done From 724d8b58489f86c3f0a8c7d4961e247e4f2a458c Mon Sep 17 00:00:00 2001 From: Zhu Zhanyan Date: Thu, 10 Sep 2020 23:38:03 +0800 Subject: [PATCH 09/15] Update outdated documentation in serving readme. --- serving/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serving/README.md b/serving/README.md index 39eef31103..ab530bb60d 100644 --- a/serving/README.md +++ b/serving/README.md @@ -11,8 +11,8 @@ From the Feast project root directory, run the following Maven command to start ```bash # Assumptions: # - Local Feast Core is running on localhost:6565 +# Uses configuration from serving/src/main/resources/application.yml mvn -pl serving spring-boot:run -Dspring-boot.run.arguments=\ ---feast.store.config-path=./sample_redis_config.yml,\ --feast.core-host=localhost,\ --feast.core-port=6565 ``` From b5cba7ecac40c79017f9b432dafd0303424325f0 Mon Sep 17 00:00:00 2001 From: Zhu Zhanyan Date: Thu, 10 Sep 2020 23:39:52 +0800 Subject: [PATCH 10/15] Fix outdated version in datatypes java README.md and add version lint check. --- datatypes/java/README.md | 2 +- infra/scripts/validate-version-consistency.sh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/datatypes/java/README.md b/datatypes/java/README.md index f87a50f1bd..5a5deb0429 100644 --- a/datatypes/java/README.md +++ b/datatypes/java/README.md @@ -16,7 +16,7 @@ Dependency Coordinates dev.feast datatypes-java - 0.4.0-SNAPSHOT + 0.7-SNAPSHOT ``` diff --git a/infra/scripts/validate-version-consistency.sh b/infra/scripts/validate-version-consistency.sh index fad31a47e6..eb1eb51b5c 100755 --- a/infra/scripts/validate-version-consistency.sh +++ b/infra/scripts/validate-version-consistency.sh @@ -5,7 +5,8 @@ # - Docker images version: 'dev' on master, Highest tag on release branches # - Release version: Highest stable commit. Latest tag repo wide, release candidates not included # Usage: ./validate-version-consistency.sh -# Optionaly set TARGET_MERGE_BRANCH var to the target merge branch to lint against the given merge branch. +# Optionaly set TARGET_MERGE_BRANCH var to the target merge branch to lint +# versions against the given merge branch. set -e BRANCH_NAME=${TARGET_MERGE_BRANCH-$(git rev-parse --abbrev-ref HEAD)} @@ -92,6 +93,7 @@ declare -a files_to_validate_version=( "infra/charts/feast/requirements.yaml,4,${FEAST_MAVEN_VERSION}" "infra/charts/feast/requirements.lock,4,${FEAST_MAVEN_VERSION}" "infra/docker-compose/.env.sample,1,${FEAST_DOCKER_VERSION}" + "datatypes/java/README.md,1,${FEAST_MAVEN_VERSION}" ) echo From 34be3b5a2386ab5cfc0abb60d3faae1fbb35d775 Mon Sep 17 00:00:00 2001 From: Zhu Zhanyan Date: Fri, 11 Sep 2020 00:05:02 +0800 Subject: [PATCH 11/15] Add version lint checks to documentation. --- docs/contributing/development-guide.md | 2 +- infra/scripts/validate-version-consistency.sh | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/contributing/development-guide.md b/docs/contributing/development-guide.md index e71c91d00a..2463fa4810 100644 --- a/docs/contributing/development-guide.md +++ b/docs/contributing/development-guide.md @@ -210,7 +210,7 @@ grpc_cli call localhost:6566 GetFeastServingInfo '' ```text connecting to localhost:6566 -version: "0.6.2-SNAPSHOT" +version: "0.7-SNAPSHOT" type: FEAST_SERVING_TYPE_ONLINE Rpc succeeded with OK status diff --git a/infra/scripts/validate-version-consistency.sh b/infra/scripts/validate-version-consistency.sh index eb1eb51b5c..b6b8264285 100755 --- a/infra/scripts/validate-version-consistency.sh +++ b/infra/scripts/validate-version-consistency.sh @@ -94,6 +94,11 @@ declare -a files_to_validate_version=( "infra/charts/feast/requirements.lock,4,${FEAST_MAVEN_VERSION}" "infra/docker-compose/.env.sample,1,${FEAST_DOCKER_VERSION}" "datatypes/java/README.md,1,${FEAST_MAVEN_VERSION}" + "docs/contributing/development-guide.md,4,${FEAST_MAVEN_VERSION}" + "docs/administration/audit-logging.md,1,${FEAST_STABLE_VERSION}" + "docs/getting-started/deploying-feast/docker-compose.md,1,${FEAST_STABLE_VERSION}" + "docs/getting-started/deploying-feast/kubernetes.md,1,${FEAST_STABLE_VERSION}" + "README.md,1,${FEAST_STABLE_VERSION}" ) echo From 7e547f0ec57d212c4fa9c8c9674bbb8e232f78ad Mon Sep 17 00:00:00 2001 From: Zhu Zhanyan Date: Fri, 11 Sep 2020 00:09:12 +0800 Subject: [PATCH 12/15] Fix semver regex in github actions workflow not matching suffixless version tags. --- .github/workflows/master_only.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/master_only.yml b/.github/workflows/master_only.yml index cda2a55d81..edbcacceea 100644 --- a/.github/workflows/master_only.yml +++ b/.github/workflows/master_only.yml @@ -44,8 +44,8 @@ jobs: # Build and push semver tagged commits # Regular expression should match MAJOR.MINOR.PATCH[-PRERELEASE[.IDENTIFIER]] # eg. v0.7.1 v0.7.2-alpha v0.7.2-rc.1 - rx='^v([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))$ ' - if echo "${RELEASE_VERSION}" | grep -P "$rx" &>/dev/null ; then + SEMVER_REGEX='^v[0-9]+\.[0-9]+\.[0-9]+(-([0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?$' + if echo "${RELEASE_VERSION}" | grep -P "$SEMVER_REGEX" &>/dev/null ; then VERSION_WITHOUT_PREFIX=${RELEASE_VERSION:1} docker tag gcr.io/kf-feast/feast-${{ matrix.component }}:${GITHUB_SHA} gcr.io/kf-feast/feast-${{ matrix.component }}:${VERSION_WITHOUT_PREFIX} From 7f412f18ac6e27e512005861787a351d6de8fcbe Mon Sep 17 00:00:00 2001 From: Zhu Zhanyan Date: Fri, 11 Sep 2020 09:57:41 +0800 Subject: [PATCH 13/15] Add version lint check for latest stable version in changelog. --- infra/scripts/validate-version-consistency.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/infra/scripts/validate-version-consistency.sh b/infra/scripts/validate-version-consistency.sh index b6b8264285..6872af5455 100755 --- a/infra/scripts/validate-version-consistency.sh +++ b/infra/scripts/validate-version-consistency.sh @@ -99,6 +99,7 @@ declare -a files_to_validate_version=( "docs/getting-started/deploying-feast/docker-compose.md,1,${FEAST_STABLE_VERSION}" "docs/getting-started/deploying-feast/kubernetes.md,1,${FEAST_STABLE_VERSION}" "README.md,1,${FEAST_STABLE_VERSION}" + "CHANGELOG.md,2,${FEAST_STABLE_VERSION}" ) echo From 8b57dd8dd751feffb68d418076517874d88e314a Mon Sep 17 00:00:00 2001 From: Zhu Zhanyan Date: Fri, 11 Sep 2020 13:37:23 +0800 Subject: [PATCH 14/15] Update lint-version script use tool agnostic variable names. --- infra/scripts/validate-version-consistency.sh | 77 +++++++++---------- 1 file changed, 38 insertions(+), 39 deletions(-) diff --git a/infra/scripts/validate-version-consistency.sh b/infra/scripts/validate-version-consistency.sh index 6872af5455..5e311bad68 100755 --- a/infra/scripts/validate-version-consistency.sh +++ b/infra/scripts/validate-version-consistency.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash # This script will scan through a list of files to validate that all versions are consistent with -# - master version: (could be snapshot) -# - Docker images version: 'dev' on master, Highest tag on release branches -# - Release version: Highest stable commit. Latest tag repo wide, release candidates not included +# - Master version: version set in maven (could be snapshot) +# - Release version: 'dev' on master, Lastest tag on release branches. +# - Stable Version: Highest stable tag. release candidates not included. # Usage: ./validate-version-consistency.sh # Optionaly set TARGET_MERGE_BRANCH var to the target merge branch to lint # versions against the given merge branch. @@ -14,36 +14,35 @@ BRANCH_NAME=${TARGET_MERGE_BRANCH-$(git rev-parse --abbrev-ref HEAD)} RELEASE_BRANCH_REGEX="^v[0-9]+\.[0-9]+-branch$" # Determine the current Feast version from Maven (pom.xml) -export FEAST_MAVEN_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) -[[ -z "$FEAST_MAVEN_VERSION" ]] && { - echo "$FEAST_MAVEN_VERSION is missing, please check pom.xml and maven" +export FEAST_MASTER_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) +[[ -z "$FEAST_MASTER_VERSION" ]] && { + echo "$FEAST_MASTER_VERSION is missing, please check pom.xml and maven" exit 1 } -echo "Linting Maven version: $FEAST_MAVEN_VERSION" +echo "Linting master version: $FEAST_MASTER_VERSION" -# Determine Docker image version tag relative to current branch +# Determine Last release tag relative to current branch if [ $BRANCH_NAME = "master" ] then # Use development version - FEAST_DOCKER_VERSION="develop" + FEAST_RELEASE_VERSION="develop" elif echo "$BRANCH_NAME" | grep -P $RELEASE_BRANCH_REGEX &>/dev/null then # Use last release tag tagged on the release branch LAST_MERGED_TAG=$(git tag -l --sort -version:refname --merged | head -n 1) - FEAST_DOCKER_VERSION=${LAST_MERGED_TAG#"v"} + FEAST_MASTER_VERSION=${LAST_MERGED_TAG#"v"} else - # Do not enforce version linting as we don't know if the target merge branch - FEAST_DOCKER_VERSION="_ANY" + # Do not enforce version linting as we don't know if the target merge branch FEAST_RELEASE_VERSION="_ANY" echo "WARNING: Skipping docker version lint" fi -[[ -z "$FEAST_DOCKER_VERSION" ]] && { - echo "FEAST_DOCKER_VERSION is missing" +[[ -z "$FEAST_RELEASE_VERSION" ]] && { + echo "FEAST_RELEASE_VERSION is missing" exit 1 } -export FEAST_DOCKER_VERSION -echo "Linting docker image version: $FEAST_DOCKER_VERSION" +export FEAST_RELEASE_VERSION +echo "Linting docker image version: $FEAST_RELEASE_VERSION" -# Determine highest stable version relative to current branch +# Determine highest stable version (no release candidates) relative to current branch. # Regular expression for matching stable tags in the format vMAJOR.MINOR.PATCH STABLE_TAG_REGEX="^v[0-9]+\.[0-9]+\.[0-9]+$" if [ $BRANCH_NAME = "master" ] @@ -73,28 +72,28 @@ echo "Linting stable version: $FEAST_STABLE_VERSION" # , , declare -a files_to_validate_version=( - "infra/charts/feast/Chart.yaml,1,${FEAST_MAVEN_VERSION}" - "infra/charts/feast/charts/feast-core/Chart.yaml,1,${FEAST_MAVEN_VERSION}" - "infra/charts/feast/charts/feast-core/values.yaml,1,${FEAST_DOCKER_VERSION}" - "infra/charts/feast/charts/feast-core/README.md,1,${FEAST_MAVEN_VERSION}" - "infra/charts/feast/charts/feast-core/README.md,1,${FEAST_DOCKER_VERSION}" - "infra/charts/feast/charts/feast-serving/Chart.yaml,1,${FEAST_MAVEN_VERSION}" - "infra/charts/feast/charts/feast-jupyter/values.yaml,1,${FEAST_DOCKER_VERSION}" - "infra/charts/feast/charts/feast-jupyter/README.md,1,${FEAST_DOCKER_VERSION}" - "infra/charts/feast/charts/feast-jupyter/README.md,1,${FEAST_MAVEN_VERSION}" - "infra/charts/feast/charts/feast-jupyter/Chart.yaml,1,${FEAST_MAVEN_VERSION}" - "infra/charts/feast/charts/feast-serving/values.yaml,1,${FEAST_DOCKER_VERSION}" - "infra/charts/feast/charts/feast-serving/README.md,1,${FEAST_DOCKER_VERSION}" - "infra/charts/feast/charts/feast-serving/README.md,1,${FEAST_MAVEN_VERSION}" - "infra/charts/feast/charts/feast-jobcontroller/Chart.yaml,1,${FEAST_MAVEN_VERSION}" - "infra/charts/feast/charts/feast-jobcontroller/values.yaml,1,${FEAST_DOCKER_VERSION}" - "infra/charts/feast/charts/feast-jobcontroller/README.md,1,${FEAST_MAVEN_VERSION}" - "infra/charts/feast/charts/feast-jobcontroller/README.md,1,${FEAST_DOCKER_VERSION}" - "infra/charts/feast/requirements.yaml,4,${FEAST_MAVEN_VERSION}" - "infra/charts/feast/requirements.lock,4,${FEAST_MAVEN_VERSION}" - "infra/docker-compose/.env.sample,1,${FEAST_DOCKER_VERSION}" - "datatypes/java/README.md,1,${FEAST_MAVEN_VERSION}" - "docs/contributing/development-guide.md,4,${FEAST_MAVEN_VERSION}" + "infra/charts/feast/Chart.yaml,1,${FEAST_MASTER_VERSION}" + "infra/charts/feast/charts/feast-core/Chart.yaml,1,${FEAST_MASTER_VERSION}" + "infra/charts/feast/charts/feast-core/values.yaml,1,${FEAST_RELEASE_VERSION}" + "infra/charts/feast/charts/feast-core/README.md,1,${FEAST_MASTER_VERSION}" + "infra/charts/feast/charts/feast-core/README.md,1,${FEAST_RELEASE_VERSION}" + "infra/charts/feast/charts/feast-serving/Chart.yaml,1,${FEAST_MASTER_VERSION}" + "infra/charts/feast/charts/feast-jupyter/values.yaml,1,${FEAST_RELEASE_VERSION}" + "infra/charts/feast/charts/feast-jupyter/README.md,1,${FEAST_RELEASE_VERSION}" + "infra/charts/feast/charts/feast-jupyter/README.md,1,${FEAST_MASTER_VERSION}" + "infra/charts/feast/charts/feast-jupyter/Chart.yaml,1,${FEAST_MASTER_VERSION}" + "infra/charts/feast/charts/feast-serving/values.yaml,1,${FEAST_RELEASE_VERSION}" + "infra/charts/feast/charts/feast-serving/README.md,1,${FEAST_RELEASE_VERSION}" + "infra/charts/feast/charts/feast-serving/README.md,1,${FEAST_MASTER_VERSION}" + "infra/charts/feast/charts/feast-jobcontroller/Chart.yaml,1,${FEAST_MASTER_VERSION}" + "infra/charts/feast/charts/feast-jobcontroller/values.yaml,1,${FEAST_RELEASE_VERSION}" + "infra/charts/feast/charts/feast-jobcontroller/README.md,1,${FEAST_MASTER_VERSION}" + "infra/charts/feast/charts/feast-jobcontroller/README.md,1,${FEAST_RELEASE_VERSION}" + "infra/charts/feast/requirements.yaml,4,${FEAST_MASTER_VERSION}" + "infra/charts/feast/requirements.lock,4,${FEAST_MASTER_VERSION}" + "infra/docker-compose/.env.sample,1,${FEAST_RELEASE_VERSION}" + "datatypes/java/README.md,1,${FEAST_MASTER_VERSION}" + "docs/contributing/development-guide.md,4,${FEAST_MASTER_VERSION}" "docs/administration/audit-logging.md,1,${FEAST_STABLE_VERSION}" "docs/getting-started/deploying-feast/docker-compose.md,1,${FEAST_STABLE_VERSION}" "docs/getting-started/deploying-feast/kubernetes.md,1,${FEAST_STABLE_VERSION}" From 4aa062ef35595f4055e0d5bb6e2c8cf2fa0a92f9 Mon Sep 17 00:00:00 2001 From: Zhu Zhanyan Date: Fri, 11 Sep 2020 13:50:23 +0800 Subject: [PATCH 15/15] Fix typo. --- infra/scripts/validate-version-consistency.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/infra/scripts/validate-version-consistency.sh b/infra/scripts/validate-version-consistency.sh index 5e311bad68..2bb019dc8a 100755 --- a/infra/scripts/validate-version-consistency.sh +++ b/infra/scripts/validate-version-consistency.sh @@ -19,7 +19,7 @@ export FEAST_MASTER_VERSION=$(mvn help:evaluate -Dexpression=project.version -q echo "$FEAST_MASTER_VERSION is missing, please check pom.xml and maven" exit 1 } -echo "Linting master version: $FEAST_MASTER_VERSION" +echo "Linting Master Version: $FEAST_MASTER_VERSION" # Determine Last release tag relative to current branch if [ $BRANCH_NAME = "master" ] @@ -33,6 +33,7 @@ then FEAST_MASTER_VERSION=${LAST_MERGED_TAG#"v"} else # Do not enforce version linting as we don't know if the target merge branch FEAST_RELEASE_VERSION="_ANY" + FEAST_RELEASE_VERSION="_ANY" echo "WARNING: Skipping docker version lint" fi [[ -z "$FEAST_RELEASE_VERSION" ]] && { @@ -40,7 +41,7 @@ fi exit 1 } export FEAST_RELEASE_VERSION -echo "Linting docker image version: $FEAST_RELEASE_VERSION" +echo "Linting Release Version: $FEAST_RELEASE_VERSION" # Determine highest stable version (no release candidates) relative to current branch. # Regular expression for matching stable tags in the format vMAJOR.MINOR.PATCH @@ -65,7 +66,7 @@ fi exit 1 } export FEAST_STABLE_VERSION -echo "Linting stable version: $FEAST_STABLE_VERSION" +echo "Linting Stable Version: $FEAST_STABLE_VERSION" # List of files to validate with master version (from pom.xml) # Structure is a comma separated list of structure