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

bugfix: fix cron DataMigrate for Kubernetes 1.20 #3285

Conversation

TrafalgarZZZ
Copy link
Member

Ⅰ. Describe what this PR does

  • installs cronjob resources according to kubernetes version (batch/v1beta1 cronjobs for K8s < 1.22, batch/v1 cronjobs for K8s >= 1.22)
  • Refactor cron DataMigrate logic to support backward compatibility

Ⅱ. Does this pull request fix one issue?

fixes #3279

Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

A follow-up PR of #3280

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
@codecov
Copy link

codecov bot commented Jun 13, 2023

Codecov Report

Merging #3285 (c19f199) into master (0583537) will decrease coverage by 0.01%.
The diff coverage is 33.33%.

❗ Current head c19f199 differs from pull request most recent head 345d25d. Consider uploading reports for the commit 345d25d to get more accurate results

@@            Coverage Diff             @@
##           master    #3285      +/-   ##
==========================================
- Coverage   65.49%   65.48%   -0.01%     
==========================================
  Files         397      398       +1     
  Lines       23170    23179       +9     
==========================================
+ Hits        15175    15179       +4     
- Misses       6213     6215       +2     
- Partials     1782     1785       +3     
Impacted Files Coverage Δ
pkg/utils/datamigrate.go 64.78% <0.00%> (+6.56%) ⬆️
pkg/ddc/alluxio/transform_optimization.go 82.60% <25.00%> (-1.57%) ⬇️
pkg/utils/kubeclient/cronjob.go 42.85% <42.85%> (ø)

... and 1 file with indirect coverage changes

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
…p compatibility

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@TrafalgarZZZ
Copy link
Member Author

/test fluid-e2e

Copy link
Collaborator

@cheyang cheyang left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@fluid-e2e-bot
Copy link

fluid-e2e-bot bot commented Jun 13, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheyang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@fluid-e2e-bot fluid-e2e-bot bot merged commit 62c8293 into fluid-cloudnative:master Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Fluid fails to run on Kubernetes v1.20 because of missing API resource batch/v1beta1 cronjobs
2 participants