Skip to content

Build Scan parsing is updated to read values when previously unknown #396

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
Apr 13, 2023

Conversation

erichaagdev
Copy link
Member

@erichaagdev erichaagdev commented Apr 12, 2023

Overview

This PR removes the build_cache_metrics_only and all_data values passed to and from various functions to control what summary data is parsed. The goal of this is to improve code readability by having one less variable to keep track of in the call stack.

The approach I decided to take was to set summary values only if they were empty. In the case of local experiments, a lot of the environmental summary values are already known. This approach prefers values determined by the scripts over those obtained from a Build Scan. Below is a summary of the changes:

  • Previously, these fields were only set when all_data was passed to the parse function. Now, they are set when the current value is empty:
    • base_urls
    • build_scan_urls
    • git_repos
    • git_branches
    • git_commit_ids
    • requested_tasks
    • build_outcomes
  • Previously, these fields were only set when all_data was passed to the parse function. Now they are always set:
    • remote_build_cache_urls
    • remote_build_cache_shards

Testing

In order to test these changes, I compared the output before and after my changes. Below is an overview of the results. You will also see changes from #397 which is why the fetch logging is different.

Test results

Gradle - Experiment 3 (Before | After)

image


Gradle - Experiment 3 - No Gradle Enterprise API Access (Before | After)

image


Gradle - Experiment 4 (Before | After)

image


Gradle - Experiment 5 (Before | After)

image


Maven - Experiment 2 (Before | After)

image


Maven - Experiment 2 - No Gradle Enterprise API Access (Before | After)

image


Maven - Experiment 3 (Before | After)

image


Maven - Experiment 4 (Before | After)

image

@erichaagdev erichaagdev self-assigned this Apr 12, 2023
@erichaagdev erichaagdev force-pushed the erichaagdev/remove-build-cache-metrics-only branch from 45b60e8 to 92428b9 Compare April 12, 2023 02:00
@erichaagdev erichaagdev changed the base branch from main to erichaagdev/fix-brief-logging April 12, 2023 02:01
@erichaagdev erichaagdev marked this pull request as ready for review April 12, 2023 02:03
@etiennestuder
Copy link
Member

etiennestuder commented Apr 12, 2023

@erichaagdev in the case of the CI/local experiment, I would have expected that we print more details about the CI build scan when we fetch it the first time (similar to CI/CI).

Hm, I guess the extra output for getting the CI build the first time would be earlier in the output. Maybe it is there but just not visible in the screenshot.

@erichaagdev
Copy link
Member Author

Hm, I guess the extra output for getting the CI build the first time would be earlier in the output. Maybe it is there but just not visible in the screenshot.

Correct. Let me rebase this branch onto erichaagdev/fix-brief-logging and then I will run the cross platform tests. There you can inspect the full output.

@erichaagdev erichaagdev force-pushed the erichaagdev/remove-build-cache-metrics-only branch from 92428b9 to 608a99d Compare April 12, 2023 03:00
@erichaagdev
Copy link
Member Author

Successful cross platform tests run: https://github.com/gradle/gradle-enterprise-build-validation-scripts/actions/runs/4674139330

@etiennestuder here you can see the full output for CI/Local: https://github.com/gradle/gradle-enterprise-build-validation-scripts/actions/runs/4674139330/jobs/8278073687#step:11:12

@etiennestuder
Copy link
Member

Base automatically changed from erichaagdev/fix-brief-logging to main April 12, 2023 03:41
@erichaagdev erichaagdev force-pushed the erichaagdev/remove-build-cache-metrics-only branch from 608a99d to 5d80add Compare April 12, 2023 04:14
Copy link
Member

@jthurne jthurne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of my comments are more about ideas for further improvements. The change itself looks good.

@erichaagdev erichaagdev force-pushed the erichaagdev/remove-build-cache-metrics-only branch from 5d80add to 2428dac Compare April 12, 2023 21:14
@erichaagdev
Copy link
Member Author

@jthurne I went forward with the one suggestion you made. If we want to rename the brief and verbose parameters I can do that in a subsequent PR.

Merging this one as it has been approved.

@erichaagdev erichaagdev merged commit 8d5cbc5 into main Apr 13, 2023
@erichaagdev erichaagdev deleted the erichaagdev/remove-build-cache-metrics-only branch April 13, 2023 00:20
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.

3 participants