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

Run SBT clean before CI build #11573

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Run SBT clean before CI build #11573

wants to merge 1 commit into from

Conversation

4e6
Copy link
Contributor

@4e6 4e6 commented Nov 15, 2024

Pull Request Description

Changelog:

  • update: run clean SBT command before running other commands on CI

Important Notes

This is a low-effort attempt to stabilize the backend building on CI. The problem is that each time the branch is picked up by a random worker that has an arbitrary state of the SBT cache. And because SBT can not track dependencies perfectly in our project due to the heavy annotations and preprocessor usage, it results in sporadic build failures.

Other approaches:

  • @JaroslavTulach suggested to attach Clean build required label using the Labeler action each time the engine sources are modified. But it will require significantly more work to integrate this extra step because it needs to be executed before other build steps.

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.

@4e6 4e6 added CI: No changelog needed Do not require a changelog entry for this PR. -ci labels Nov 15, 2024
@4e6 4e6 self-assigned this Nov 15, 2024
}
if self.config.clean_before {
sbt_arg = Sbt::sequential_tasks(vec!["clean", &sbt_arg]);
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't the clean only run for those who modify engine sources? It should be possible to detect what files are changed in the PR: https://stackoverflow.com/questions/74265821/get-modified-files-in-github-actions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It does not matter if the current branch modified engine sources or not. It can be the case that the runner that picked up the job previously was building the branch that did and has an SBT cache left from building that branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-ci CI: No changelog needed Do not require a changelog entry for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants