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: Clickhouse Migration Failure After Version v3.28.2 #5577

Closed
tubone24 opened this issue Feb 16, 2025 · 6 comments
Closed

bug: Clickhouse Migration Failure After Version v3.28.2 #5577

tubone24 opened this issue Feb 16, 2025 · 6 comments

Comments

@tubone24
Copy link

tubone24 commented Feb 16, 2025

Describe the bug

During version upgrade, the following error occurs:

error: no migration found for version 7: read down for version 7 .: file does not existerror: no migration found for version 7: read down for version 7 .: file does not exist

Applying clickhouse migrations failed. This is mostly caused by the database being unavailable.

Impact

  • Migration process fails
  • Unable to complete version upgrade

Details
This issue was not present in version 3.28.1.

The problem appears to be related to the upgrade of the ClickHouse migration tool from v4.18.0 to v4.18.2 for Dockerfile web.

May be mistake commit? #5577 (comment)

v3.28.1...v3.28.2#diff-fe700949ba86403864aa7b6fdcab2c00c55e1047f73a6a282135a35e8a21e03bR85

Environment

To reproduce

Version up for 3.28.2.

SDK and container versions

No response

Additional information

No response

Are you interested to contribute a fix for this bug?

Yes

Copy link

dosubot bot commented Feb 16, 2025

The error you're encountering indicates that a migration file for version 7 is missing, which is causing the migration process to fail during the upgrade from version 3.28.1 to 3.28.2. This issue seems to be related to the upgrade of the ClickHouse migration tool from v4.16.2 to v4.18.2.

To address this issue, you can try the following steps:

  1. Verify Migration Files: Check the ./packages/shared/clickhouse/migrations/clustered/ directory in your Langfuse repository to ensure that all necessary migration files are present, including the one for version 7.

  2. Manual Migration: If the migration file is missing, you might need to manually create or apply the necessary migration. You can clone the Langfuse repository, adjust the cluster name in the SQL files if needed, and run the migration script using:

    cd ./packages/shared && sh ./clickhouse/scripts/up.sh
  3. Check Configuration: Ensure that your ClickHouse configuration and environment variables are correctly set, especially those related to the migration process, such as CLICKHOUSE_MIGRATION_URL and CLICKHOUSE_MIGRATION_SSL.

  4. Review Logs: Look into the logs for any additional error messages that might provide more context on why the migration file is not found.

If these steps do not resolve the issue, you may need to investigate further into the changes made between the versions or consult the Langfuse documentation for any additional troubleshooting steps specific to migration errors [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@tubone24
Copy link
Author

Related to issue #5573:

Potential Code Issue in Version 3.28.2

Upon investigation of the Docker image langfuse/langfuse:3.28.2, there appears to be a discrepancy between the tagged version and the actual package content[1]. The Docker image tagged as 3.28.2 contains code with package.json showing version 2.95.1[1], suggesting unintended code may have been included in the 3.28.2 release.

Evidence

  • Docker image version: 3.28.2
  • Internal package.json version: 2.95.1[1]

This version mismatch could be the source of reported issues, including problems with environment variable handling and migrations.

@toyayuto
Copy link

I can confirm this version mismatch issue when using self-hosted Langfuse.

When using Docker Compose setup, even if you clone the v3.28.2 tagged repository:

git clone -b v3.28.2 https://github.com/langfuse/langfuse.git

The application starts with version 2.95.1, despite having the following in docker-compose.yml:

services:
  langfuse-worker:
    image: langfuse/langfuse-worker:3
  langfuse-web:
    image: langfuse/langfuse:3

Even after trying to force an update:

docker compose down -v
docker compose up --pull always

The application still shows v2.95.1 instead of v3.28.2.

The workaround I found is to explicitly use version 3.28.1 in docker-compose.yml:

services:
  langfuse-worker:
    image: langfuse/langfuse-worker:3.28.1
  langfuse-web:
    image: langfuse/langfuse:3.28.1

This further confirms @tubone24's finding about the package version mismatch in the 3.28.2 release, where the Docker image contains v2.95.1 code instead of v3.28.2.

@superpoussin22
Copy link

same with 3.28.3 @maxdeichmann

@superpoussin22
Copy link

they just upgrade the docker images, and everything sounds good now ( worker and frontend )

@maxdeichmann
Copy link
Member

@superpoussin22, @tubone24, @toyayuto sorry for the bug. In our release process, we assigned tags to the wrong containers. We are improving the process on our end so this does not happen again. As of 2.28.3 everything should work as expected. If you run into further issues, please let me know.

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

No branches or pull requests

4 participants