Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

SVT : Mac : Cannot create or import Appsody Kitura projects #2699

Closed
mmulholl opened this issue Apr 16, 2020 · 6 comments · Fixed by #2705
Closed

SVT : Mac : Cannot create or import Appsody Kitura projects #2699

mmulholl opened this issue Apr 16, 2020 · 6 comments · Fixed by #2705

Comments

@mmulholl
Copy link

**Codewind version:**0.11.0.v202004091756
**OS:**Mac

Che version:
IDE extension version:
**IDE version:**Eclipse jee 2019-09, VSCode
Kubernetes cluster:

Description:
Appsody kitura project will not create or import using eclipse or VSCode. Wizards do not show an error but the project fails to appear in the codewind project list. For example see this in the pfe logs:

[16/04/20 16:05:42 /portal/routes/projects/remoteBind.route.js] [ERROR] Project creation failed for project appsodyKituraTest011. Error: { [Error: EACCES: permission denied, open ‘/mounted-workspace/appsodyKituraTest011/.appsody/AppsodyKitura/Tests/LinuxMain.swift’]
errno: -13,
code: ‘EACCES’,
syscall: ‘open’,
path:
‘/mounted-workspace/appsodyKituraTest011/.appsody/AppsodyKitura/Tests/LinuxMain.swift’ }

Steps to reproduce:
Try creating a new appsodt kiutra project

Workaround:

@sujeilyfonseca
Copy link

Codewind version: 0.11.0
OS: Mac OS Mojave 10.14.6, VM with Windows 10, Linux/Ubuntu

IDE extension version: 0.11.0
IDE version: Code 1.44.0

I reproduced the problem on Mac, using Appsody Kitura. I attempted to create/import the project, but nothing happened:

Screen Shot 2020-04-16 at 1 07 28 PM

I was not able to reproduce the problem on Linux and Windows:

Screen Shot 2020-04-16 at 1 18 11 PM

Screen Shot 2020-04-16 at 1 19 20 PM

Screen Shot 2020-04-16 at 1 19 36 PM

Screen Shot 2020-04-16 at 1 20 22 PM

@mmulholl
Copy link
Author

mmulholl commented Apr 16, 2020

I re-installed Codewind 0.9.0 on my Mac and appsody kitura projects worked OK.

@makandre
Copy link
Contributor

Sigh... I think my fix for Quarkus #2657 exposed this problem. The file in question .appsody/AppsodyKitura/Tests/LinuxMain.swift has only read access in the stack. So when I preserved the timestamp I think it's also preserving the access bits? I think I can work around this...

@makandre
Copy link
Contributor

I've put up new PRs to refine my previous fix for Quarkus.

Somehow, when preserveTimestamps is enabled for fs.copy, it will try to modify that LinuxMain.swift file which has only read access as I mentioned previously. This failed the project creation in bind/end function.

The new fix adds a param to the copyProject function to control whether we want to preserve timestamp or not: defaults to false in bind/end (so Kitura will work), and pass in true in upload/end (required for Quarkus to work)

When we update a file in a Kitura project we'll still see the EACCES error in the log but I verified it seems harmless and my change is reflected in the application. I suggest we can track this issue separately.

@hhellyer
Copy link
Contributor

hhellyer commented Apr 17, 2020

I've raised #2705 as an alternative fix for this after some googling showed this was actually a bug in fs-extra. It's fixed in the latest release and my PR just upgrades to that.

The fs-extra issue is here:
jprichardson/node-fs-extra#629

I think #2705 is the correct fix but there's an argument for going with @makandre's fix #2701 in 0.11.0 as it doesn't involve updating a package and potentially the notices file. It also means we don't have to retest just in case fs-extra 9.0.0 has any new bugs.

I'll discuss this with @makandre when he comes online.

@makandre
Copy link
Contributor

@hhellyer thanks for finding that. I agree we should fix it the right way (updating fs-extra) in master, and go with my workaround fix for 0.11.0 to avoid more churn.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants