-
Notifications
You must be signed in to change notification settings - Fork 0
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
[COIN-795] Enhance compatibility for Apple Silicon #2
Conversation
q; |
toolchains/helm-3/BUILD
Outdated
name = "helm_v3.12.2_linux_arm64_toolchain", | ||
exec_compatible_with = [ | ||
"@platforms//os:linux", | ||
"@platforms//cpu:x86_64", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이게 cpu:arm64가 되어야 할 듯?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
참고로 Bazel에서 사용할 수 있는 @platforms 값들은 여기에 정의되어 있습니다.
https://github.com/bazelbuild/platforms/blob/main/cpu/BUILD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
굳이 붙일 필요는 없을 것 같습니다. 코드 수정도 많이 해야 하고... |
Integration tests 만 고치면 될 것 같습니다! 에러를 보니 새로운 yq 바이너리가 깨진듯? |
넵 exec 가능한 것으로 바꿨습니다 ㅎㅎ |
PR상에 변경사항과 어떤 관계가 있는지 모를 에러가 계속 발생하네요 😵
|
[이슈 공유] 기존 upstream에서 사용하던 yq의 버전이 v2이었는데, 이 경우 apple silicon과 호환되는 패키지가 없었어서 최신 v4 버전으로 올렸는데 기존 yq에서 v3까지는 유지되었던 것으로 보여서 v3로 내리려고 하니 v3에서도 apple silicon과 호환되는 패키지가 없어서... apple silicon에서 사용하기 위해서는 yq를 v4로 올려야했고, 패키지 내에서 yq를 사용하는 곳 중 deprecated 커맨드를 사용하는 곳들을 migration 가이드에 따라 변경해보고 있습니다. cc. @moonk-banksalad, (도움 주신) @namkwangwoo |
helm/helm-chart-package.sh.tpl
Outdated
@@ -68,12 +68,12 @@ if [ -n $DIGEST_PATH ] && [ "$DIGEST_PATH" != "" ]; then | |||
REPO_URL="{IMAGE_REPOSITORY}" | |||
else | |||
# if image_repository attr is not provided, extract it from values.yaml | |||
REPO_URL=$({YQ_PATH} r {CHART_VALUES_PATH} {VALUES_REPO_YAML_PATH}) | |||
REPO_URL=$({YQ_PATH} "{VALUES_REPO_YAML_PATH}" {CHART_VALUES_PATH}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yq r 명령어에 대한 변경시에도 selector는 "."을 붙여주여야 합니다.
https://mikefarah.gitbook.io/yq/upgrading-from-v3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
그리고 굳이 ""를 사용할 필요가 있나요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수정했습니다!
helm/helm-chart-package.sh.tpl
Outdated
fi | ||
|
||
# appends @sha256 suffix to image repo url value if the repository value does not already contains it | ||
if ([ -n $REPO_URL ] || [ -n $REPO_SUFIX ]) && ([[ $REPO_URL != *"$REPO_SUFIX" ]] || [[ -z "$REPO_SUFIX" ]]); then | ||
{YQ_PATH} w -i {CHART_VALUES_PATH} {VALUES_REPO_YAML_PATH} ${REPO_URL}${REPO_SUFIX} | ||
{YQ_PATH} -i '.{VALUES_REPO_YAML_PATH} = $REPO_URL$REPO_SUFIX' {CHART_VALUES_PATH} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
굳이 {}를 제거할 필요가 있나요? ${REPO_URL} -> $REPO_URL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수정했습니다!
yq v4에서 env를 가져다 쓰는 것도 다른 방식으로 변동된 것 같습니다 ㅜ https://mikefarah.gitbook.io/yq/operators/env-variable-operators |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Changes
_arm64
postfix를 붙인 toolchain을 추가하여 Apple Silicon(M1) 호환성 개선