Skip to content

Add deployment trace model encode/decode logic for MySQL datastore #5651

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

Merged
merged 1 commit into from
Mar 12, 2025

Conversation

khanhtc1202
Copy link
Member

What this PR does:

as title

Why we need it:

Without this, in case of using MySQL as the datastore of PipeCD control plane, the datastore backend doesn't understand how to encode model object to store to MySQL table 😓

We will get the below error

caller: "mysql/mysql.go:159"
error: "*model.DeploymentTrace is not supported"
kind: "DeploymentTrace"
logger: "pipecd.server"
message: "failed to create entity: failed to encode json data"

Which issue(s) this PR fixes:

Follow PR #5622

Does this PR introduce a user-facing change?:

  • How are users affected by this change:
  • Is this breaking change:
  • How to migrate (if breaking change):

@khanhtc1202 khanhtc1202 enabled auto-merge (squash) March 12, 2025 09:10
Copy link
Member

@ffjlabo ffjlabo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

@Warashi Warashi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@khanhtc1202 khanhtc1202 merged commit cb5b661 into master Mar 12, 2025
16 checks passed
@khanhtc1202 khanhtc1202 deleted the mysql-deployment-trace-model branch March 12, 2025 09:15
Copy link

codecov bot commented Mar 12, 2025

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Project coverage is 25.56%. Comparing base (16089a9) to head (5011b59).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
pkg/datastore/mysql/model_wrapper.go 0.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5651      +/-   ##
==========================================
- Coverage   25.56%   25.56%   -0.01%     
==========================================
  Files         477      477              
  Lines       51080    51088       +8     
==========================================
  Hits        13060    13060              
- Misses      37015    37023       +8     
  Partials     1005     1005              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions github-actions bot mentioned this pull request Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants