Skip to content

Deployment chart keda #6731

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

Closed
wants to merge 28 commits into from
Closed

Deployment chart keda #6731

wants to merge 28 commits into from

Conversation

YashasviDevtron
Copy link
Contributor

@YashasviDevtron YashasviDevtron commented Jul 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?


Summary by Bito

The pull request implements comprehensive improvements across the codebase, addressing type consistency and error handling in user attributes and API token services, while modernizing event payload generation. It updates dependency references and refines package imports for enhanced maintainability. The modifications integrate advanced JSON parsing and merging mechanisms in the attributes service.

Ash-exp and others added 28 commits June 24, 2025 03:56
* notifier v1 removed

* notifier v1 removed
…rviceImpl` to make token visibility configurable
fix: Build get Stuck Indefinitely in case of K8s Driver When Node Termination Occurs
feat: enhance patch support for user attribute patch api within nested structure
Copy link

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP 404).\n

Copy link

Copy link

Changelist by Bito

This pull request implements the following key changes.

Key Change Files Impacted
Bug Fix - User Attributes and API Initialization Corrections

UserAttributesRestHandler.go - Updated type signatures to use bean.UserAttributesDto for improved data consistency.

wire_gen.go - Revised ApiTokenService initialization to handle errors properly.

Other Improvements - Dependency and Import Enhancements

ArgoClientWrapperService.go - Switched retryFunc import to the common-lib utils, removing deprecated usage.

go.mod - Adjusted dependency versions for authenticator and common-lib to their updated releases.

go.sum - Reflected module checksum updates corresponding to the dependency version changes.

Feature Improvement - Event, Token, and Attributes Service Upgrades

EventClient.go - Migrated event payload creation to the v2 implementation and removed legacy notifier flag.

ApiTokenService.go - Enhanced token service with configuration support and improved error logging.

UserAttributesService.go - Refactored service to use bean types and introduced robust JSON merging for user attributes.

Testing - User Attributes Service Test Enhancements

UserAttributesService_test.go - Added comprehensive test cases to validate merge logic and resource initialization in user attributes service.

Feature Improvement - Adapter Enhancement for User Attributes

adapter.go - Introduced BuildResponseDTO function to construct UserAttributesDto leveraging bean definitions.

Feature Improvement - Bean Definitions Enhancement

bean.go - Introduced UserPreferencesResourcesKey constant and added UserAttributesDto type for better data handling.

Feature Improvement - Build Trigger Service Flag Enhancements

HandlerService.go - Refactored build trigger services to use BuildxGlobalFlags, updating workflow request handling for build cache improvements.

HandlerService_ent.go - Updated build trigger service endpoint to incorporate new BuildxGlobalFlags configuration.

Other Improvements - Git Operations Retry Mechanism Update

GitOperationService.go - Updated retry function usage and error handling for Git commit operations.

GitServiceAzure.go - Optimized retryFunc import for Azure Git service interactions.

GitServiceBitbucket.go - Replaced deprecated retryFunc usage with common-lib version for Bitbucket service.

GitServiceGithub.go - Refined retry mechanism by updating retry function import in GitHub service.

GitServiceGitlab.go - Switched to common-lib retryFunc for improved error handling in GitLab service.

Feature Improvement - Workflow Configuration Enhancement

Workflow.go - Added BuildxInterruptionMaxRetry field to workflow request types for improved build management.

Bug Fix - Deployment Chart Configuration Corrections

values.yaml - Removed redundant idleReplicaCount and standardized autoscaling settings.

Copy link

@bito-code-review bito-code-review bot left a comment

Choose a reason for hiding this comment

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

Code Review Agent Run #ae4fc3

Actionable Suggestions - 1
  • pkg/attributes/UserAttributesService.go - 1
Review Details
  • Files reviewed - 21 · Commit Range: a93ab0e..4dfe4f8
    • api/restHandler/UserAttributesRestHandler.go
    • client/argocdServer/ArgoClientWrapperService.go
    • client/events/EventClient.go
    • cmd/external-app/wire_gen.go
    • go.mod
    • go.sum
    • pkg/apiToken/ApiTokenService.go
    • pkg/attributes/UserAttributesService.go
    • pkg/attributes/UserAttributesService_test.go
    • pkg/attributes/adapter/adapter.go
    • pkg/attributes/bean/bean.go
    • pkg/build/trigger/HandlerService.go
    • pkg/build/trigger/HandlerService_ent.go
    • pkg/deployment/gitOps/git/GitOperationService.go
    • pkg/deployment/gitOps/git/GitServiceAzure.go
    • pkg/deployment/gitOps/git/GitServiceBitbucket.go
    • pkg/deployment/gitOps/git/GitServiceGithub.go
    • pkg/deployment/gitOps/git/GitServiceGitlab.go
    • pkg/pipeline/types/Workflow.go
    • scripts/devtron-reference-helm-charts/deployment-chart_4-21-0/values.yaml
    • wire_gen.go
  • Files skipped - 3
    • env_gen.json - Reason: Filter setting
    • env_gen.md - Reason: Filter setting
    • vendor/modules.txt - Reason: Filter setting
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • SNYK (Security Vulnerability) - ✔︎ Successful
    • GOVULNCHECK (Security Vulnerability) - ✖︎ Failed
    • OWASP (Security Vulnerability) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

@@ -203,7 +262,7 @@ func (impl UserAttributesServiceImpl) GetUserAttribute(request *UserAttributesDt
impl.logger.Errorw("error in fetching user attributes", "req", request, "error", err)
return nil, errors.New("error occurred while getting user attributes")
}
resAttrDto := &UserAttributesDto{
resAttrDto := &bean.UserAttributesDto{

Choose a reason for hiding this comment

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

Missing UserId field in response DTO

Missing UserId field assignment in GetUserAttribute response DTO construction. The bean.UserAttributesDto struct includes a UserId field, but it's not being set in the response, causing incomplete data to be returned. Add UserId: request.UserId, to the struct initialization.

Code suggestion
Check the AI-generated fix before applying
 @@ -265,6 +265,7 @@
  	resAttrDto := &bean.UserAttributesDto{
  		EmailId: request.EmailId,
  		Key:     request.Key,
  		Value:   modelValue,
 +		UserId:  request.UserId,
  	}
  	return resAttrDto, nil

Code Review Run #ae4fc3


Should Bito avoid suggestions like this for future reviews? (Manage Rules)

  • Yes, avoid them

Copy link

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP 404).\n

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.

6 participants