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

feat: cd pipeline deployment history refactoring #5200

Merged
merged 5 commits into from
Jun 6, 2024

Conversation

kartik-579
Copy link
Member

@kartik-579 kartik-579 commented May 29, 2024

Description

Fixes #5255

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?


@kartik-579 kartik-579 changed the title feat: cd pipeline deployment history migration feat: cd pipeline deployment history refactoring Jun 6, 2024
Copy link

sonarcloud bot commented Jun 6, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
4.0% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@kartik-579 kartik-579 merged commit b006b34 into main Jun 6, 2024
6 of 7 checks passed
@kartik-579 kartik-579 deleted the feature-release-v2-history branch June 6, 2024 10:16
Ash-exp added a commit that referenced this pull request Jun 10, 2024
* feat: replace user_deployment_request.status with pipeline_status_timelines

* updated schema migration script

* fix: migration script

* update readme to include multi arch flag (#4998)

* updated trigger event func and timeline names

* review comment incorporation

* fix: GetAllInCompleteRequests query

* fix: GetAllInCompleteRequests query

* fixed: UpdatePreviousQueuedRunnerStatus error

* fix: loogers

* doc: Added enhancements to security doc (#5203)

* Rough Draft Initiated

* Created Security Enhancement Docs + Other Adhoc Fixes

* Incorporated PM Feedback

* Modified Portforward Section to Kubectl Section (#5236)

* feat: cd pipeline deployment history refactoring (#5200)

* searchableKey service move

* migrated cd deployment history code

* idempotency of triggerPipeline func and minor fixes

* timeline fixes

* updated: NewTriggerEvent func

* updated ErrorDeploymentSuperseded err handling

* updated: GetArgoPipelinesHavingLatestTriggerStuckInNonTerminalStatuses statuses

* fix: timeline status

* refactored: UpdatePreviousQueuedRunnerStatus

* fix: GetPreviousQueuedRunners query

* fix: UpdateRunnerStatusToFailedForIds query

* fix: buildTriggerEventForOverrideRequest func

* fix: UpdateRunnerStatusToFailedForIds query

* fix: UpdateRunnerStatusToFailedForIds query

* updated: handleAsyncTriggerReleaseError func

* fix: concurrent case handlings

* updated folder name

* updated GetLastStatusPublishedTimeForWfrId func

* feat: removed audit timeline and error handlings

* fix: FetchTimelinesForWfrIdExcludingStatuses query

* fix: deleted pipeline flow

* timeline handling

* timeline handling fixed

* removed unused const

* chore: updated go-bitbucket version

* removed unnecessary alais

---------

Co-authored-by: ayu-devtron <[email protected]>
Co-authored-by: ashokdevtron <[email protected]>
Co-authored-by: kartik-579 <[email protected]>
Ash-exp added a commit that referenced this pull request Jun 19, 2024
* chore: context refactoring for gitops async

* chore: refactored context for argo app deploy operations

* tracer refactoring wip

* fixed: timeline status update issue and added force sync param - WIP

* fixed: undeclared varibale

* env gen updated

* common-lib version updated

* async deployment gitops and CEL expression

* chore: cel library added

* chore: go mod tidy

* feat: Async gitops deployment flow

* updated trigger pipeline scope

* triggerPipeline refactoring

* runner status update

* udpated pipelineOverride object in GetValuesOverrideForTrigger

* updated UserDeploymentRequest status

* cron method: incomplete deployment request

* updated alias naming

* updated alias naming

* updated go-bitbucket librabry

* added github.com/ash-exp/go-bitbucket

* chore: refactoring

* added migration script

* self review fixes - wip

* chore: ProcessIncompleteDeploymentReq updated

* updated migration and added util test cases

* updated test file name

* fix: trigger history audit step

* fix: status update for trigger audit

* chore: tracer refactoring

* removed comment

* removed duplicate status updates

* added NATS graceful shutdown

* fixed wire injection issue

* fixed: migration issues

* fix: deployment status update

* fix: nil UserDeploymentRequest model on save

* fix: UserDeploymentRequestRepositoryImpl.FindByCdWfIds nil model

* udpated validateStatusUpdate for user  deployment request

* removed duplicate flag

* fix: nil pointer in logger

* updated save userDeploymentRequest func

* updated save userDeploymentRequest func

* udpated: extractAsyncCdDeployRequestFromEventMsg

* fix: handled panic issues

* updated MarkCurrentDeploymentFailed func

* added tracer

* fix: unauthorized on async deployment

* fixed: updateTriggerEventForIncompleteRequest

* fixed envOverride.Environment data

* updateTriggerEventForIncompleteRequest for no gitops deployment types

* updated CreateHistoriesForDeploymentTrigger

* fix: updated history status

* fix: create history error

* fix: UpdateStatusForCdWfIds

* nil pointer check fix

* wire gen file

* removed unnecessary loggers

* fix: logger type

* create cm/cs history in transaction

* wirer gen file

* fix: nil pointer handling

* fix: TerminateForPipelineId func

* fix: UserDeploymentRequest db struct

* updated UpdateCDWorkflowRunnerStatus func

* fix: logger noise from markImageScanDeployed

* updated auto trigger loggers and ProcessConcurrentAsyncDeploymentReq context

* refactored: saveDeploymentTriggerHistory

* refactored: trigger async release

* fix: GetAllInCompleteRequests query

* fix: UNABLE_TO_FETCH timeline handling

* fix: async deployment request lock

* feat: gitops async with timeline (#5286)

* feat: replace user_deployment_request.status with pipeline_status_timelines

* updated schema migration script

* fix: migration script

* update readme to include multi arch flag (#4998)

* updated trigger event func and timeline names

* review comment incorporation

* fix: GetAllInCompleteRequests query

* fix: GetAllInCompleteRequests query

* fixed: UpdatePreviousQueuedRunnerStatus error

* fix: loogers

* doc: Added enhancements to security doc (#5203)

* Rough Draft Initiated

* Created Security Enhancement Docs + Other Adhoc Fixes

* Incorporated PM Feedback

* Modified Portforward Section to Kubectl Section (#5236)

* feat: cd pipeline deployment history refactoring (#5200)

* searchableKey service move

* migrated cd deployment history code

* idempotency of triggerPipeline func and minor fixes

* timeline fixes

* updated: NewTriggerEvent func

* updated ErrorDeploymentSuperseded err handling

* updated: GetArgoPipelinesHavingLatestTriggerStuckInNonTerminalStatuses statuses

* fix: timeline status

* refactored: UpdatePreviousQueuedRunnerStatus

* fix: GetPreviousQueuedRunners query

* fix: UpdateRunnerStatusToFailedForIds query

* fix: buildTriggerEventForOverrideRequest func

* fix: UpdateRunnerStatusToFailedForIds query

* fix: UpdateRunnerStatusToFailedForIds query

* updated: handleAsyncTriggerReleaseError func

* fix: concurrent case handlings

* updated folder name

* updated GetLastStatusPublishedTimeForWfrId func

* feat: removed audit timeline and error handlings

* fix: FetchTimelinesForWfrIdExcludingStatuses query

* fix: deleted pipeline flow

* timeline handling

* timeline handling fixed

* removed unused const

* chore: updated go-bitbucket version

* removed unnecessary alais

---------

Co-authored-by: ayu-devtron <[email protected]>
Co-authored-by: ashokdevtron <[email protected]>
Co-authored-by: kartik-579 <[email protected]>

* main branch merge

* vendor files updated

* udpated migration number

* fix: build issues

* chore: updated migration number

* fix: context canceling issue

* feat: git commit retry

* updated migration number

* fix: bitbucket git commit issue

* feat: env varibales for retry count and delay

* migration script updated

---------

Co-authored-by: ayu-devtron <[email protected]>
Co-authored-by: ashokdevtron <[email protected]>
Co-authored-by: kartik-579 <[email protected]>
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.

Perf: cd deployment history api refactoring
2 participants