Skip to content
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

Support emoji in path name for hawkeye-native image #57

Closed
tisonkun opened this issue Mar 2, 2023 · 8 comments · Fixed by #62
Closed

Support emoji in path name for hawkeye-native image #57

tisonkun opened this issue Mar 2, 2023 · 8 comments · Fixed by #62
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@tisonkun
Copy link
Member

tisonkun commented Mar 2, 2023

I don't dig into details now, but it seems if the path name contain emoji, HawkEye cannot work as expected.

@tisonkun tisonkun added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed bug Something isn't working and removed enhancement New feature or request labels Mar 2, 2023
@tisonkun
Copy link
Member Author

➜  ghreports git:(main) ✗ docker run --pull=always -it --rm -v $(pwd):/github/workspace -u $(id -u):$(id -g) ghcr.io/korandoru/hawkeye-native:edge check

edge: Pulling from korandoru/hawkeye-native
990ec64f338f: Pull complete 
50a474949013: Pull complete 
75b8c63a2442: Pull complete 
Digest: sha256:826ecfac070e4f5ef42b5779b90156d2f18b63beb844a01557567aa090db5e09
Status: Downloaded newer image for ghcr.io/korandoru/hawkeye-native:edge
java.lang.IllegalArgumentException: Unable to read file ./dashboard/???? Home.py
	at io.korandoru.hawkeye.core.FileContent.<init>(FileContent.java:43)
	at io.korandoru.hawkeye.core.document.Document.<init>(Document.java:48)
	at io.korandoru.hawkeye.core.document.DocumentFactory.getWrapper(DocumentFactory.java:68)
	at io.korandoru.hawkeye.core.document.DocumentFactory.createDocuments(DocumentFactory.java:51)
	at io.korandoru.hawkeye.core.LicenseProcessor.call(LicenseProcessor.java:112)
	at io.korandoru.hawkeye.command.HawkEyeCommandCheck.call(HawkEyeCommandCheck.java:45)
	at io.korandoru.hawkeye.command.HawkEyeCommandCheck.call(HawkEyeCommandCheck.java:29)
	at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
	at picocli.CommandLine.access$1300(CommandLine.java:145)
	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
	at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
	at picocli.CommandLine.execute(CommandLine.java:2078)
	at io.korandoru.hawkeye.command.HawkEyeCommandMain.main(HawkEyeCommandMain.java:35)
Caused by: java.io.FileNotFoundException: /github/workspace/./dashboard/???? Home.py (No such file or directory)
	at [email protected]/java.io.FileInputStream.open0(FileInputStream.java)
	at [email protected]/java.io.FileInputStream.open(FileInputStream.java:216)
	at [email protected]/java.io.FileInputStream.<init>(FileInputStream.java:157)
	at [email protected]/java.io.FileInputStream.<init>(FileInputStream.java:111)
	at [email protected]/sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:86)
	at [email protected]/sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:189)
	at [email protected]/java.net.URL.openStream(URL.java:1161)
	at org.apache.commons.io.IOUtils.toString(IOUtils.java:2953)
	at org.apache.commons.io.IOUtils.toString(IOUtils.java:2910)
	at io.korandoru.hawkeye.core.FileContent.<init>(FileContent.java:41)
	... 15 more
➜  ghreports git:(main) ✗ ~/Labs/hawkeye-1.5.4/hawkeye check
[main] WARN io.korandoru.hawkeye.command.HawkEyeCommandCheck - Processing unknown files: [/Users/chenzili/Brittani/ghreports/ghreports/__pycache__/__init__.cpython-311.pyc, /Users/chenzili/Brittani/ghreports/ghreports/__pycache__/client.cpython-311.pyc, /Users/chenzili/Brittani/ghreports/ghreports/__pycache__/datamodel.cpython-311.pyc, /Users/chenzili/Brittani/ghreports/poetry.lock, /Users/chenzili/Brittani/ghreports/.env]
[main] INFO io.korandoru.hawkeye.command.HawkEyeCommandCheck - Found missing header files: [/Users/chenzili/Brittani/ghreports/dashboard/🏡 Home.py]

It seems like a docker mount issue.

tisonkun added a commit that referenced this issue Mar 21, 2023
This closes #57.

The functionality may be fixed by #61.

Signed-off-by: tison <[email protected]>
@tisonkun tisonkun changed the title Support emoji in path name Support emoji in path name for hawkeye-native image Mar 21, 2023
@tisonkun tisonkun reopened this Mar 21, 2023
@tisonkun
Copy link
Member Author

cc @jdolitsky @dlorenc it seems the base image "cgr.dev/chainguard/graalvm-native" doesn't have emoji support so some Java functions are unsupported also. Is it possible to ship in the image or how can I do some patching?

@tisonkun
Copy link
Member Author

Temporary switch to ubuntu:jammy. It seems not something can be fixed in this project.

@tisonkun tisonkun reopened this Mar 21, 2023
@tisonkun
Copy link
Member Author

root@08e1c42337cc:/github/workspace# ls dashboard/
 Home.py   pages  ''$'\360\237\217\241'' Home.py'

Ubuntu jammy doesn't support emoji.

@tisonkun
Copy link
Member Author

It seems the root cause is the build image (ghcr.io/graalvm/native-image:ol9-java17-22.3.0) doesn't support emoji

@tisonkun
Copy link
Member Author

Fixed by 8433b64.

@jdolitsky
Copy link

@tisonkun - is this resolved now?

If there is any request on the cgr image, please file issue in https://github.com/chainguard-images/images

@tisonkun
Copy link
Member Author

tisonkun commented Mar 21, 2023

@jdolitsky Yes. Resolved (workaround). It should be an issue on graalvm/native-image side, see graalvm/container#46.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants