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

Improve dependency graph failure handling #1036

Merged
merged 7 commits into from Jan 13, 2024

Conversation

bigdaz
Copy link
Member

@bigdaz bigdaz commented Jan 12, 2024

One goal for the original dependency-graph support was to minimize it's impact on existing workflows, by operating transparently and not impacting the build outcome. This meant that any failures in dependency-graph generation or submission were logged as warnings, but did not cause the workflow to fail.

However, in some cases the primary purpose of a workflow is to generate and submit a dependency graph: in these cases it is desirable to have the workflow fail when this process breaks.

This PR introduces a new dependency-graph-continue-on-failure parameter, which when false will enable the latter behaviour. It also adds test coverage for different failures in dependency graph generation and submission.

Fixes #1034
Fixes #997

@bigdaz bigdaz self-assigned this Jan 12, 2024
@bigdaz bigdaz added this to the 3.0.0 milestone Jan 12, 2024
Copy link

Job Summary for gradle-build-action

Demo adding Build Scan® comment to PR :: failing-build-with-comment-on-failure
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
kotlin-dsl no-a-real-task 8.5 Build Scan PUBLISHED

Copy link

Job Summary for gradle-build-action

Demo adding Build Scan® comment to PR :: successful-build-with-always-comment
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
kotlin-dsl build 8.5 Build Scan PUBLISHED

- Translate to env var for init-script support
- Use when deciding whether to log or rethrow errors
- Add a custom error type to trigger failure in post action
- Update test to use input param
- Rename Job to indicate expected failure
@bigdaz bigdaz force-pushed the dd/dependency-graph-failure-handling branch from eabd1be to 610728f Compare January 13, 2024 14:24
@bigdaz bigdaz merged commit 7099569 into main Jan 13, 2024
72 of 73 checks passed
@bigdaz bigdaz deleted the dd/dependency-graph-failure-handling branch January 13, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant