diff --git a/.github/workflows/complete.yml b/.github/workflows/complete.yml index 3af67038740..145bab5ed53 100644 --- a/.github/workflows/complete.yml +++ b/.github/workflows/complete.yml @@ -69,7 +69,7 @@ jobs: runs-on: [ubuntu-latest] steps: - uses: actions/checkout@v2 - - name: install dependencies + - name: Lint versions throughout repo run: make lint-versions unit-test-java: diff --git a/infra/charts/feast/README.md b/infra/charts/feast/README.md index 2336ce6f43d..703e5779d37 100644 --- a/infra/charts/feast/README.md +++ b/infra/charts/feast/README.md @@ -281,7 +281,6 @@ feast-batch-serving: staging_location: gs:///feast-staging-location initial_retry_delay_seconds: 3 total_timeout_seconds: 21600 - write_triggering_frequency_seconds: 600 subscriptions: - name: "*" project: "*" diff --git a/infra/charts/feast/charts/feast-core/README.md b/infra/charts/feast/charts/feast-core/README.md index 5db571bd236..01fd3a84331 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 | `"latest"` | Image tag | +| image.tag | string | `"0.6.2"` | 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 25fee869155..e25dba9291c 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: latest + tag: 0.6.2 # 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 62703d8429a..c35da52d824 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 | `"latest"` | Image tag | +| image.tag | string | `"0.6.2"` | 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 baa31125301..162bb9bf17f 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: latest + tag: 0.6.2 # image.pullPolicy -- Image pull policy pullPolicy: Always diff --git a/infra/charts/feast/charts/feast-serving/README.md b/infra/charts/feast/charts/feast-serving/README.md index cbf1cbe120b..ad8862e1743 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 | `"latest"` | Image tag | +| image.tag | string | `"0.6.2"` | 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 0bc845a7143..220588156ee 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: latest + tag: 0.6.2 # image.pullPolicy -- Image pull policy pullPolicy: IfNotPresent diff --git a/infra/charts/feast/requirements.lock b/infra/charts/feast/requirements.lock index addc69395dd..884e4c75270 100644 --- a/infra/charts/feast/requirements.lock +++ b/infra/charts/feast/requirements.lock @@ -1,16 +1,16 @@ dependencies: - name: feast-core repository: "" - version: 0.5.1 + version: 0.6.2 - name: feast-serving repository: "" - version: 0.5.1 + version: 0.6.2 - name: feast-serving repository: "" - version: 0.5.1 + version: 0.6.2 - name: feast-jupyter repository: "" - version: 0.5.1 + version: 0.6.2 - name: postgresql repository: https://kubernetes-charts.storage.googleapis.com/ version: 8.6.1 diff --git a/infra/scripts/validate-version-consistency.sh b/infra/scripts/validate-version-consistency.sh index 0ae449ac318..6f9786b207e 100755 --- a/infra/scripts/validate-version-consistency.sh +++ b/infra/scripts/validate-version-consistency.sh @@ -1,17 +1,10 @@ #!/usr/bin/env bash -# This script will scan through a list of files to validate that all versions are consistent with the master version +# 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) set -e -# List of files to validate -declare -a files_to_validate=( - "infra/charts/feast/Chart.yaml" - "infra/charts/feast/charts/feast-core/Chart.yaml" - "infra/charts/feast/charts/feast-serving/Chart.yaml" - "infra/charts/feast/charts/feast-jupyter/Chart.yaml" - "infra/charts/feast/requirements.yaml" # We are only testing for the version once -) - # 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" ]] && { @@ -19,20 +12,66 @@ export FEAST_MASTER_VERSION=$(mvn help:evaluate -Dexpression=project.version -q exit 1 } +# 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 + +[[ -z "$FEAST_RELEASE_VERSION" ]] && { + echo "FEAST_RELEASE_VERSION is missing" + exit 1 +} + +# 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_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/requirements.yaml,4,${FEAST_MASTER_VERSION}" + "infra/charts/feast/requirements.lock,4,${FEAST_RELEASE_VERSION}" + "infra/docker-compose/.env.sample,1,${FEAST_RELEASE_VERSION}" +) + echo -echo "Testing list of files to ensure they have the following version $FEAST_MASTER_VERSION" +echo "Testing list of files to ensure they have the correct version" echo -for i in "${files_to_validate[@]}"; do +for i in "${files_to_validate_version[@]}"; do + IFS=',' read -r FILE_PATH EXPECTED_OCCURRENCES VERSION <<<"${i}" echo echo - echo "Testing whether versions are correctly set within file: $i" + echo "Testing whether versions are correctly set within file: $FILE_PATH" echo echo "File contents:" echo "=========================================================" - cat "$i" + cat "$FILE_PATH" + echo echo "=========================================================" - grep -q "$FEAST_MASTER_VERSION" "$i" - echo "SUCCESS: Version found" + ACTUAL_OCCURRENCES=$(grep -c "$VERSION" "$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" + else + echo "FAILURE" + echo + echo "Expecting $EXPECTED_OCCURRENCES occurrences of $VERSION in $FILE_PATH, but found $ACTUAL_OCCURRENCES" + exit 1 + fi echo "=========================================================" -done \ No newline at end of file +done