Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ivanalvarado
Copy link
Contributor

Summary

  • Adds a new comparison strategy, ``, that allows clients to compare against the explicitly provided commit SHA rather than relying on the plugin's git operations for determining the desired commit
  • Motivation: It could be the case your environment leverages git mirroring, in which case a duped repository can be out of sync with the true remote, leading to inaccurate determinations of the nearest ancestor commits. It also doesn't hurt to give developers this option if they wan't a slight optimization of bypassing the work needed by the git operations.

Usage

affectedModuleDetector {
    ...
    specifiedRawCommitSha = "12a9c6dba8b8dbd7b374480f38c448f24101127f"
    compareFrom = "SpecifiedRawCommitSha"
    ...
}

@ivanalvarado ivanalvarado marked this pull request as ready for review January 19, 2025 19:44
detector.affectedProjects,
CoreMatchers.`is`(
emptySet()
emptySet<Map<ProjectPath, Project>>()
Copy link
Member

Choose a reason for hiding this comment

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

Looks like this line may be causing a test failure

Copy link
Contributor Author

@ivanalvarado ivanalvarado Jan 25, 2025

Choose a reason for hiding this comment

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

I reverted the change here, 8ac7364, to test if it passes on CI. It might be a build incompatibility with my machine if it's not happening on main. Without this change I get:

> Task :affectedmoduledetector:compileTestKotlin FAILED
e: file:///Users/ivanalvarado/Developer/AffectedModuleDetector/affectedmoduledetector/src/test/kotlin/com/dropbox/affectedmoduledetector/AffectedModuleDetectorImplTest.kt:358:17 Not enough information to infer type variable T

https://scans.gradle.com/s/i3z5ooipyhsg6

Copy link
Member

Choose a reason for hiding this comment

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

Strange, not sure what is going on for you locally looking at that buildscan but it appears this fixed CI

Copy link
Member

Choose a reason for hiding this comment

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

Even stranger, this passed on CI but then failed. going to investigate a bit more when i have a minute

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like it was introduced by #255. I'll also take a look when I have a chance.

Copy link
Member

Choose a reason for hiding this comment

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

Figured it out, still not sure how this passed on your PR but resolved in #281

@joshafeinberg joshafeinberg merged commit b826d47 into dropbox:main Jan 27, 2025
1 check passed
joshafeinberg added a commit that referenced this pull request Jan 27, 2025
joshafeinberg added a commit that referenced this pull request Jan 29, 2025
joshafeinberg added a commit that referenced this pull request Mar 26, 2025
joshafeinberg added a commit that referenced this pull request Mar 26, 2025
#270)

* Update with latests changes provided by Google including a switch to having the project setup as a provider

* Add a bit of additional functionality

* Fix test

* Add support from #279 for custom base sha

* Fix test failing
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.

2 participants