Skip to content

Fix configuredTime when configuration error#691

Merged
jraska merged 1 commit intojraska:masterfrom
jonnycaley:master
Mar 29, 2022
Merged

Fix configuredTime when configuration error#691
jraska merged 1 commit intojraska:masterfrom
jonnycaley:master

Conversation

@jonnycaley
Copy link
Contributor

Hey, hope you're getting lots of glovo discounts 😄

I found this issue at work today so may as well solve it here too. When an error occurs in a gradle build script projectsEvaluated(gradle: Gradle) is never executed, meaning configuredTime = 0 and the configuration duration estimate will be 0-startTimeStamp.

To fix this, when the value is null we can assume the configuration phase failed so we use the currentTime instead.

You can test this by adding throw new Exception() into a project's build.gradle file and printing configuredTime both before and after this change by running ./gradlew help

@jraska
Copy link
Owner

jraska commented Mar 29, 2022

Hey Jonny, great hearing from you!

I found this issue at work today so may as well solve it here too.
Thanks a lot for the PR!

I'm getting some discounts and lot of fun on top of it :D I hope you are doing great at Skyscanner ;)

Let me just run CI on the PR and happy to merge this :)

@jraska jraska enabled auto-merge (squash) March 29, 2022 21:51
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@jraska jraska merged commit 9101ce4 into jraska:master Mar 29, 2022
@github-actions github-actions bot added this to the 0.38.0 milestone Mar 29, 2022
@github-actions
Copy link
Contributor

This PR was released in 0.38.0. 🚀

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