GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — update java for cli images #2201 by bissquit · Pull Request #2203 · UnitTestBot/UTBotJava

Conversation

@bissquit

@bissquit bissquit commented May 12, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Description

Upgrade Java from 11 to 17 for CLI Docker images

Fixes #2201

How to test

Automated tests

Not applicable

Manual tests

Try to run tests generation using new images

Self-check list

  • I've set the proper labels for my PR (at least, for category and component).
  • PR title and description are clear and intelligible.
  • I've added enough comments to my code, particularly in hard-to-understand areas.
  • The functionality I've repaired, changed or added is covered with automated tests.
  • Manual tests have been provided optionally.
  • The documentation for the functionality I've been working on is up-to-date.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bissquit
update java for cli images #2201
1e8c453
@bissquit bissquit added ctg-enhancement New feature, improvement or change request comp-infrastructure Infrastructure issues comp-github-action GitHub action, gradle plugin or maven plugin labels May 12, 2023
@bissquit
bissquit requested a review from viktoriia-fomina May 12, 2023 06:42
@bissquit bissquit self-assigned this May 12, 2023
@bissquit
fix python commands
2525bc3
@bissquit

bissquit commented May 16, 2023

Copy link
Copy Markdown
Member Author

New JS image produce the following error:

Status Code: TEST_GENERATION_FAILED

TEST GENERATION: FAILED
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
09:44:06.660 | INFO  | JsGenerateTestsCommand | Generating tests for [/var/utbot/processing/utbot-javascript-773819/source.js] - started
09:44:06.920 | ERROR | JsGenerateTestsCommand | An error has occurred while generating tests for file /var/utbot/processing/utbot-javascript-773819/source.js : java.io.IOException: Cannot run program ""node"" (in directory "/var/utbot/processing/utbot-javascript-773819/utbotJs"): error=2, No such file or directory
java.io.IOException: Cannot run program ""node"" (in directory "/var/utbot/processing/utbot-javascript-773819/utbotJs"): error=2, No such file or directory
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
	at utils.JsCmdExec.runCommand(JsCmdExec.kt:20)
	at service.TernService.runTypeInferencer(TernService.kt:79)
	at service.TernService.<init>(TernService.kt:64)
	at api.JsTestGenerator.run(JsTestGenerator.kt:127)
	at org.utbot.cli.js.JsGenerateTestsCommand.run(JsGenerateTestsCommand.kt:102)
	at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:204)
	at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:213)
	at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:17)
	at com.github.ajalt.clikt.core.CliktCommand.parse(CliktCommand.kt:396)
	at com.github.ajalt.clikt.core.CliktCommand.parse$default(CliktCommand.kt:393)
	at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:411)
	at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:436)
	at org.utbot.cli.js.ApplicationKt.main(Application.kt:31)
Caused by: java.io.IOException: error=2, No such file or directory
	at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
	at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:314)
	at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
	... 14 more

And Python as well:

TEST GENERATION: FAILED
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
Error: no such option: "--visit-only-specified-source"

TEST RUN: ERROR OCCURRED
[object Object]: no details

But new Java is Ok

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@viktoriia-fomina

viktoriia-fomina commented May 16, 2023

Copy link
Copy Markdown
Member

For Python when running CLI without --visit-only-specified-source, there's an error in docker container with CLI:

# java -jar utbot-cli.jar generate_python ./example.py -s . -p /usr/bin/python3.9 -o ./tests.py --coverage ./coverage.py --install-requirements
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
13:20:26.009 | INFO  | PythonGenerateTestsCommand | Checking requirements...
java.io.IOException: Cannot run program "/usr/bin/python3.9": error=2, No such file or directory
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
        at org.utbot.python.utils.ProcessUtilsKt.startProcess(ProcessUtils.kt:14)
        at org.utbot.python.utils.ProcessUtilsKt.runCommand(ProcessUtils.kt:40)
        at org.utbot.python.utils.ProcessUtilsKt.runCommand$default(ProcessUtils.kt:39)
        at org.utbot.python.utils.RequirementsUtils.requirementsAreInstalled(RequirementsUtils.kt:22)
        at org.utbot.python.utils.RequirementsUtils.requirementsAreInstalled(RequirementsUtils.kt:16)
        at org.utbot.python.PythonTestGenerationProcessor.processTestGeneration(PythonTestGenerationProcessor.kt:74)
        at org.utbot.python.PythonTestGenerationProcessor.processTestGeneration$default(PythonTestGenerationProcessor.kt:39)
        at org.utbot.cli.language.python.PythonGenerateTestsCommand.run(PythonGenerateTestsCommand.kt:232)
        at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:204)
        at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:213)
        at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:17)
        at com.github.ajalt.clikt.core.CliktCommand.parse(CliktCommand.kt:396)
        at com.github.ajalt.clikt.core.CliktCommand.parse$default(CliktCommand.kt:393)
        at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:411)
        at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:436)
        at org.utbot.cli.language.python.ApplicationKt.main(Application.kt:31)
Caused by: java.io.IOException: error=2, No such file or directory
        at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
        at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:314)
        at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244)
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
        ... 17 more
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bissquit and others added 4 commits May 17, 2023 15:12
@bissquit
Merge branch 'main' of https://github.com/UnitTestBot/UTBotJava into …
a8d3e94
…egor-vasiliev/2201-upgrade-java-cli
@bissquit
install specified python version
39c7954
@viktoriia-fomina
Merge branch 'main' into egor-vasiliev/2201-upgrade-java-cli
9b8fd46
@viktoriia-fomina
Merge branch 'main' into egor-vasiliev/2201-upgrade-java-cli
199fa68
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@viktoriia-fomina viktoriia-fomina Awaiting requested review from viktoriia-fomina

At least 2 approving reviews are required to merge this pull request.

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@bissquit bissquit

Labels

comp-github-action GitHub action, gradle plugin or maven plugin comp-infrastructure Infrastructure issues ctg-enhancement New feature, improvement or change request

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Upgrade Java in utbot-cli images

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@bissquit @viktoriia-fomina
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.