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

[Gradle] Update Build Scans Config (Develocity) #13343

Merged
merged 8 commits into from
Jan 17, 2025

Conversation

ParaskP7
Copy link
Contributor

@ParaskP7 ParaskP7 commented Jan 17, 2025

Check Also: JP/WPAndroid#21234

Description

This PR updates build scans configuration for this project. Also, it updates from com.gradle.enterprise pointing to 3.17.2 into the latest com.gradle.develocity version (3.19). 🏗️

The main goal of this PR is to make the buildScan related configuration consistent with the rest of the projects (as discussed: p1737118736712299/1737108520.561709-slack-C030U03RC8Y). As such, the main changes that is happening here are:

  1. The userEnabledTracking configuration is removed. No more having buildScan running by default locally for (at least) internal developers. (965aff3)
  2. The obfuscation configuration is removed. Now that buildScan is not running locally by default, this is not really needed. (b218109)
  3. com.gradle.enterprise updated to com.gradle.develocity version (3.19). (71a97f2)
  4. The attachGradleScanId is being disabled. This feature wasn't very useful, not used once, and it is
    planned to be removed. (140fa3f)

Note

Unrelated to anything Gradle build scans, but as part of this 15ab1cf change I noticed that both, the includeSourceContext & autoUploadSourceContext are true (for both the Mobile and Wear app). However, when comparing that configuration to how JP/WPAndroid is configured, I noticed that the same configuration is based on the isCI flag (see includeSourceContext & includeProguardMapping). My question being, shouldn't we depend on the isCI flag for this project as well? 🤔


Testing information

  • For local builds:
    • Run any gradlew task (ie. assembleJalapenoDebug) and notice that, at the very end, there is no build scan publishing happening.
    • Run any gradlew task (ie. assembleJalapenoDebug) with --scan and make sure that issuing a build scan on demand works as expected.
  • For ci builds:
    • Per specific build job (below), notice that build scan is being published and a gradle.com/s/xyz link is available for that build job/task (example Prototype Build -> Build Scan).

PS: Just because of this 71a97f2 commit, which updates to 3.19, you would also want to verify that everything is still working as expected with build cache:

Prototype Build -> Build Scan -> Performance [Build Cache] -> Check Remote cache -> Configuration -> URL & Any Other Configurations


  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

  • The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on big (tablet) and small (phone) in case of UI changes, and no regressions are added.

This configuration was based on 'measureBuildsEnabled' and only used
alongside the 'buildScan' configuration. However, after discussing about
it, it was decided that this Gradle build scans should only run on CI by
default and not locally (at least for the time being).
This configuration had meaning alongside the 'userEnabledTracking'
related 'buildScan' configuration, which is not removed. After
discussing about it, it was decided that this Gradle build scans should
only run on CI by default and not locally (at least for the time being).

FYI: This change effectively reverts this
4495d24 and this
7ebcc9b commits.
Release Notes: https://plugins.gradle.org/plugin/
com.gradle.develocity/3.19

FYI: With this update, and annoyingly, you need to manually accept the
terms at the end of each build for the build scan to get published.
For more info see:
- Connecting to scans.gradle.com: https://docs.gradle.com/develocity/
gradle-plugin/current/#connecting_to_scans_gradle_com
- Using Build Scans: https://docs.gradle.com/develocity/
gradle-plugin/current/#using_build_scans
For more info see:
- Publishing every build: https://docs.gradle.com/develocity/
gradle-plugin/current/#controlling_when_build_scans_are_published
Previously, it wasn't possible to apply this 'gradle_build_scan.gradle'
file from the 'settings.gradle' file, but now, after the Develocity
migration, it seems that it is now perfectly possible, most probably
because of the added 'develocity { ... }' block.
As discussed this feature wasn't very useful, not used once, and it is
planned to be removed.
@ParaskP7 ParaskP7 added category: tooling Anything that involves building & maintaining the project, including scripts, `Fastfile`, etc. Core labels Jan 17, 2025
@ParaskP7 ParaskP7 added this to the 21.5 milestone Jan 17, 2025
@wpmobilebot
Copy link
Collaborator

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit140fa3f
Direct Downloadwoocommerce-wear-prototype-build-pr13343-140fa3f.apk

@wpmobilebot
Copy link
Collaborator

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit140fa3f
Direct Downloadwoocommerce-prototype-build-pr13343-140fa3f.apk

@ParaskP7 ParaskP7 marked this pull request as ready for review January 17, 2025 15:25
@ParaskP7 ParaskP7 requested a review from wzieba January 17, 2025 15:25
@codecov-commenter
Copy link

codecov-commenter commented Jan 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.14%. Comparing base (51f62d3) to head (140fa3f).
Report is 9 commits behind head on trunk.

Additional details and impacted files
@@             Coverage Diff              @@
##              trunk   #13343      +/-   ##
============================================
- Coverage     41.14%   41.14%   -0.01%     
+ Complexity     6432     6431       -1     
============================================
  Files          1322     1322              
  Lines         77207    77207              
  Branches      10657    10657              
============================================
- Hits          31766    31765       -1     
  Misses        42617    42617              
- Partials       2824     2825       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ParaskP7 ParaskP7 merged commit 7c04b28 into trunk Jan 17, 2025
23 checks passed
@ParaskP7 ParaskP7 deleted the build/update-build-scans-config branch January 17, 2025 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: tooling Anything that involves building & maintaining the project, including scripts, `Fastfile`, etc. Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants