-
Notifications
You must be signed in to change notification settings - Fork 157
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 detail spec for platform provider and kind in the plugin architecture #5357
Conversation
Signed-off-by: Yoshiki Fujikane <[email protected]>
Signed-off-by: Yoshiki Fujikane <[email protected]>
Signed-off-by: Yoshiki Fujikane <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5357 +/- ##
=======================================
Coverage 25.41% 25.41%
=======================================
Files 445 446 +1
Lines 47793 47807 +14
=======================================
+ Hits 12146 12150 +4
- Misses 34697 34708 +11
+ Partials 950 949 -1 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost LGTM. I commented on one nitpick.
```golang | ||
func (a * Application) GetKind() string { | ||
// First, check the application is supported by the plugin architecture. It means that the kind is set to "Application". | ||
// If so, return the kind from the labels. | ||
if a.Kind == ApplicationKind_Application { | ||
return a.Labels["kind"] | ||
} | ||
|
||
// For backward compatibility, return the kind as string | ||
return a.Kind.String() | ||
} | ||
``` | ||
|
||
```golang | ||
func (d *Deployment) GetKind() string { | ||
// First, check the application is supported by the plugin architecture. It means that the kind is set to "Application". | ||
// If so, return the kind from the labels. | ||
if d.Kind == ApplicationKind_Application { | ||
return d.Labels["kind"] | ||
} | ||
|
||
// For backward compatibility, return the kind as string | ||
return d.Kind.String() | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nits] These snippets seem duplicated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ffjlabo Oops, thanks 🙏🏻
Signed-off-by: Yoshiki Fujikane <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look neat to me 👍
What this PR does:
Defined to use the
DeployTarget
instead ofPlatform Provider
, andlabels["kind"]
instead ofKind
in the plugin architecture.Why we need it:
We plan to introduce the alternatives for
PlatformProvider
andKind: K8sApp, ECSApp, ...
(existing kind) in the plugin architecture.But we should consider the backward compatibility. So I wrote how to do that in the rfc.
Which issue(s) this PR fixes:
Part of #5252
Does this PR introduce a user-facing change?: