Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

fix(shipyard-controller): Proceed with service deletion if the service is not present on the configuration service anymore #7459

Merged
merged 1 commit into from Apr 13, 2022

Conversation

bacherfl
Copy link
Member

Closes #7446

This PR adds a check for a ErrServiceNotFound error when trying to delete a service from the configuration service. If the shipyard controller detects such an error when attempting to delete a service from a project, it will proceed with deleting the service from the database as well, to keep the state of the project consistent with what is available in the project's git repo

How to test:

  1. Create. project
  2. Create a service within that project
  3. Delete the service directory from the upstream (or the configuration-service, if no upstream is configured)
  4. Try to delete the service via the Bridge
  5. The service should now be deleted successfully
    (6. Try to recreate the service with the same name - this should also work)

…e is not present on the configuration service anymore

Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
@bacherfl bacherfl requested a review from a team as a code owner April 13, 2022 08:37
@sonarcloud
Copy link

sonarcloud bot commented Apr 13, 2022

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

@codecov
Copy link

codecov bot commented Apr 13, 2022

Codecov Report

Merging #7459 (d080028) into 0.13.x (4a92524) will increase coverage by 0.02%.
The diff coverage is 87.50%.

@@            Coverage Diff             @@
##           0.13.x    #7459      +/-   ##
==========================================
+ Coverage   57.78%   57.81%   +0.02%     
==========================================
  Files         508      508              
  Lines       29408    29429      +21     
  Branches     1381     1381              
==========================================
+ Hits        16994    17013      +19     
- Misses      11203    11204       +1     
- Partials     1211     1212       +1     
Impacted Files Coverage Δ
shipyard-controller/common/configurationstore.go 87.83% <78.57%> (-0.69%) ⬇️
shipyard-controller/handler/servicemanager.go 74.78% <100.00%> (+1.88%) ⬆️
Flag Coverage Δ
shipyard-controller 57.55% <87.50%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@bacherfl bacherfl merged commit c1d1a47 into 0.13.x Apr 13, 2022
@bacherfl bacherfl deleted the fix/7446/delete-service-013x branch April 13, 2022 09:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants