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

build: fix workflow details making it compatible on s390x #602

Merged
merged 2 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ gen: deps gen/grpc gen/openapi gen/openapi-server gen/converter

.PHONY: lint
lint:
${GOLANGCI_LINT} run main.go
${GOLANGCI_LINT} run cmd/... internal/... ./pkg/...
${GOLANGCI_LINT} run main.go --timeout 3m
${GOLANGCI_LINT} run cmd/... internal/... ./pkg/... --timeout 3m
Comment on lines +206 to +207
Copy link
Member

Choose a reason for hiding this comment

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

not sure why this was needed, but okay.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In s390x environment , it was failing without timeout . By giving timeout option of 3 min , it waits for the operation to complete during the interval & is working fine post that


.PHONY: test
test: gen bin/envtest
Expand Down Expand Up @@ -256,12 +256,12 @@ ifeq ($(DOCKER),docker)
# docker uses builder containers
- $(DOCKER) buildx rm model-registry-builder
$(DOCKER) buildx create --use --name model-registry-builder --platform=$(PLATFORMS)
$(DOCKER) buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f ${DOCKERFILE} .
$(DOCKER) buildx build --push --platform=$(PLATFORMS) --tag ${IMG}:$(IMG_VERSION) -f ${DOCKERFILE} .
Copy link
Member

Choose a reason for hiding this comment

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

Makes it consistent with

model-registry/Makefile

Lines 241 to 243 in 4099d46

.PHONY: image/build
image/build:
${DOCKER} build ${BUILD_PATH} -f ${DOCKERFILE} -t ${IMG}:$(IMG_VERSION)

lgtm

$(DOCKER) buildx rm model-registry-builder
else ifeq ($(DOCKER),podman)
# podman uses image manifests
$(DOCKER) manifest create -a ${IMG}
$(DOCKER) buildx build --platform=$(PLATFORMS) --manifest ${IMG} -f ${DOCKERFILE} .
$(DOCKER) buildx build --platform=$(PLATFORMS) --manifest ${IMG}:$(IMG_VERSION) -f ${DOCKERFILE} .
Copy link
Member

Choose a reason for hiding this comment

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

as above.

$(DOCKER) manifest push ${IMG}
$(DOCKER) manifest rm ${IMG}
else
Expand Down
10 changes: 7 additions & 3 deletions scripts/install_protoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ if [[ ${OSTYPE,,} =~ darwin ]]; then
OS="osx"
fi

ARCH="x86_64"
if [[ $(uname -m) =~ arm ]]; then
ARCH="aarch_64"
ARCH=$(uname -m)
if [[ "$ARCH" == "arm"* ]]; then
ARCH="aarch_64"
elif [[ "$ARCH" == "s390x" ]]; then
ARCH="s390_64"
elif [[ "$ARCH" == "ppc64le" ]] ; then
ARCH="ppcle_64"
Comment on lines -10 to +16
Copy link
Member

Choose a reason for hiding this comment

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

tested locally

image

lgtm

fi

PROJECT_ROOT=$(realpath "$(dirname "$0")"/..)
Expand Down