Comments (8)
I added the following custom task affected
, to test it out. why all modules got affected even after I have committed all changes to develop
branch?
val affected = register<Test>("affected") {
subprojects.forEach {
println("Is ${it.name} Affected? : "+ com.dropbox.affectedmoduledetector.AffectedModuleDetector.isProjectAffected(it))
}
}
gradle affected
Type-safe dependency accessors is an incubating feature.
Type-safe project accessors is an incubating feature.
> Configure project :
Version: 1.6.5-SNAPSHOT, Branch: develop, isCI: false
SpotlessChangelog Version Next: 1.7.0-SNAPSHOT Last: 1.6.4
Is apps Affected? : true
Is libs Affected? : true
Is account-service Affected? : true
Is chat-service Affected? : true
Is classifier-pipeline Affected? : true
Is entity-service Affected? : true
Is greeting-service Affected? : true
Is ingestion-pipeline Affected? : true
Is keying-service Affected? : true
Is linking-service Affected? : true
Is person-service Affected? : true
Is wordcount-pipeline Affected? : true
Is core Affected? : true
Is kbeam Affected? : true
Is model Affected? : true
Is pipeline Affected? : true
Is proto Affected? : true
Is service Affected? : true
Is test Affected? : true
from affectedmoduledetector.
Could you include the log file please.
from affectedmoduledetector.
here is the output
[INFO] [amd] Modules provided: null
[INFO] [amd] Using real detector with ALL_AFFECTED_PROJECTS
[INFO] [amd] running command git rev-parse develop in /Users/schintha/Developer/Work/java/micro-apps
[INFO] [amd] Response: 4c3ba5885d9062d32704012ebd1f1a137fd892e9
[INFO] [amd] running command git --no-pager diff --name-only 4c3ba5885d9062d32704012ebd1f1a137fd892e9 in /Users/schintha/Developer/Work/java/micro-apps
[INFO] [amd] Response:
[INFO] [amd] unknownFiles: [], changedProjects: [], buildAll: true
[INFO] [amd] Building all projects
[INFO] [amd] because no changed files were detected
[INFO] [amd] checking whether I should include :apps:account-service and my answer is true
[INFO] [amd] checking whether I should include :apps:chat-service and my answer is true
[INFO] [amd] checking whether I should include :apps:classifier-pipeline and my answer is true
[INFO] [amd] checking whether I should include :apps:entity-service and my answer is true
[INFO] [amd] checking whether I should include :apps:greeting-service and my answer is true
[INFO] [amd] checking whether I should include :apps:ingestion-pipeline and my answer is true
[INFO] [amd] checking whether I should include :apps:keying-service and my answer is true
[INFO] [amd] checking whether I should include :apps:linking-service and my answer is true
[INFO] [amd] checking whether I should include :apps:person-service and my answer is true
[INFO] [amd] checking whether I should include :apps:wordcount-pipeline and my answer is true
[INFO] [amd] checking whether I should include :libs:core and my answer is true
[INFO] [amd] checking whether I should include :libs:core and my answer is true
[INFO] [amd] checking whether I should include :libs:kbeam and my answer is true
[INFO] [amd] checking whether I should include :libs:kbeam and my answer is true
[INFO] [amd] checking whether I should include :libs:model and my answer is true
[INFO] [amd] checking whether I should include :libs:model and my answer is true
[INFO] [amd] checking whether I should include :libs:pipeline and my answer is true
[INFO] [amd] checking whether I should include :libs:pipeline and my answer is true
[INFO] [amd] checking whether I should include :libs:proto and my answer is true
[INFO] [amd] checking whether I should include :libs:proto and my answer is true
[INFO] [amd] checking whether I should include :libs:service and my answer is true
[INFO] [amd] checking whether I should include :libs:service and my answer is true
[INFO] [amd] checking whether I should include :libs:test and my answer is true
[INFO] [amd] checking whether I should include :libs:test and my answer is true
just F.Y.I: I changed my custom task and target to root project
// Define Custom Task
open class AffectedTask : DefaultTask() {
@TaskAction
fun printAffected() {
project.subprojects.forEach {
println("Is ${it.name} Affected? : " + com.dropbox.affectedmoduledetector.AffectedModuleDetector.isProjectAffected(it))
}
}
}
// Register Custom Task with root project
register<AffectedTask>("affected") {
group = "Affected Module Detector"
description = "print all affected subprojects due to code changes"
}
gradle affected
gradle affected
Type-safe dependency accessors is an incubating feature.
Type-safe project accessors is an incubating feature.
> Configure project :
Version: 1.6.5-SNAPSHOT, Branch: develop, isCI: false
SpotlessChangelog Version Next: 1.7.0-SNAPSHOT Last: 1.6.4
> Task :affected
Is apps Affected? : true
Is libs Affected? : true
Is account-service Affected? : true
Is chat-service Affected? : true
Is classifier-pipeline Affected? : true
Is entity-service Affected? : true
Is greeting-service Affected? : true
Is ingestion-pipeline Affected? : true
Is keying-service Affected? : true
Is linking-service Affected? : true
Is person-service Affected? : true
Is wordcount-pipeline Affected? : true
Is core Affected? : true
Is kbeam Affected? : true
Is model Affected? : true
Is pipeline Affected? : true
Is proto Affected? : true
Is service Affected? : true
Is test Affected? : true
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
from affectedmoduledetector.
Git commit log
commit 4c3ba5885d9062d32704012ebd1f1a137fd892e9 (HEAD -> develop, origin/develop, origin/HEAD)
Author: Sumanth Chinthagunta <[email protected]>
Date: Fri Jun 25 10:32:37 2021 -0700
style(lint): adding OptIn to fix kotlin lints
commit 183bd1b99dfa0860d63df96cc61a433bba739be0
Author: Sumanth Chinthagunta <[email protected]>
Date: Fri Jun 25 10:21:54 2021 -0700
build(deps): updated kotlin to 1.5.20
commit 40617051cc4b3dbeb97f8730defd87f99d8afb95
Author: Sumanth Chinthagunta <[email protected]>
Date: Fri Jun 25 07:37:02 2021 -0700
feat(gradle): adding affected custom tas
from affectedmoduledetector.
I tried this, but tests still executed. I have affectedTestConfiguration { jvmTestTask = "check" }
in each sub project
gradle runAffectedUnitTests -Paffected_module_detector.enable -Paffected_module_detector.changedProjects
Output
[INFO] [amd] Modules provided: null
[INFO] [amd] Using real detector with CHANGED_PROJECTS
[INFO] [amd] running command git rev-parse develop in /Users/schintha/Developer/Work/java/micro-apps
[INFO] [amd] Response: 4c3ba5885d9062d32704012ebd1f1a137fd892e9
[INFO] [amd] running command git --no-pager diff --name-only 4c3ba5885d9062d32704012ebd1f1a137fd892e9 in /Users/schintha/Developer/Work/java/micro-apps
[INFO] [amd] Response:
[INFO] [amd] checking whether I should include :apps:account-service and my answer is false
[INFO] [amd] checking whether I should include :apps:chat-service and my answer is false
[INFO] [amd] checking whether I should include :apps:classifier-pipeline and my answer is false
[INFO] [amd] checking whether I should include :apps:entity-service and my answer is false
[INFO] [amd] checking whether I should include :apps:greeting-service and my answer is false
[INFO] [amd] checking whether I should include :apps:ingestion-pipeline and my answer is false
[INFO] [amd] checking whether I should include :apps:keying-service and my answer is false
[INFO] [amd] checking whether I should include :apps:linking-service and my answer is false
[INFO] [amd] checking whether I should include :apps:person-service and my answer is false
[INFO] [amd] checking whether I should include :apps:wordcount-pipeline and my answer is false
[INFO] [amd] checking whether I should include :libs:core and my answer is false
[INFO] [amd] checking whether I should include :libs:kbeam and my answer is false
[INFO] [amd] checking whether I should include :libs:model and my answer is false
[INFO] [amd] checking whether I should include :libs:pipeline and my answer is false
[INFO] [amd] checking whether I should include :libs:proto and my answer is false
[INFO] [amd] checking whether I should include :libs:service and my answer is false
[INFO] [amd] checking whether I should include :libs:test and my answer is false
from affectedmoduledetector.
I have the same problem. runAffectedUnitTests is running all tests
from affectedmoduledetector.
Did you find a solution?
from affectedmoduledetector.
Hello @xmlking - can you please test with the latest version of the library. we have resolved a lot of the bugs so hopefully this issue has been fixed. Otherwise feel free to reopen this issue and we can debug a bit more :)
from affectedmoduledetector.
Related Issues (20)
- A version bump to a runtimeOnly dependency does not mark module as affected HOT 2
- Help debugging why unnecessary tasks are running HOT 4
- Depends on gradle tasks only if project is affected HOT 3
- Dry run of gradle cmd HOT 1
- Sample project fails to compile HOT 2
- Custom task executed on all modules instead of only affected modules HOT 8
- Slashes in current branch name being replaced with backslashes on windows HOT 1
- running all tests everytime HOT 1
- Weird behavior on git commands HOT 4
- Non-java Modules don't get tested
- Problem with the integration test
- How do i define affectedTestConfiguration for all modules
- `excludeModules` does not work for modules without the plugin applied
- Renames across module boundaries don't mark both modules as changed.
- Plugin uses version of Lucene that has security issues HOT 1
- AssembleAffectedAndroidTests returns "Tried to get affected module detector too early"
- Change in ignored files marks all modules as affected
- Change in ignored files marks all modules as affected HOT 1
- Add the ability for some Configuration instances to be excluded
- Gradle 8.10 breaks AffectedModuleDetector dependentList tracking HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from affectedmoduledetector.