Skip to content
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

Add Branch and RC Awareness to Version Lint & Fix Semver Regex #998

Merged
merged 15 commits into from
Sep 11, 2020
Merged

Add Branch and RC Awareness to Version Lint & Fix Semver Regex #998

merged 15 commits into from
Sep 11, 2020

Conversation

mrzzy
Copy link
Collaborator

@mrzzy mrzzy commented Sep 10, 2020

Why we need it:
Currently the Feast deployments (helm, docker-compose) reference runs the last release version in the current master's infra.

Currently version lint will fail on master when a new release candidate in tagged in a vX.Y-branch release branch

What this PR does:
Updates version lint script to become branch aware:

  • Version lint script now lints for 3 kinds of versions:
    • Maven version: Feast version set in maven.
    • Docker version: Docker image version tag to use in deployments.
      • uses develop on master, versioned tag on vX.Y-branch release branches.
    • Release version: Stable release version without release candidates.
      • uses repo wide latest stable version on master.
      • uses last stable version tag on release branch.

Changes docker images used in master branch to develop

  • Previously images used latest version.
  • Rename dev docker image tag to develop to make it possible to lint (as implementation relies on counting references.)

Improve version lint coverage to some docs with version:

  • Update outdated info in docs.

Fixed bad regex introduced in #994 where it did not match version tag without prerelease suffix:

  • fixes issue where regex matches v0.7.1-rc.1 properly but not v0.7.1

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

Feast k8s/docker-compose deployments on master now run the `develop` Feast image instead of latest release version.

@mrzzy
Copy link
Collaborator Author

mrzzy commented Sep 11, 2020

/hold

@mrzzy
Copy link
Collaborator Author

mrzzy commented Sep 11, 2020

/unhold

@mrzzy
Copy link
Collaborator Author

mrzzy commented Sep 11, 2020

/test test-end-to-end-redis-cluster

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)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--merged would ensure lint-version will to work if user checks out a specific commit in a vX.Y-branch release branch as it only lists tags reachable from HEAD.

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)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break if the user tries to lint-version when checking out a specific commit in master as it does not take tag date into account.

@mrzzy
Copy link
Collaborator Author

mrzzy commented Sep 11, 2020

/retest

@feast-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: khorshuheng, mrzzy

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@khorshuheng
Copy link
Collaborator

/lgtm

@mrzzy
Copy link
Collaborator Author

mrzzy commented Sep 11, 2020

/test test-end-to-end-batch-dataflow

1 similar comment
@mrzzy
Copy link
Collaborator Author

mrzzy commented Sep 11, 2020

/test test-end-to-end-batch-dataflow

@feast-ci-bot feast-ci-bot merged commit 7fa3b07 into feast-dev:master Sep 11, 2020
mrzzy added a commit that referenced this pull request Sep 11, 2020
…ex (#998)

* Update version lint script to detect maven, docker image and stable version .

* Allow users to lint versions against their merge branch of choice by branch TARGET_MERGE_BRANCH

* Update development image tag version from 'dev' to 'develop' to make it easier to lint version.

* Update lint version script to only echo file contents when version is wrong.

* Update lint script to flag all failures instead of just one.

* Remove file contents output from lint version script.

* Update lint version script to make output more concise and readable.

* Use develop images instead of stable images in master deployments.

* Update outdated documentation in serving readme.

* Fix outdated version in datatypes java README.md and add version lint check.

* Add version lint checks to documentation.

* Fix semver regex in github actions workflow not matching suffixless version tags.

* Add version lint check for latest stable version in changelog.

* Update lint-version script use tool agnostic variable names.

* Fix typo.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants