Closed anmolghosh closed 1 month ago
WunderGraph commits fully to Open Source and we want to make sure that we can help you as fast as possible. The roadmap is driven by our customers and we have to prioritize issues that are important to them. You can influence the priority by becoming a customer. Please contact us here.
Hi @anmolghosh, this must be related to an old migration issue. I'd assume that you run Cosmo already for a while. You should be able to fix this by adding the column manually to the tables. The schema definition can be found here.
Hi @StarpTech
Yes we are running it for some time now. We are also in process of migrating the clickhouse from kubernetes hosted to cloud managed. I am assuming running the migration from scratch on the new cloud instance should fix any table inconsistencies.
Hi @StarpTech
Any reason the Table Schema is not updated in either of the schema file or migration folder:
Since the Cosmo's helm chart run the Clickhouse migration job by default using dbmate
when OtelCollector is enabled, this will never execute because of the clause CREATE TABLE IF NOT EXISTS
Ref:
So even if anyone is setting up cosmo from scratch, might face similar issue
Hi @StarpTech
I see the team have added helm hooks to handle it. Will do a fresh run and see how it goes.
Thanks again.
Suggestion: We should either delete the tables from controlplane/db/schema.sql
if the goal is to create initial tables with this or alternatively we can update the file to be in sync with latest schema
Hi, yes this should fix it.
Any reason the Table Schema is not updated in either of the schema file or migration folder:
This file is no longer in active use and is considered obsolete, so we plan to clean it up.
Unfortunately, OTEL collector migration was not included, and the fix has only been applied to customers who encountered issues. We understand this is not ideal, and we will make every effort to prevent such situations in the future.
Since the Cosmo's helm chart run the Clickhouse migration job by default using dbmate when OtelCollector is enabled, this will never execute because of the clause CREATE TABLE IF NOT EXISTS Ref:
The OTEL collector apply its own migrations. There is no automatism yet to modify the OTEL collector schema after the initial migration.
Feel free to reopen it when you think it was not resolved.
Component(s)
otelcollector
Component version
0.17.1
wgc version
0.40.2
controlplane version
0.107.0
router version
0.109.1
What happened?
Description
We have Cosmo deployed inside kubernetes cluster using the standard helm chart provided by Wundergraph team. When we are looking at the logs of otelcollector, we see following errors
Running a count query on the above table table inside clickhouse show all 3 tables have zero record.
Also, if we review the schema on the following file, we can verify that the column
ServiceName
was never defined in first place https://github.com/wundergraph/cosmo/blob/main/controlplane/db/schema.sqlSteps to Reproduce
Install Wundergraph cosmo using the standard helm chart with otelcollector enabled Prometheus is kept disabled on all components.
Expected Result
There are no errors in otelcollector logs and records are being inserted into corresponding clickhouse tables
Actual Result
All inserts to otel_metrics_sum, otel_metrics_gauge and otel_metrics_histogram are failing with error
Environment information
Environment
WunderGraph Cosmo Stack running on AWS EKS Kubernetes Cluster. Stack deployed using helm chart
Versions:
Router configuration
Router execution config
No response
Log output
Additional context
No response