astronomer / astro-cli

CLI that makes it easy to create, test and deploy Airflow DAGs to Astronomer
https://www.astronomer.io
Other
334 stars 70 forks source link

Astro CLI doesn't make it clear that it will target a different architecture when running astro deploy #1669

Open nsAstro opened 2 weeks ago

nsAstro commented 2 weeks ago

Describe the bug

The Astro CLI injects target architecture flags only when running astro deploy which can potentially impact other parts of the Dockerfile. One example was a user who was using the Astro CLI on an M1 Mac and was attempting to set a JAVA_HOME to /usr/lib/jvm/java-11-openjdk-arm64. While this succeeded locally, in their Astro Deployment, the task was throwing the below error:

[2024-06-24, 17:02:26 UTC] {hive.py:285} INFO - Unable to determine Hadoop version information.
[2024-06-24, 17:02:26 UTC] {hive.py:285} INFO - 'hadoop version' returned:
[2024-06-24, 17:02:26 UTC] {hive.py:285} INFO - /usr/hdp/2.6.1.0-129//hadoop/bin/hadoop.distro: line 180: /usr/lib/jvm/java-11-openjdk-arm64/bin/java: No such file or directory

What CLI Version did you experience this bug?

1.22

This CLI bug is related to which Astronomer Platform?

What Operating System is the above CLI installed on? Mac M1/ARM

It would be nice if the CLI threw some more obvious Warnings about the target architecture being different or potentially even flagging lines in the Dockerfile where other architectures like arm64 are referenced.