Skip to content

Conversation

@ben-cutler-datarobot
Copy link
Contributor

We have had issues before where an app build should fail (because a package wasn't available) but the build is marked as passing and the app fails to start. This can lead to confusion.
More broadly any script with the format:

<passing commands>
<failing command>
<passing commands>

will have a successful exit code and lead the app developer to think their build was a success. Commands like:

<passing commands>
<failing command>

will mark the build as failed. This is an implementation detail of shell specifically, and not every build-app will use shell. We can easily imagine a build-app with:

#!/usr/bin/env python
import ... 
if __name__=='__main__':
    do_stuff()

So, the smallest change we can do to remind users about this caveat is to just have it in the examples.

@ben-cutler-datarobot ben-cutler-datarobot requested a review from a team as a code owner April 23, 2025 18:21
Copy link

@chelsealiusa chelsealiusa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this react-base-app repo only used in custom app, not foundational app?
Will this also help reduce cost for the canary test run if something is wrong with the build?

carsongee
carsongee approved these changes Apr 24, 2025
#!/usr/bin/env sh

# It's important to fail the build if a command such as `npm install` fails.
set -e

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not the full "ye olde" set -euo pipefail?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants