Skip to content

[Bug]: App Gen DAG should fail if error in entrypoint.sh #398

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

Open
grallewellyn opened this issue Apr 22, 2025 · 1 comment
Open

[Bug]: App Gen DAG should fail if error in entrypoint.sh #398

grallewellyn opened this issue Apr 22, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@grallewellyn
Copy link
Contributor

Checked for duplicates

Have you checked for duplicate issue tickets?
Yes

Describe the bug

A clear and concise description of what the bug is. Plain-text snippets preferred but screenshots welcome.
The App Gen DAG should fail if there is an error in the entrypoint.sh i.e. cannot clone the provided git repo
Right now, it is not failing, it still shows up as successful but no credentials are printed in the logs
If I change the entrypoint.sh that creates the application package to return exit code 1 when there is an error, then the credentials are printed in the logs

I think there are 2 ways to approach this and I already tried the first option:

  1. More securely pass the credentials so that they are not printed when the DAG is printed on error. I tried passing as arguments, env vars, using the env parameter, using the from_env parameter, started looking into using kubernetes secrets
  2. Change something so that the failed DAG is not printed on fail
    I will also need to make modifications to the entrypoint.sh so that it exists with exit code nonzero when there is an error

What did you expect?

A clear and concise description of what you expect to happen
The App Gen DAG should fail if there is an error in the entrypoint.sh i.e. cannot clone the provided git repo
And no credentials should be printed to the logs

Reproducible steps

How would we reproduce this bug? Please walk us through it step by step. Plain-text snippets preferred but screenshots welcome.

  1. Register the App Gen DAG from unity-sps/airflow/dags/appgen_dag.py
  2. Trigger the DAG with a nonexistent repo
  3. The DAG will say it is successful but the logs say that it failed to execute all of the entrypoint.sh

What is your environment?

Include any computer hardware, operating system, framework, browser, time-of-day or other contextual information related to your issue

I am working in my SPS deployment instance

@grallewellyn grallewellyn added the bug Something isn't working label Apr 22, 2025
@grallewellyn
Copy link
Contributor Author

Luca recommended pursuing option 2

@grallewellyn grallewellyn self-assigned this Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant