-
Notifications
You must be signed in to change notification settings - Fork 103
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
Feat: collect app status from all envs #745
Conversation
@@ -315,6 +316,35 @@ func (c *applicationServiceImpl) GetApplicationStatus(ctx context.Context, appmo | |||
return &app.Status, nil | |||
} | |||
|
|||
// GetApplicationStatusFromAllEnvs get applications status from all envs | |||
func (c *applicationServiceImpl) GetApplicationStatusFromAllEnvs(ctx context.Context, appmodel *model.Application) ([]*apisv1.ApplicationStatusResponse, error) { | |||
envBindings, err := c.EnvBindingService.GetEnvBindings(ctx, appmodel) |
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.
Can we reuse the GetApplicationCR function?
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.
GetApplicationCR only return all applications that will loss env info.
Filter(c.RbacService.CheckPerm("envBinding", "detail")). | ||
Filter(c.appCheckFilter). | ||
Param(ws.PathParameter("appName", "identifier of the application ").DataType("string")). | ||
Returns(200, "OK", []*apis.ApplicationStatusResponse{}). |
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.
The response data is imperfection. Can't distinguish between different environments.
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.
This struct is as follows, it contain a filed envName
:
type ApplicationStatusResponse struct {
EnvName string `json:"envName"`
Status *common.AppStatus `json:"status"`
}
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #745 +/- ##
===========================================
- Coverage 61.09% 49.73% -11.36%
===========================================
Files 106 106
Lines 18543 18590 +47
===========================================
- Hits 11328 9245 -2083
- Misses 5823 8137 +2314
+ Partials 1392 1208 -184
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 42 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
089d697
to
52c59ab
Compare
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com> debug Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com> fix test Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com> fix tests Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com> fix tests Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com> fix tests Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
52c59ab
to
bba0079
Compare
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
* collect app status from all envs Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com> * fix comments Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com> debug Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com> fix test Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com> fix tests Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com> fix tests Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com> fix tests Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com> --------- Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com> Signed-off-by: liyanfang <liyanfang@cmss.chinamobile.com>
Description of your changes
collect app status from all envs
Fixes #
I have:
yarn lint
to ensure the frontend changes are ready for review.make reviewable
to ensure the server changes are ready for review.backport release-x.y
labels to auto-backport this PR if necessary.Special notes for your reviewer