Skip to content

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

Open
@grallewellyn

Description

@grallewellyn

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions