Skip to content
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

Proposed change to fix stop_on_error=false not working in .air.toml #336

Conversation

kkovacs
Copy link
Contributor

@kkovacs kkovacs commented Oct 14, 2022

Hello guys,

I found a funny bug: I tried to set stop_on_error = false in .air.toml, but it had no effect. After some debugging, it turns out that the reason is this mergo issue: darccio/mergo#129

The problem is that stop_on_error is defined as true in the defaultConfig() function, but mergo won't overwrite true with false from the defaultPathConfig() function.

Other solutions are possible, but this looks the simplest without truly introducing true/false/undefined in the concept of air's config for the sake of this one value. Since the stop_on_error = true snippet is in the example config file since 2020, and actually before that the default was the current false (because the feature was non-existent), I think it would cause a problem for very few people, and make the feature switch-off-able again.

Thanks for the great tool, and keep up the good work!

Kristof

@codecov
Copy link

codecov bot commented Oct 17, 2022

Codecov Report

Merging #336 (ad5f39e) into master (63b6ba3) will decrease coverage by 0.34%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #336      +/-   ##
==========================================
- Coverage   69.16%   68.82%   -0.35%     
==========================================
  Files           7        7              
  Lines         960      959       -1     
==========================================
- Hits          664      660       -4     
- Misses        225      227       +2     
- Partials       71       72       +1     
Impacted Files Coverage Δ
runner/config.go 75.00% <ø> (-0.12%) ⬇️
runner/engine.go 62.82% <0.00%> (-0.79%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@kkovacs
Copy link
Contributor Author

kkovacs commented Oct 18, 2022

I wouldn't think removal of ONE line ACTUALLY decreases code coverage :)

@xiantang xiantang merged commit 3be9ef7 into air-verse:master Oct 24, 2022
KN4CK3R added a commit to go-gitea/gitea that referenced this pull request Apr 30, 2023
Current air version runs the old binary if the build fails. This
restores the old behaviour.

```
...
code.gitea.io/gitea/services/cron
code.gitea.io/gitea/routers/web/user/setting
code.gitea.io/gitea/routers/web/org
make[2]: *** [Makefile:814: gitea] Error 1
make[2]: Leaving directory '/src'
failed to build, error: exit status 2
running...
2023/04/30 21:04:11 cmd/web.go:125:runWeb() [I] Starting Gitea on PID: 29153
2023/04/30 21:04:11 cmd/web.go:178:runWeb() [I] Global init
...
```

Reference: air-verse/air#336
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.

2 participants