Failed upgrade due to legacy workflows

I downloaded youtrack-2020.5.3123.jar
restarted YT (as an upgrade from youtrack-2020.2.7479.jar)

Now YT won't start:
[YouTrack Error] Caused by: java.lang.IllegalStateException: Your YouTrack installation contains legacy workflows that are attached to at least one project. Here's a complete list: jetbrains-youtrack-slack
[YouTrack Error] To continue with the upgrade installation, you can either detach the workflows from all of the projects they are attached to, or convert them to JavaScript as described in this blog post: https://blog.jetbrains.com/youtrack/2019/03/state-of-youtrack-workflow-apis/

But I can't detach workflows without starting YT; and I can't downgrade.

I'm stuck with a broken youtrack.

How do I detach workflows so I can start YT?

6 comments
Comment actions Permalink
Official comment

Hi! 

I'm Sergey from the Youtrack Team. 

I've just replied to your direct support request, but I will leave a comment here in case someone else faces similar issues.

Generally, this error means that you have workflows, custom scripts that allow you to manipulate how different issue-related things work in your Youtrack. These workflows use the legacy syntax. We discontinued support for the legacy workflows in version 2018.3 (more than 2 years ago). Starting from 2020.5 (the most recent Youtrack update), they stopped working completely. Over the course of this couple of years, we've sent multiple emails to the Youtrack administrators as well as submitted several blog posts about the upcoming change.

As the legacy workflow support was cut in 2020.5 completely, Youtrack doesn't start if you have such workflows in your installation.

So if you face such an issue, the best solution would be restoring a database backup to the version you had before the upgrade. Then you should remove or replace these legacy workflows in Settings → Workflows following the instructions in this blog post: https://blog.jetbrains.com/youtrack/2019/03/state-of-youtrack-workflow-apis/ After that, upgrading will work without any interruptions.

If you don't have any backups, please reach out to our support team and tell us your installation type (e.g., jar, msi, zip). We'll look for an alternative solution for your case. 

Comment actions Permalink

We experience the same error. But lets start from the beginning:

We have had a running self hosted Youtrack Kubernetes Installation using this Image from Dockerhub: jetbrains/youtrack:2021.2.17925.

Everything worked fine, until today I restarted the Pod and then I got this error: "Your YouTrack installation contains legacy workflows that are attached to at least one project. Here's a complete list: Subtasks (jetbrains-youtrack-subtasks), Subtask Inherit Fix Versions (jetbrains-youtrack-subtaskInheritFixVersions)"

But now what?

  • My Youtrack does not start, so I dont know how to detach the workflows.
  • I tried to start with a completely new installation (new Persistent Volume in Kubernetes for data and config), and import the backup from last night --> Still the same error.
  • I wonder why it worked until I restarted? Because it must have already contained the deprecated subtask, and so why did it work up until I restarted?
  • I have backups from 1 week ago, but not further. And in this week I did not upgrade Youtrack or create a project. So I guess any of the backups already has the project with the deprected workflow.
  • I also cannot go back to an older version of Youtrack, because I cannot downgrade the production version from 2021.2.17925 to a lower one.

I am absolutely stuck, and I do not know, how I get my installation back. Is there a way to remove the problematic workflows, without youtrack actually starting (which it doesnt)?

Thanks a lot

Klaus

0
Comment actions Permalink

Hi Klaus,

I believe https://youtrack.jetbrains.com/issue/JT-65810 to be the reason for what has happened to your YouTrack installation.

To override the deprecated workflow check one can try the

-Djetbrains.youtrack.skipMpsWfDeprecationRefactoring=true 

start parameter.

I hope it helps.

0
Comment actions Permalink

Thanks for the quick reply and possible solution.

I do not know how or where to set this option. I use the Docker Image and start Youtrack by running the "run.sh" script.

- This script takes a file ONE_TIME_PARAMS /opt/youtrack/conf/internal/.one-time-parameters where I added "

-Djetbrains.youtrack.skipMpsWfDeprecationRefactoring=true 

 But it didnt work. Still getting the same error.

Can you point me to the right configuration file or command on how to start youtrack with this option using the "run.sh" script?
Thanks

0
Comment actions Permalink

I used the "run.sh" script like so:

run.sh configure --Djetbrains.youtrack.skipMpsWfDeprecationRefactoring=true

And get the error:

[APP-WRAPPER] Failed to configure YouTrack: java.util.concurrent.ExecutionException: com.jetbrains.bundle.exceptions.BadConfigurationException: The property Djetbrains.youtrack.skipMpsWfDeprecationRefactoring is unknown and could not be set by configure command
0
Comment actions Permalink

Now I got it. For references the command how I managed to configure Youtrack to skip the loading of the deprecated workflows and therefore not starting. I used this command (needed to read the "help" section more carefully):

cd /
./run
.sh configure -J-Djetbrains.youtrack.skipMpsWfDeprecationRefactoring=true
./run.sh

Thanks for the quick help

0

Please sign in to leave a comment.