8000 fix: support camel case for step exit code field by yottahmd · Pull Request #1031 · dagu-org/dagu · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: support camel case for step exit code field #1031

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

Merged
merged 2 commits into from
Jun 19, 2025
Merged

Conversation

yottahmd
Copy link
Collaborator
@yottahmd yottahmd commented Jun 19, 2025

Summary

Fixes step exit code field to support both camelCase (exitCode) and snake_case (exit_code) formats for consistency with other fields.

This is a follow-up to #986 which added support for both formats in continueOn fields. The same inconsistency existed for exit code fields in retry and repeat policies.

Changes

  • Updated retryPolicyDef and repeatPolicyDef to accept any type for exit code fields
  • Added parsing logic to handle both exitCode and exit_code formats
  • Maintains backward compatibility with existing DAGs

Testing

Tested with both formats:

# Both of these now work:
retryPolicy:
  exitCode: [1, 2]

retryPolicy:
  exit_code: [1, 2]

Copy link
codecov bot commented Jun 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.76%. Comparing base (a3e30fb) to head (2bc744e).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1031      +/-   ##
==========================================
+ Coverage   67.71%   67.76%   +0.05%     
==========================================
  Files          93       93              
  Lines       13887    13887              
==========================================
+ Hits         9403     9411       +8     
+ Misses       3681     3675       -6     
+ Partials      803      801       -2     
Files with missing lines Coverage Δ
internal/cmdutil/eval.go 89.04% <100.00%> (ø)

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a3e30fb...2bc744e. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yottahmd yottahmd merged commit c5d68c3 into main Jun 19, 2025
5 checks passed
@yottahmd yottahmd deleted the 986-follow-up branch June 19, 2025 09:27
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.

1 participant
0