-
Notifications
You must be signed in to change notification settings - Fork 542
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
Fix jkube-kit/build/service
module's unit tests on Windows
#2640
Comments
@rohanKanojia, I can pick this up, Please assign this to me. |
I haven't checked what's causing the failure. Make sure you share your findings for root cause first before fixing the issue. |
Yeah @rohanKanojia, I'm just trying to figure that out only, I'll first rule out any possible issues with my local environment. I am still not sure if this is a issue with my local machine or the module itself. |
@rohanKanojia, I have been a bit busy over the past few days, I hope it won't be a problem if this takes a few more day? |
@l3002 : No problem, take your time. |
@rohanKanojia, Seems like the problem is occurring due to the outputDirectory used in WatchContext.buildContext. See below: Here, we are using the absolute path of the directory rather than using just the name. Due to which when we invoke BuildDirs.getDir(), it uses that absolute path of the output directory rather than just using the name of the output directory. This method then returns a file path like this:
and is used in the BuildDirs.createDir() leading to the throw statement We can solve the issue by changing the absolute path to just the name. See below: Changing the getAbsolutePath() to getName(). |
I've tried building the project on both windows and linux after the changes and it seems to pass all the test in |
@l3002 : Nice work! Your analysis looks correct to me. It was working incorrectly on Linux as well, but we didn't notice it because on Linux it was creating nested directories:
|
@rohanKanojia: Thanks, Should I raise a PR with the mentioned changes? Also, After making those changes to the fork on my local system and building the project, there is still a unit test failing in enricher module. Could you please create an issue for that too? While building the project in windows, the following test seems to be failing in
|
You can go ahead and create pull request 👍 |
Please don't hesitate in opening up new issue on repository. Anyone can create issues. Just try to follow the same format I used in previous issues. |
Got it. |
I haven't checked, but this looks like a bug. Probably we should warn about this or even throw an exception if this configuration is provided. |
This It's default value is set to |
Yes, I know. |
@manusa, I had a concern regarding this too, if this was undetected here then anyone configuring it manually might face issue later on. We should provide exception if anyone tries to use the absolute path instead to the relative path. |
Component
JKube Kit
Task description
Description
Related to #1338
Originally posted by @l3002 in #2629 (comment)
When running
mvn clean install
on Windows, I see the following tests failing injkube-kit/build/service
module:TODO: Figure out what's not working as expected and propose a way to fix this
The text was updated successfully, but these errors were encountered: