Skip to content

Conversation

@RajeevRanjan27
Copy link
Contributor

@RajeevRanjan27 RajeevRanjan27 commented Mar 19, 2024

Description

This include feature of getting the githash of artifacts deployed fot that app in app overview environment section
Also the same feature is there in the app group overview section too as requested.

Fixes #4797

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR requires documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have tested it for all user roles.
  • I have added all the required unit/api test cases.

Does this PR introduce a user-facing change?


…p and App Group Overview page (#4811)

* Added OpenApi specs for the global plugins

* Updated the Global-Plugin Specs for Patch Request handling

* Fixes the GlobalPlugin PatchPlugin request

* Fixes the GlobalPlugin PatchPlugin request modified

* removed the commented code of the GlobalPlugin PatchPlugin filtering

* Added the service of getting the Githash in the app overview and App group overview

* Modified the unnecesaary code in the service layer of getting the Githash in the app overview and App group overview
@RajeevRanjan27 RajeevRanjan27 changed the title feat: Add support for git hash in teh app and app group overview section feat: Add support for git hash in the app and app group overview section Mar 19, 2024
Type string `json:"type"`
AppId int `json:"appId"`
}
type CiArtifactWithParentArtifact struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

This should move at some common place

if _, ok := artifactChildParentMap[artifact.CiArtifactId]; ok {
ciArtifactIds = []int{artifactChildParentMap[artifact.CiArtifactId]}
}
} else if !slices.Contains(ciArtifactIds, artifactChildParentMap[artifact.CiArtifactId]) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Contains is a linear search, invoking inside for loop will make complexity exponential.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

resolved using map

}

gitCommits, exists := gitCommitsWithArtifacts[env.CiArtifactId]
if exists {
Copy link
Contributor

Choose a reason for hiding this comment

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

rewrite it for only one assignment and one initialisation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

solved

@@ -0,0 +1,615 @@
openapi: "3.0.3"
Copy link
Contributor

Choose a reason for hiding this comment

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

is it related ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not related

@sonarqubecloud
Copy link

Quality Gate Passed Quality Gate passed

Issues
2 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@RajeevRanjan27
Copy link
Contributor Author

this pr has been resolved in pr reference:

#4836

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request PR:Ready-to-Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Add support for git hash and sorting the environment list on App and App Group Overview page

4 participants