Skip to content

Commit f2f5dc6

Browse files
authored
Fix java_release workflow by removing step without users/with (#2067)
* 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>
1 parent 680a489 commit f2f5dc6

File tree

3 files changed

+26
-8
lines changed

3 files changed

+26
-8
lines changed

.github/workflows/java_pr.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v2
1515
with:
16-
submodules: 'true'
16+
# pull_request_target runs the workflow in the context of the base repo
17+
# as such actions/checkout needs to be explicit configured to retrieve
18+
# code from the PR.
19+
ref: refs/pull/${{ github.event.pull_request.number }}/merge
20+
submodules: recursive
1721
- name: Lint java
1822
run: make lint-java
1923

@@ -23,7 +27,11 @@ jobs:
2327
steps:
2428
- uses: actions/checkout@v2
2529
with:
26-
submodules: 'true'
30+
# pull_request_target runs the workflow in the context of the base repo
31+
# as such actions/checkout needs to be explicit configured to retrieve
32+
# code from the PR.
33+
ref: refs/pull/${{ github.event.pull_request.number }}/merge
34+
submodules: recursive
2735
- name: Set up JDK 11
2836
uses: actions/setup-java@v1
2937
with:
@@ -52,7 +60,11 @@ jobs:
5260
steps:
5361
- uses: actions/checkout@v2
5462
with:
55-
submodules: 'true'
63+
# pull_request_target runs the workflow in the context of the base repo
64+
# as such actions/checkout needs to be explicit configured to retrieve
65+
# code from the PR.
66+
ref: refs/pull/${{ github.event.pull_request.number }}/merge
67+
submodules: recursive
5668
- name: Set up JDK 11
5769
uses: actions/setup-java@v1
5870
with:

.github/workflows/java_release.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,22 +77,29 @@ jobs:
7777
infra/scripts/download-maven-cache.sh \
7878
--archive-uri ${MAVEN_CACHE} \
7979
--output-dir .
80-
- name: Build and push versioned images
80+
- name: Build image
81+
run: make build-${{ matrix.component }}-docker REGISTRY=${REGISTRY} VERSION=${RELEASE_VERSION}
8182
env:
8283
RELEASE_VERSION: ${{ needs.get-version.outputs.release_version }}
8384
VERSION_WITHOUT_PREFIX: ${{ needs.get-version.outputs.version_without_prefix }}
8485
HIGHEST_SEMVER_TAG: ${{ needs.get-version.outputs.highest_semver_tag }}
85-
- name: Build image
86-
run: make build-${{ matrix.component }}-docker REGISTRY=${REGISTRY} VERSION=${RELEASE_VERSION}
8786
- name: Push image
8887
run: make push-${{ matrix.component }}-docker REGISTRY=${REGISTRY} VERSION=${RELEASE_VERSION}
88+
env:
89+
RELEASE_VERSION: ${{ needs.get-version.outputs.release_version }}
90+
VERSION_WITHOUT_PREFIX: ${{ needs.get-version.outputs.version_without_prefix }}
91+
HIGHEST_SEMVER_TAG: ${{ needs.get-version.outputs.highest_semver_tag }}
8992
- run: |
9093
echo "Only push to latest tag if tag is the highest semver version $HIGHEST_SEMVER_TAG"
9194
if [ "${VERSION_WITHOUT_PREFIX}" = "${HIGHEST_SEMVER_TAG:1}" ]
9295
then
9396
docker tag ${REGISTRY}/${{ matrix.component }}:${VERSION_WITHOUT_PREFIX} ${REGISTRY}/${{ matrix.component }}:latest
9497
docker push ${REGISTRY}/${{ matrix.component }}:latest
9598
fi
99+
env:
100+
RELEASE_VERSION: ${{ needs.get-version.outputs.release_version }}
101+
VERSION_WITHOUT_PREFIX: ${{ needs.get-version.outputs.version_without_prefix }}
102+
HIGHEST_SEMVER_TAG: ${{ needs.get-version.outputs.highest_semver_tag }}
96103
97104
publish-java-sdk:
98105
container: maven:3.6-jdk-11

java/serving/src/main/java/feast/serving/config/RegistryConfig.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import com.google.cloud.storage.StorageOptions;
2323
import feast.serving.registry.*;
2424
import java.net.URI;
25-
import java.nio.file.Paths;
2625
import java.util.Optional;
2726
import org.springframework.context.ApplicationContext;
2827
import org.springframework.context.annotation.Bean;
@@ -59,7 +58,7 @@ RegistryFile registryFile(FeastProperties feastProperties, ApplicationContext co
5958
return new S3RegistryFile(context.getBean(AmazonS3.class), registryPath);
6059
case "":
6160
case "file":
62-
return new LocalRegistryFile(Paths.get(registryPath));
61+
return new LocalRegistryFile(registryPath);
6362
default:
6463
throw new RuntimeException("Registry storage %s is unsupported");
6564
}

0 commit comments

Comments
 (0)