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

Add kind APPLICATION #5358

Closed
wants to merge 4 commits into from
Closed

Add kind APPLICATION #5358

wants to merge 4 commits into from

Conversation

ffjlabo
Copy link
Member

@ffjlabo ffjlabo commented Nov 21, 2024

What this PR does:

Added new kind APPLICATION as ApplicationKind and the method to get the kind as string. This is for the app in pipedv1.

In the pipedv1, we use labels["kind"] instead of the current Kind.

See more: https://github.com/pipe-cd/pipecd/blob/master/docs/rfcs/0015-pipecd-plugin-arch-meta.md#for-kind

Why we need it:

Which issue(s) this PR fixes:

Part of #5252

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):

Signed-off-by: Yoshiki Fujikane <ffjlabo@gmail.com>
Signed-off-by: Yoshiki Fujikane <ffjlabo@gmail.com>
Signed-off-by: Yoshiki Fujikane <ffjlabo@gmail.com>
@@ -78,6 +78,17 @@ func (a *Application) ContainLabels(labels map[string]string) bool {
return true
}

func (a *Application) GetKindString() string {
Copy link
Member Author

Choose a reason for hiding this comment

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

I wanted to use GetKind. But there is the same name method generated by protobuf.

Copy link

codecov bot commented Nov 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 25.43%. Comparing base (a5ca8df) to head (cffd56a).
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5358      +/-   ##
==========================================
+ Coverage   25.41%   25.43%   +0.02%     
==========================================
  Files         446      446              
  Lines       47807    47821      +14     
==========================================
+ Hits        12150    12164      +14     
  Misses      34708    34708              
  Partials      949      949              

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


🚨 Try these New Features:

@ffjlabo ffjlabo changed the title Add application definition Add kind APPLICATION Nov 21, 2024
Signed-off-by: Yoshiki Fujikane <ffjlabo@gmail.com>
@ffjlabo ffjlabo force-pushed the add-application-definition branch from f0fd4d8 to cffd56a Compare November 21, 2024 10:17
Copy link
Contributor

@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.

👍🏻

@ffjlabo
Copy link
Member Author

ffjlabo commented Nov 25, 2024

After a discussion with @khanhtc1202, I found that this is no use for pipedv1.

We don't use the Kind and Platform Provider because we migrate the DB data before updating pipedv1.
After updated, the pipedv1 refers labels["kind"] and daployTarget instead of Kind and Platform Provider.

So, close this PR.

FYI, draft migration process.

  1. Update data for the pipedv1
  • Add the label kind based on the current Application Kind to the Application.
  • Add deployTarget based on the current Application Platform Provider to the Application.
  1. update to pipedv1 (users can use existing application at the time)

@ffjlabo ffjlabo closed this Nov 25, 2024
@ffjlabo ffjlabo deleted the add-application-definition branch November 25, 2024 11:47
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.

2 participants