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

bug: Migration from v1 to v2 fails #5345

Closed
i-am-dev opened this issue Feb 21, 2025 · 2 comments
Closed

bug: Migration from v1 to v2 fails #5345

i-am-dev opened this issue Feb 21, 2025 · 2 comments
Assignees
Labels
bug Something isn't working release: 1.467.1

Comments

@i-am-dev
Copy link

Describe the bug

Updating the image on one of the worker groups started the migration process.

Once it got to the v1 to v2 migration it fails after a few minutes and then the container terminates and gets restarted and attempts again. This is happening in a continuous loop.

2025-02-21T06:16:12.576439429Z 2025-02-21T06:16:12.575768Z INFO windmill-api/src/db.rs:93: Acquired global PG lock

2025-02-21T06:16:12.587240719Z 2025-02-21T06:16:12.587029Z INFO windmill-api/src/db.rs:130: Started applying migration 20250201124748: v2 migrate from v1

2025-02-21T06:18:32.191178681Z 2025-02-21T06:18:32.190955Z INFO windmill-api/src/db.rs:156: Finished applying migration 20250201124748

2025-02-21T06:18:32.232113713Z Error: Error migrating db: Migrating database: while executing migration 20250201124748: error returned from database: value too long for type character varying(50)

To reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

That the migration is successful?

Screenshots

No response

Browser information

No response

Application version

Windmill EE v1.447.5

Additional Context

No response

@i-am-dev i-am-dev added the bug Something isn't working label Feb 21, 2025
@rubenfiszel
Copy link
Contributor

Hi @i-am-dev ,

The migration has a small mistake which is that it limits the tag length to 50 chars for jobs which it didn't before. We are working on a solution but for now the best is to shorten those tags prior to migration:

SELECT id, tag FROM queue WHERE LENGTH(tag) > 50;
SELECT id, tag FROM completed_job WHERE LENGTH(tag) > 50;

UPDATE queue SET tag = <shorter_tag>  WHERE tag = <longer_tag>;
UPDATE completed_job SET tag = <shorter_tag> WHERE tag = <longer_tag>;

@i-am-dev
Copy link
Author

Resolved by changing tag lengths to under 50 chars.
Also removed the cache mount on the workers to resolve a symlink error in installing python.

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

No branches or pull requests

2 participants