티스토리 뷰

반응형

내 mac pro 에서 airflow 2.x 버전대를 빌드하면서 compile assets 를 이용한 ui 빌드를 시도하는데 다음과 같은 오류가 발생했다. 결론부터 말하면 mac 에 md5sum 바이너리가 없어서 실패난 현상이었다.

(airflow) user@AL0000001 airflow % python setup.py compile_assets
gitpython not found: Cannot compute the git version.
/Users/user/.virtualenvs/airflow/lib/python3.8/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
  warnings.warn(
running compile_assets
yarn install v1.22.19
[1/4] 🔍  Resolving packages...
success Already up-to-date.
...

webpack 5.73.0 compiled with 3 warnings in 9926 ms
✨  Done in 11.22s.
xargs: md5sum: No such file or directory
Traceback (most recent call last):
  File "setup.py", line 1183, in <module>
    do_setup()  # comment
  File "setup.py", line 1165, in do_setup
    setup(
  File "/Users/user/.virtualenvs/airflow/lib/python3.8/site-packages/setuptools/__init__.py", line 155, in setup
    return distutils.core.setup(**attrs)
  File "/Users/user/.virtualenvs/airflow/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 148, in setup
    return run_commands(dist)
  File "/Users/user/.virtualenvs/airflow/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
    dist.run_commands()
  File "/Users/user/.virtualenvs/airflow/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
    self.run_command(cmd)
  File "/Users/user/.virtualenvs/airflow/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
    cmd_obj.run()
  File "setup.py", line 116, in run
    subprocess.check_call('./airflow/www/compile_assets.sh')
  File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command './airflow/www/compile_assets.sh' returned non-zero exit status 127.

원인

실패난 이유는 "python setup.py compile_assets" 명령을 추적해보면, compile_assets.sh 를 실행하는데, 그 쉘스크립트안에 다음과 같이 파일리스트를 파이프라인으로 전달해 md5sum 바이너리를 호출해서 비교하는 로직을 실행하는데 해당 바이너리가 없었기 때문이다.

..생략...
find package.json yarn.lock static/css static/js -type f | sort | xargs md5sum > "${MD5SUM_FILE}"

 

해결방법

즉, md5sum 이 없어서 실패난것이므로, 다음과 같이 설치를 해주면 된다.

brew install md5sha1sum
(airflow) user@AL0000001 airflow %  md5sum
zsh: command not found: md5sum

(airflow) user@AL0000001 airflow % brew install md5sha1sum
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/manifests/3.0.7
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/blobs/sha256:5b3d605f5c1fcadfea094c5670091e4bec2b2de7c121874be166bc737ef64ccf
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:5b3d605f5c1fcadfea094c5670091e4bec2b2de7c121874be166bc737ef64ccf?se=2023-04-04T06%3A15%3A00Z&sig=0ZOqP
...생략...


(airflow) user@AL0000001 airflow % md5sum README.md 
503d5de201010055e12520db999fb0a8  README.md

(airflow) user@AL0000001 airflow %  python setup.py compile_assets
gitpython not found: Cannot compute the git version.
running compile_assets
yarn install v1.22.19
...생략...
WARNING in webpack performance recommendations: 
You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
For more info visit https://webpack.js.org/guides/code-splitting/

webpack 5.73.0 compiled with 3 warnings in 9799 ms
✨  Done in 10.80s.

첨엔 환경문제인가 재실행을 많이해봤는데 원인을 찾고보니 좀 허무한듯

 

반응형
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/12   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
글 보관함