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

Issue migrating datastore with 79c8da2 #1821

Closed
5 tasks done
pat-s opened this issue Jun 4, 2023 · 3 comments · Fixed by #1822
Closed
5 tasks done

Issue migrating datastore with 79c8da2 #1821

pat-s opened this issue Jun 4, 2023 · 3 comments · Fixed by #1822
Labels
bug Something isn't working

Comments

@pat-s
Copy link
Contributor

pat-s commented Jun 4, 2023

Component

server

Describe the bug

Most likely caused by #1817 or #1806?

{"time":"2023-06-04T08:53:12Z","message":"LogLevel = info"}
{"level":"error","error":"drop table `steps` columns [step_machine]: pq: column \"step_machine\" of relation \"steps\" does not exist","time":"2023-06-04T08:53:12Z","message":"migration task 'remove-machine-col' failed but is not required"}
{"level":"fatal","error":"pq: Could not complete operation in a failed transaction","time":"2023-06-04T08:53:12Z","message":"could not migrate datastore"}
Stream closed EOF for woodpecker/woodpecker-server-0 (server)

I also get the issue with next-317bd24abb (which is the commit just before #1817).

With next-f683c62748 all is good (commit before #1806)

FYI @qwerty287

System Info

-

Additional context

No response

Validations

  • Read the Contributing Guidelines.
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Checked that the bug isn't fixed in the next version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]
  • Check that this is a concrete bug. For Q&A join our Discord Chat Server or the Matrix room.
@pat-s pat-s added the bug Something isn't working label Jun 4, 2023
@6543 6543 closed this as completed in #1822 Jun 6, 2023
6543 added a commit that referenced this issue Jun 6, 2023
…ght away (#1822)

This isolates single migration tasks from each other.
The migration itself is now not atomic anymore but each single migration
now on it's own.
This takes load away from databases, as new sessions have a committed
schema available.

We also disable xorm.cache, as the speed improvements are minor but
invalid cache caused by schema changes did happen already in the past.

---------
Reverts #1817
Closes #1821

---------

Co-authored-by: 6543 <6543@obermui.de>
@6543
Copy link
Member

6543 commented Jun 6, 2023

@pat-s please test :) PS: keep in mind our latest main version does have the log bug -> #1802

@zc-devs
Copy link
Contributor

zc-devs commented Jun 6, 2023

next-556607b5 works for me: there is no the migration issue and logs streaming works too.

@pat-s
Copy link
Contributor Author

pat-s commented Jun 6, 2023

Yup works again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants