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

The build scan URL isn't always extracted properly from the logs #30

Closed
lacasseio opened this issue Sep 15, 2020 · 9 comments · Fixed by #85
Closed

The build scan URL isn't always extracted properly from the logs #30

lacasseio opened this issue Sep 15, 2020 · 9 comments · Fixed by #85
Labels
bug Something isn't working
Milestone

Comments

@lacasseio
Copy link

From this PR (nokeedev/gradle-native#153), we can see that some of the SCAN were not published properly. I'm using this code to attach the build scan URL to the commit/checks.

Screen Shot 2020-09-15 at 4 11 11 AM

I'm wondering if we could have a debug flag to try and narrow down what is happening when the action is trying to extract the build scan URL.

@eskatos
Copy link
Member

eskatos commented Sep 17, 2020

None of the checks on this PR successfully grabbed the scan URL except for the first assemble job.
https://github.com/nokeedev/gradle-native/pull/153/checks#step:6:27
And from a quick look it seems to be the same on other PRs in this repository.
OS doesn't matter, neither the build outcome.
🤔

@lacasseio
Copy link
Author

You are right, I was too busy to reply with some more info. Do you have an idea about adding more logs around that part to see if it's the detection of the "Publishing build scan" or the extraction that is the problem?

@lacasseio
Copy link
Author

We could also try to just grab the last detected URL (meaning it the last line to start with http).

Another idea would be to capture the last n lines and print them at the end of the build to debug further what is happening.

@eskatos
Copy link
Member

eskatos commented Sep 21, 2020

One alternative would be to use an init script that captures the build scan URL from the build. It would be more solid.

@lacasseio
Copy link
Author

Probably better, to me, it just shows how we should use Gradle instead of action to automate some of this stuff. Anyhow, there was a recent change in GitHub Action where clicking on the detail of a failing job jump straight to the end of the log as well as rendering URLs in the logs as clickable. I'm preferring this from now on, so I will just close this issue.

@eskatos
Copy link
Member

eskatos commented Sep 25, 2020

Reopening because this is a real issue with the action that I want to see fixed

@eskatos eskatos reopened this Sep 25, 2020
@britter
Copy link
Contributor

britter commented Oct 18, 2020

I'm seeing this issue but only on windows: britter/bean-validators#30

I've looked into the code but I don't see anything fishy there. I also added -Dscan.uploadInBackground=false but that didn't fix the problem.

@eskatos eskatos added the bug Something isn't working label Dec 22, 2020
@lamba92
Copy link

lamba92 commented Aug 10, 2021

Same here: https://github.com/JetBrains/jetbrains-gradle-plugins/actions

Each run of the test workflow publishes a lot of build scans. You can notice the flakyness right away!

@bigdaz bigdaz added this to the v2.0 milestone Sep 15, 2021
@etiennestuder
Copy link
Member

Extracting the log should happen via buildScanPublished listener rather than via log parsing.

bigdaz added a commit that referenced this issue Sep 28, 2021
Instead of parsing the log output, we instead register a
buildScanPublished listener and record the build scan URL
to a file. This file is subsequently read to report the
build scan URL.

Fixes #30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants