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

chore: infra configuration refactored #6286

Open
wants to merge 17 commits into
base: develop
Choose a base branch
from
Open

Conversation

Ash-exp
Copy link
Contributor

@Ash-exp Ash-exp commented Jan 15, 2025

Description

Fixes #

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?


Copy link

The migration files have successfully passed the criteria!!

Copy link

The migration files have successfully passed the criteria!!

Copy link

The migration files have successfully passed the criteria!!

Copy link

The migration files have successfully passed the criteria!!

Comment on lines 47 to 56
switch configKey {
case v1.CPU_LIMIT, v1.CPU_REQUEST:
return impl.getCPUConfigFactory().formatTypedValueAsString(configValue)
case v1.MEMORY_LIMIT, v1.MEMORY_REQUEST:
return impl.getMemoryConfigFactory().formatTypedValueAsString(configValue)
case v1.TIME_OUT:
return impl.getTimeoutConfigFactory().formatTypedValueAsString(configValue)
default:
return "", fmt.Errorf("config key %q not supported", configKey)
}
Copy link
Member

Choose a reason for hiding this comment

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

ideally ent files should not contain any business logic. If this are to be used in oss let's move these to normal file

Copy link
Member

Choose a reason for hiding this comment

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

use override logic for ent

Comment on lines 55 to 61
profileIds := make([]int, 0)
infraProfilesEntities, err := impl.infraProfileRepo.GetProfileListByIds(profileIds, includeDefault)
if err != nil {
impl.logger.Errorw("error in fetching profile entities by ids", "scope", scope, "profileIds", profileIds, "error", err)
return nil, profileIds, err
}
return infraProfilesEntities, profileIds, err
Copy link
Member

Choose a reason for hiding this comment

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

to be written in oss

Copy link

The migration files have successfully passed the criteria!!

Copy link

The migration files have successfully passed the criteria!!

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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