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

[CI] Publish build scans to develocity.scala-lang.org #21386

Merged
merged 6 commits into from
Aug 28, 2024

Conversation

adpi2
Copy link
Member

@adpi2 adpi2 commented Aug 14, 2024

For the Context, Gradle is supporting the Scala Center with a free instance of Develocity that we can use to analyze the build scans of our open-source projects.

This PR configures publishing of build scans for every GitHub workflow of the scala/scala3 CI. All build scans will be publicly available on https://develocity.scala-lang.org/.

The sbt-develocity plugin can also do test retry and flaky test detection, which I will activate in a subsequent PR, on some test classes.

@dotta
Copy link

dotta commented Aug 14, 2024

@adpi2 Overall, this looks good to me. One thing I noticed is that we should add the Develocity banner in the README (I'll share an example soon). By the way, have you intentionally left out (for later) configuring the test retry functionality (for flaky test detection)?

@dotta
Copy link

dotta commented Aug 14, 2024

@adpi2 Here is the Develocity banner that should be added to the README.

Copy link

@c00ler c00ler left a comment

Choose a reason for hiding this comment

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

Great work!

project/Build.scala Outdated Show resolved Hide resolved
@adpi2 adpi2 force-pushed the setup-develocity branch 11 times, most recently from c74f7c2 to 7b262f7 Compare August 19, 2024 14:22
@adpi2 adpi2 force-pushed the setup-develocity branch from 7b262f7 to 44bdfed Compare August 20, 2024 08:49
@adpi2
Copy link
Member Author

adpi2 commented Aug 20, 2024

The Cmd Tests action in the CI fails on:

/__w/scala3/scala3/project/scripts/../../project/scripts/sbt ';scalac tests/pos/HelloWorld.scala -d /tmp/tmp.gM6j1UN9n9 ;scalac -print-tasty -color:never /tmp/tmp.gM6j1UN9n9/HelloWorld.tasty' > /tmp/tmp.SRKPwqL5Yy
grep -qe '0: ASTs' /tmp/tmp.SRKPwqL5Yy

The TASTy tree is expected to be printed in the temporary file /tmp/tmp.SRKPwqL5Yy but it is only printed in the console.

I believe there is some sort of interaction between sbt-develocity and the build on the loggers and/or the System.out, which changes the way log messages are directed to the console or the file.

@dotta @c00ler @Duhemm can you help me with this?

project/plugins.sbt Outdated Show resolved Hide resolved
Duhemm added 2 commits August 27, 2024 10:13
At the moment, the Develocity Build Cache does not work properly with
our compilation tests, because the cache key does not take into account
the sources that are read in the tests. Keeping the build cache would
lead to false cache hits, so it is better to disable it for the time
being.
@adpi2 adpi2 marked this pull request as ready for review August 27, 2024 09:35
@adpi2
Copy link
Member Author

adpi2 commented Aug 27, 2024

This is ready for review. The scans should appear automatically on develocity.scala-lang.org after we merge.

@hamzaremmal hamzaremmal self-assigned this Aug 27, 2024
Copy link
Contributor

@WojciechMazur WojciechMazur left a comment

Choose a reason for hiding this comment

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

LGTM

project/GithubEnv.scala Outdated Show resolved Hide resolved
@adpi2 adpi2 enabled auto-merge August 27, 2024 11:10
@adpi2 adpi2 disabled auto-merge August 27, 2024 12:34
@adpi2 adpi2 marked this pull request as draft August 27, 2024 13:58
@adpi2
Copy link
Member Author

adpi2 commented Aug 27, 2024

It is not yet ready to merge because we want to disable local and remote cache. We will re-enable it later once we agree on the rollout plan.

@adpi2 adpi2 marked this pull request as ready for review August 28, 2024 07:31
@adpi2 adpi2 merged commit a37da19 into scala:main Aug 28, 2024
28 checks passed
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.

7 participants