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

CMR-9261: When delete a draft, remove it from database, not tombstone it… #1955

Merged
merged 2 commits into from
Aug 17, 2023

Conversation

sxu123
Copy link
Contributor

@sxu123 sxu123 commented Aug 14, 2023

… it.

@codecov-commenter
Copy link

codecov-commenter commented Aug 15, 2023

Codecov Report

Merging #1955 (7913233) into master (8c3e87e) will decrease coverage by 0.08%.
Report is 1 commits behind head on master.
The diff coverage is 7.44%.

@@            Coverage Diff             @@
##           master    #1955      +/-   ##
==========================================
- Coverage   55.49%   55.41%   -0.08%     
==========================================
  Files         993      993              
  Lines       62805    62898      +93     
  Branches     1542     1542              
==========================================
+ Hits        34852    34857       +5     
- Misses      26415    26499      +84     
- Partials     1538     1542       +4     
Files Changed Coverage Δ
...ngest-app/src/cmr/ingest/api/generic_documents.clj 10.95% <0.00%> (-0.16%) ⬇️
...est-app/src/cmr/ingest/services/ingest_service.clj 100.00% <ø> (ø)
...pp/src/cmr/ingest/services/ingest_service/util.clj 13.33% <0.00%> (-4.45%) ⬇️
...adata-db-app/src/cmr/metadata_db/data/concepts.clj 100.00% <ø> (ø)
transmit-lib/src/cmr/transmit/metadata_db.clj 6.57% <0.00%> (-0.60%) ⬇️
ingest-app/src/cmr/ingest/api/core.clj 27.46% <5.88%> (-2.09%) ⬇️
...p/src/cmr/metadata_db/services/concept_service.clj 17.60% <7.69%> (-0.17%) ⬇️
...tadata-db-app/src/cmr/metadata_db/api/concepts.clj 14.28% <12.50%> (-0.13%) ⬇️
...data-db-app/src/cmr/metadata_db/data/memory_db.clj 39.09% <25.00%> (-0.27%) ⬇️
...b-app/src/cmr/metadata_db/data/oracle/concepts.clj 18.63% <33.33%> (+0.23%) ⬆️

... and 2 files with indirect coverage changes

@@ -230,7 +230,9 @@
request-context :update :provider-object provider-id)
(acl/verify-provider-context-permission
request-context :read :provider-object provider-id))]
(api-core/delete-concept concept-type provider-id native-id request)))
(if (is-draft-concept? request)
(api-core/delete-draft concept-type provider-id native-id request)
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the delete-draft function in ingest/core leave a tombstone? If it does not we should update the doc-string in this function with something like Deletes a generic document in elasticsearch and creates a tombstone in the database if the concept is not a draft concept.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated the doc string.

@sxu123 sxu123 merged commit af6e37b into master Aug 17, 2023
1 check passed
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.

4 participants