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

fix: cd pipeline delete, 404 issue #2939

Merged
merged 1 commit into from
Feb 7, 2023
Merged

Conversation

vikramdevtron
Copy link
Contributor

@vikramdevtron vikramdevtron commented Feb 7, 2023

Description

Issues On deleting cd pipeline which have no deployment app created, 404 for app status, trying to delete app status which is not present till deployment app created. made check there.

Fixes # https://dev.azure.com/DevtronLabs/Devtron/_workitems/edit/1956

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Delete Cd pipeline for no deployment app

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?


@vikramdevtron vikramdevtron self-assigned this Feb 7, 2023
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@gireesh-naidu gireesh-naidu merged commit 605b564 into main Feb 7, 2023
@gireesh-naidu gireesh-naidu deleted the fix-delete-pipeline branch February 7, 2023 07:27
ShashwatDadhich added a commit that referenced this pull request Feb 12, 2023
* fix: Installed apps rbac optimisation (#2918)

* rbac enforced in batch

* minor restructuring

* minor fix

* code comments added

* throwing unauthorised error

* fix: pvc mounted on pods for cache handling  (#2912)

* first cut pvc for ci

* isPvcMounted flag introduced

* cache invalidate and global invalidate handling

* cache path made configurable

* pvc mounted false

* PVC mounted at two new paths for storing build and buildx cache

* mnor fix

* removed redundant objects from struct

* chenged names of env variables for paths

* buildx cache path restored after doing POC

---------

Co-authored-by: Prashant Ghildiyal <prashant@devtron.ai>
Co-authored-by: Kripansh <kripansh@devtron.ai>

* updated log type for pipeline status methods (#2926)

* docs: minor updates ingress (#2931)

* minor updates ingress

* minor updates ingress

* finished on time update fix (#2932)

Co-authored-by: Kripansh <kripansh@devtron.ai>

* fix delete pipeline app status check (#2939)

* feat: added option to propagate custom tag to k8s resources for that application (#2841)

* wip

* sql file renamed

* propagation in labels support for create app api

* validating labels if propagate is true

* refactoring

* sql file no. changed

* removed required field from bool

* sql file no. changed

* removed cascade

* alter app lable key

* db migration seq fix for global tags

---------

Co-authored-by: vikramdevtron <vikram@devtron.ai>

* excluding inactive ci-pipelin-material from pre-cd stage (#2920)

* feat: cluster bearer token hide from dashboard (#2894)

* cluster token config removed mandatory

* api spec added for cluster update and create, and cluster list api changes for token

* fix check config for cluster token

* docs: mount pvc (#2941)

* added pvc

* added pvc

* added pvc

* added pvc

* added pvc

* feat: Resource browser child ref (#2913)

* child rbac handling init commit

* resource manifest validate handling added

* handle rbac case

* wire gen fix

* gvk passed and ap resource handling

* code cleaning

* dead code cleaning

* removed unused func

* fix: k8s log stream cpu issue (#2929)

* updated buffer size

* refactored code for getting logs from k8s

* updated Dockerfile

* updated Dockerfile

* downgraded go version

* removed redundant log

* sorting_changes (#2935)

* support given for cloning linked ci pipelines via workflow cloning API (#2944)

* docs: Added preset plugins (#2904)

* added preset plugins

* added preset plugins

* Added semgrep, codacy

* updates

* updated screenshots

* updates

---------

Co-authored-by: Gireesh Naidu <111440205+gireesh-devtron@users.noreply.github.com>
Co-authored-by: Prakash Kumar <prakash.kumar@devtron.ai>
Co-authored-by: Prashant Ghildiyal <prashant@devtron.ai>
Co-authored-by: Kripansh <kripansh@devtron.ai>
Co-authored-by: kartik-579 <84493919+kartik-579@users.noreply.github.com>
Co-authored-by: SNe789 <113748500+SNe789@users.noreply.github.com>
Co-authored-by: Vikram <73224103+vikramdevtron@users.noreply.github.com>
Co-authored-by: Manish Agrawal <85211469+manish-agrawal-ai@users.noreply.github.com>
Co-authored-by: vikramdevtron <vikram@devtron.ai>
Co-authored-by: kripanshdevtron <107392309+kripanshdevtron@users.noreply.github.com>
Co-authored-by: Dhananjay Sharma <124036328+dhananjay0601@users.noreply.github.com>
ShashwatDadhich added a commit that referenced this pull request Mar 20, 2023
* Made chenges

* Made chenges

* Made chenges

* Clone job function added

* fixed typo

* fixed typo

* Merging main to job-feature-branch (#2955)

* fix: Installed apps rbac optimisation (#2918)

* rbac enforced in batch

* minor restructuring

* minor fix

* code comments added

* throwing unauthorised error

* fix: pvc mounted on pods for cache handling  (#2912)

* first cut pvc for ci

* isPvcMounted flag introduced

* cache invalidate and global invalidate handling

* cache path made configurable

* pvc mounted false

* PVC mounted at two new paths for storing build and buildx cache

* mnor fix

* removed redundant objects from struct

* chenged names of env variables for paths

* buildx cache path restored after doing POC

---------

Co-authored-by: Prashant Ghildiyal <prashant@devtron.ai>
Co-authored-by: Kripansh <kripansh@devtron.ai>

* updated log type for pipeline status methods (#2926)

* docs: minor updates ingress (#2931)

* minor updates ingress

* minor updates ingress

* finished on time update fix (#2932)

Co-authored-by: Kripansh <kripansh@devtron.ai>

* fix delete pipeline app status check (#2939)

* feat: added option to propagate custom tag to k8s resources for that application (#2841)

* wip

* sql file renamed

* propagation in labels support for create app api

* validating labels if propagate is true

* refactoring

* sql file no. changed

* removed required field from bool

* sql file no. changed

* removed cascade

* alter app lable key

* db migration seq fix for global tags

---------

Co-authored-by: vikramdevtron <vikram@devtron.ai>

* excluding inactive ci-pipelin-material from pre-cd stage (#2920)

* feat: cluster bearer token hide from dashboard (#2894)

* cluster token config removed mandatory

* api spec added for cluster update and create, and cluster list api changes for token

* fix check config for cluster token

* docs: mount pvc (#2941)

* added pvc

* added pvc

* added pvc

* added pvc

* added pvc

* feat: Resource browser child ref (#2913)

* child rbac handling init commit

* resource manifest validate handling added

* handle rbac case

* wire gen fix

* gvk passed and ap resource handling

* code cleaning

* dead code cleaning

* removed unused func

* fix: k8s log stream cpu issue (#2929)

* updated buffer size

* refactored code for getting logs from k8s

* updated Dockerfile

* updated Dockerfile

* downgraded go version

* removed redundant log

* sorting_changes (#2935)

* support given for cloning linked ci pipelines via workflow cloning API (#2944)

* docs: Added preset plugins (#2904)

* added preset plugins

* added preset plugins

* Added semgrep, codacy

* updates

* updated screenshots

* updates

---------

Co-authored-by: Gireesh Naidu <111440205+gireesh-devtron@users.noreply.github.com>
Co-authored-by: Prakash Kumar <prakash.kumar@devtron.ai>
Co-authored-by: Prashant Ghildiyal <prashant@devtron.ai>
Co-authored-by: Kripansh <kripansh@devtron.ai>
Co-authored-by: kartik-579 <84493919+kartik-579@users.noreply.github.com>
Co-authored-by: SNe789 <113748500+SNe789@users.noreply.github.com>
Co-authored-by: Vikram <73224103+vikramdevtron@users.noreply.github.com>
Co-authored-by: Manish Agrawal <85211469+manish-agrawal-ai@users.noreply.github.com>
Co-authored-by: vikramdevtron <vikram@devtron.ai>
Co-authored-by: kripanshdevtron <107392309+kripanshdevtron@users.noreply.github.com>
Co-authored-by: Dhananjay Sharma <124036328+dhananjay0601@users.noreply.github.com>

* made changes to the queries

* Update AppListingRepository.go

* Update version.go

* Update version.go

* Update 1_insert.up.sql

* Update 1_insert.up.sql

* Update AppCloneService.go

* Update AppCloneService.go

* Uodated app listing api

* Uodated app listing api restHandler

* Updated app listing api restHandler

* Updated app listing api service layer

* Updated app listing api service layer

* Updated app listing api service layer

* Updated app listing api service layer

* Updated app listing api service layer

* Updated app listing api service layer

* MAde the patch-ci-pipeline api

* MAde the patch-ci-pipeline api

* Reduced Code duplicacy

* Corrected the code of clone job.

* Corrected the code of clone job.

* Updated the api specs

* Updated the api specs

* Updated the api specs

* Updated the api specs

* Updated the api specs

* Copied the earlier deleted files

* Copied the earlier deleted files

* Update jobs.yaml

* Updated the api end points and wrote the api specs.

* Updated the api end points and wrote the api specs.

* Updated the api end points and wrote the api specs.

* Updated the api end points and wrote the api specs.

* wire err fix

* Wrote the sql migrate down command.

* Removed the extra api endpoints.

* Removed the commented code

* Removed the commented code.

* Update version.go

* Added logger wherever required.

* Fixed a bug.

* Updated the api specs.

* Added the user authentications

* Added the user authentications

* Added the user authentications

* Added the user authentications

* Added the user authentications

* Added the user authentications

* Added the user authentications for triggerCiPipeline

* Added the user authentications for triggerCiPipeline

* Updated the api specs and rbac checks

* Updated the api specs and rbac checks

* Updated the stage status api in case of jobs.

* Updated the job autocomplete api.

* Made the status changes

* Fixed the bug of last succeeded time

* undid the reverted changes

* Job count added

* Job count corrected

* Job count bug fixed

* Sorting order corrected

* Sorting order DESC added

* Corrected the app overview page deleted pipeline bug.

* Corrected the app overview page deleted pipeline bug.

* added column is_artifact_uploaded to the ci_artifact table.

* Added the check of deleted pipeline.

* Added the check of deleted pipeline.

* Added the check of deleted pipeline.

* Clone app

* Multiple git repo patch

* removed the commented lines.

* Minor bug fixes

* Delete Git material bug fix.

* Fixed minor bug

* Wrote the sql down command.

* minor fix

* resolved the comments of PR.

* fixed a minor bug

* Changed from app_store to app_type

* Changed from app_store to app_type

* changes as mentioned in the PR

* Checked the ci_artifacts

* Changes done as mentioned in the PR

* Changes done as mentioned in the PR

* data optimization added

* Fixed minor bug

* Fixed minor bug

* Jobs sql up number update

* Bug fix

* Bug fix

* Bug fix

* Bug fix

* Bug fix

* Bug fix

* Bug fix

* Artifact logger added

* Additional loggers removed

* Logger No tasks configured for this job added

* Removed No tasks configured for this job added

* Added a validation for AppType

* Added comments for validation for AppType

* Added a default value to IsArtifactUploaded

* Removed default value to IsArtifactUploaded

* Added false to isArtifactUploaded

* Removed false to isArtifactUploaded

* Optimized sql up and down.

* changed the sql number

* Optimized the sql query.

* Removed the history tables from sql down.

* Removed the history tables from sql down.

---------

Co-authored-by: ShashwatDevtron <shashwat@devtron.ai>
Co-authored-by: Gireesh Naidu <111440205+gireesh-devtron@users.noreply.github.com>
Co-authored-by: Prakash Kumar <prakash.kumar@devtron.ai>
Co-authored-by: Prashant Ghildiyal <prashant@devtron.ai>
Co-authored-by: Kripansh <kripansh@devtron.ai>
Co-authored-by: kartik-579 <84493919+kartik-579@users.noreply.github.com>
Co-authored-by: SNe789 <113748500+SNe789@users.noreply.github.com>
Co-authored-by: Vikram <73224103+vikramdevtron@users.noreply.github.com>
Co-authored-by: Manish Agrawal <85211469+manish-agrawal-ai@users.noreply.github.com>
Co-authored-by: vikramdevtron <vikram@devtron.ai>
Co-authored-by: kripanshdevtron <107392309+kripanshdevtron@users.noreply.github.com>
Co-authored-by: Dhananjay Sharma <124036328+dhananjay0601@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants