-
Notifications
You must be signed in to change notification settings - Fork 312
Fix for play-2.8 'Source directory xxx is not a directory.` #9357
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d8947c0
Fix for play-2.8 'Source directory xxx is not a directory.`
AlexeyKuznetsov-DD 0751985
Run SSI smoke tests.
AlexeyKuznetsov-DD f452d3b
Trying to reproduce.
AlexeyKuznetsov-DD 711f0da
Reverted test changes.
AlexeyKuznetsov-DD c6ec635
Refactored fix to be reusable from several modules.
AlexeyKuznetsov-DD dee1bfb
Merge branch 'master' into alexeyk/play-2.8-fix-2
AlexeyKuznetsov-DD da12ecd
Moved script to `play-common` folder.
AlexeyKuznetsov-DD File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Fix for flaky error: Source directory '/dd-smoke-tests/play-2.8/build/src/play/routes' is not a directory. | ||
// Probably, GitLab somehow creates (or restores from cache) file instead of folder. | ||
tasks.register('fixPlayRoutesDirectory') { | ||
group = 'build cleanup' | ||
description = 'Deletes routes path if it is a file instead of directory' | ||
|
||
def routesPath = layout.buildDirectory.dir('src/play/routes') | ||
destroyables.register(routesPath) | ||
|
||
doFirst { | ||
def routesPathFile = routesPath.get().asFile | ||
|
||
if (routesPathFile.exists() && !routesPathFile.isDirectory()) { | ||
logger.lifecycle("Removing file that blocks routes directory: ${routesPathFile}") | ||
project.delete(routesPathFile) | ||
} | ||
} | ||
} | ||
|
||
tasks.named('processResources') { | ||
dependsOn tasks.named('fixPlayRoutesDirectory') | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For my understanding, is the logic moving to a separate file necessary or for organizational / readability purposes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sarahchen6 I moved to separate file because I'm already using it 2 times and there is a chance that in future I will need it for all
play-xxx
modules.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 suggestion: I would recommend to move it to a
dd-smoke-tests/play-common
then.It will be easier to find (same logic as the instrumentations) and won't mix with the overall project build scripts.