Skip to content

[Headless mode] Revive headless mode#493

Open
Hello-zoka wants to merge 4 commits intoheadless-modefrom
izaitsev/features/headless-revive
Open

[Headless mode] Revive headless mode#493
Hello-zoka wants to merge 4 commits intoheadless-modefrom
izaitsev/features/headless-revive

Conversation

@Hello-zoka
Copy link
Copy Markdown
Collaborator

@Hello-zoka Hello-zoka commented May 2, 2025

Description of changes made

Migrated to the newer API for running a headless task. Added proper dependencies, so the grazie module is linked correctly.
Added missed value for AppStarter and adjusted it to the API changes.

Now, the headless-mode branch is in the development state, except for having a headless task.

Testing

You can use such a task:

headless -p "path/to/TestSpark" -Proot="path/to/project/under/test/test_java_maven" -Pfile="path/to/class/under/test/Calc.java" -Pcut="org.example.Calc" -Pcp="paht/to/testproject/test_java_maven/target/classes" -Pjunitv="5" -Pjavahome="java/home/path" -Pllm="GPT-4o" -Ptoken="your token here" -Pprompt="path to prompt" -Pout="path to out dir" -PenableCoverage="true" -Dspace.username="your username" -Dspace.pass="your space password" -Didea.system.path --stacktrace


Headless-mode branch updates, which were done by hand for a better review experience:

  • Rebase with development
  • Reverting commit "remove headless mode"
  • Ktlint fixes for files that are not present in development

Why is a merge request needed

Headless mode has not been working in a single branch since the V2 migration.

What is missing?

  • I've faced some problems(not every single run) with running Jacoco for collecting coverage. The reason seems to be with the incorrect project resolve, so the projectContext.cut is null.

  • Merge Kotlin for headless PR

  • I have checked that I am merging into the correct branch

@Hello-zoka Hello-zoka marked this pull request as draft May 2, 2025 16:36
@Hello-zoka Hello-zoka changed the base branch from headless-mode to development May 5, 2025 13:19
@Hello-zoka Hello-zoka changed the base branch from development to headless-mode May 5, 2025 13:19
@Hello-zoka Hello-zoka force-pushed the izaitsev/features/headless-revive branch from 7770abb to 7ebfef1 Compare May 5, 2025 13:30
@Hello-zoka Hello-zoka force-pushed the izaitsev/features/headless-revive branch from 7ebfef1 to 385f5b6 Compare May 5, 2025 13:48
@arksap2002 arksap2002 marked this pull request as ready for review May 5, 2025 13:56
@vsantele
Copy link
Copy Markdown
Contributor

vsantele commented May 7, 2025

It seems that some processes are not closed when the headless mode is exited.

When I try to run the tga-pipeline with this branch, the first execution seems to work (I got the message [TestSpark Starter] Test generation failed but it runs). And from the second execution, the gradle task failed with the following error:

FAILURE: Build failed with an exception.

* Where:
Build file '/var/tools/TestSpark/build.gradle.kts' line: 256

* What went wrong:
Could not isolate value org.jetbrains.intellij.platform.gradle.providers.ProductReleasesValueSource$Parameters_Decorated@4848516e of type ProductReleasesValueSource.Parameters
> Failed to query the value of property 'types'.
   > A build operation failed.
         Could not move inconsistent immutable workspace (/root/.gradle/caches/8.9/transforms/171d22bf30ca729299def96749c1f352) to temporary location (/root/.gradle/caches/8.9/transforms/171d22bf30ca729299def96749c1f352-a10e99a6-0ede-4847-991e-90b2940048e7)
      > Could not move inconsistent immutable workspace (/root/.gradle/caches/8.9/transforms/171d22bf30ca729299def96749c1f352) to temporary location (/root/.gradle/caches/8.9/transforms/171d22bf30ca729299def96749c1f352-a10e99a6-0ede-4847-991e-90b2940048e7)

Every time I get an error like Could not move inconsistent immutable workspace, it's because a process is still running and using a file inside the location. I don't know which one yet.

Maybe it's related to [TestSpark Starter] Test generation failed in the first run, I can't see the stacktrace right now.

If you don't think this issue is related to this PR, feel free to ignore it. I'll keep investigating on my own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants