Skip to content

Commit

Permalink
Fix java_release workflow by removing step without users/with (#2067)
Browse files Browse the repository at this point in the history
* Fix java_release workflow by removing step without users/with

Signed-off-by: Achal Shah <achals@gmail.com>

* Fix java unit tests

Signed-off-by: Achal Shah <achals@gmail.com>

* Fix java unit tests

Signed-off-by: Achal Shah <achals@gmail.com>
  • Loading branch information
achals authored Nov 19, 2021
1 parent 680a489 commit f2f5dc6
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 8 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/java_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
# pull_request_target runs the workflow in the context of the base repo
# as such actions/checkout needs to be explicit configured to retrieve
# code from the PR.
ref: refs/pull/${{ github.event.pull_request.number }}/merge
submodules: recursive
- name: Lint java
run: make lint-java

Expand All @@ -23,7 +27,11 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
# pull_request_target runs the workflow in the context of the base repo
# as such actions/checkout needs to be explicit configured to retrieve
# code from the PR.
ref: refs/pull/${{ github.event.pull_request.number }}/merge
submodules: recursive
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
Expand Down Expand Up @@ -52,7 +60,11 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
# pull_request_target runs the workflow in the context of the base repo
# as such actions/checkout needs to be explicit configured to retrieve
# code from the PR.
ref: refs/pull/${{ github.event.pull_request.number }}/merge
submodules: recursive
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/java_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,22 +77,29 @@ jobs:
infra/scripts/download-maven-cache.sh \
--archive-uri ${MAVEN_CACHE} \
--output-dir .
- name: Build and push versioned images
- name: Build image
run: make build-${{ matrix.component }}-docker REGISTRY=${REGISTRY} VERSION=${RELEASE_VERSION}
env:
RELEASE_VERSION: ${{ needs.get-version.outputs.release_version }}
VERSION_WITHOUT_PREFIX: ${{ needs.get-version.outputs.version_without_prefix }}
HIGHEST_SEMVER_TAG: ${{ needs.get-version.outputs.highest_semver_tag }}
- name: Build image
run: make build-${{ matrix.component }}-docker REGISTRY=${REGISTRY} VERSION=${RELEASE_VERSION}
- name: Push image
run: make push-${{ matrix.component }}-docker REGISTRY=${REGISTRY} VERSION=${RELEASE_VERSION}
env:
RELEASE_VERSION: ${{ needs.get-version.outputs.release_version }}
VERSION_WITHOUT_PREFIX: ${{ needs.get-version.outputs.version_without_prefix }}
HIGHEST_SEMVER_TAG: ${{ needs.get-version.outputs.highest_semver_tag }}
- run: |
echo "Only push to latest tag if tag is the highest semver version $HIGHEST_SEMVER_TAG"
if [ "${VERSION_WITHOUT_PREFIX}" = "${HIGHEST_SEMVER_TAG:1}" ]
then
docker tag ${REGISTRY}/${{ matrix.component }}:${VERSION_WITHOUT_PREFIX} ${REGISTRY}/${{ matrix.component }}:latest
docker push ${REGISTRY}/${{ matrix.component }}:latest
fi
env:
RELEASE_VERSION: ${{ needs.get-version.outputs.release_version }}
VERSION_WITHOUT_PREFIX: ${{ needs.get-version.outputs.version_without_prefix }}
HIGHEST_SEMVER_TAG: ${{ needs.get-version.outputs.highest_semver_tag }}
publish-java-sdk:
container: maven:3.6-jdk-11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import com.google.cloud.storage.StorageOptions;
import feast.serving.registry.*;
import java.net.URI;
import java.nio.file.Paths;
import java.util.Optional;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
Expand Down Expand Up @@ -59,7 +58,7 @@ RegistryFile registryFile(FeastProperties feastProperties, ApplicationContext co
return new S3RegistryFile(context.getBean(AmazonS3.class), registryPath);
case "":
case "file":
return new LocalRegistryFile(Paths.get(registryPath));
return new LocalRegistryFile(registryPath);
default:
throw new RuntimeException("Registry storage %s is unsupported");
}
Expand Down

0 comments on commit f2f5dc6

Please sign in to comment.