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

[2.26.x] Historian blacklist for updates and deletes #6786

Merged
merged 6 commits into from
Jun 12, 2024

Conversation

malmgrens4
Copy link
Collaborator

@malmgrens4 malmgrens4 commented May 24, 2024

What does this PR do?

Introduces system properties for skipping historian versioning on deletes and updates (both direct metacard updates and associated content updates).

e.g.
# Skip historian for the following types on updates
org.codice.ddf.history.update.blacklist.metacardTypes=query,workspace

# Skip historian for the following types on deletes
org.codice.ddf.history.deletes.blacklist.metacardTypes=workspace

Additionally this copies the DeleteRequest properties onto the DeleteResponse. This was initially done to allow for the SKIP_VERSIONING property to be used with local deletes, but this also makes behavior more consistent across the Create, Update, and Delete requests on the Solr implementation of the CatalogProvider.

Who is reviewing it?

Select relevant component teams:

Ask 2 committers to review/merge the PR and tag them here.

How should this be tested?

Any background context you want to provide?

What are the relevant tickets?

Fixes: #____

Screenshots

Checklist:

  • Documentation Updated
  • Update / Add Threat Dragon models
  • Update / Add Unit Tests
  • Update / Add Integration Tests

Notes on Review Process

Please see Notes on Review Process for further guidance on requirements for merging and abbreviated reviews.

Review Comment Legend:

  • ✏️ (Pencil) This comment is a nitpick or style suggestion, no action required for approval. This comment should provide a suggestion either as an in line code snippet or a gist.
  • ❓ (Question Mark) This comment is to gain a clearer understanding of design or code choices, clarification is required but action may not be necessary for approval.
  • ❗ (Exclamation Mark) This comment is critical and requires clarification or action before approval.

@malmgrens4 malmgrens4 requested a review from rzwiefel as a code owner May 24, 2024 22:00
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Steven Malmgren seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@malmgrens4 malmgrens4 changed the title Historian blacklist for updates and deletes. Historian blacklist for updates and deletes May 24, 2024
@@ -223,6 +240,7 @@ public UpdateStorageResponse version(
.map(ContentItem::getMetacard)
.filter(Objects::nonNull)
.filter(isNotVersionNorDeleted)
.filter(this::isNotBlackListedUpdate)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We could split the config to allow for versioning on the content separately but not sure there's a use case for skipping versioning on the direct metacard updates, but not the content updates.

@alexabird
Copy link
Contributor

build now

@cxddfbot
Copy link

Internal build has been started, your results will be available at build completion.

@cxddfbot
Copy link

Build FAILURE See the job results in legacy Jenkins UI or in Blue Ocean UI.

@cxddfbot
Copy link

Internal build has been started, your results will be available at build completion.

@cxddfbot
Copy link

Build FAILURE See the job results in legacy Jenkins UI or in Blue Ocean UI.

@malmgrens4
Copy link
Collaborator Author

build now

@cxddfbot
Copy link

Internal build has been started, your results will be available at build completion.

@cxddfbot
Copy link

Build SUCCESS See the job results in legacy Jenkins UI or in Blue Ocean UI.

@jlcsmith jlcsmith changed the title Historian blacklist for updates and deletes [2.26.x] Historian blacklist for updates and deletes May 30, 2024
@alexabird alexabird added the 👀 Verified Someone has manually verified that the changes work and there are no regressions. label May 31, 2024
Copy link
Member

@rzwiefel rzwiefel left a comment

Choose a reason for hiding this comment

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

Nice historian updates 👉😏👉

@@ -363,7 +363,7 @@ public DeleteResponse delete(DeleteRequest deleteRequest) throws IngestException
deleteListOfMetacards(deletedMetacards, identifierPaged, attributeName);
}

return new DeleteResponseImpl(deleteRequest, null, deletedMetacards);
return new DeleteResponseImpl(deleteRequest, deleteRequest.getProperties(), deletedMetacards);
Copy link
Member

Choose a reason for hiding this comment

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

I could be misremembering, but it's probably worth checking that there's nothing sensitive inside the request properties that we don't want to send in the response.

Copy link
Member

Choose a reason for hiding this comment

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

I would agree. I think we should leave the request properties where they are and check them if there is a property we're looking for (I just made an update to do that to check for the skip_versioning property #6789).

Copy link
Collaborator Author

@malmgrens4 malmgrens4 Jun 11, 2024

Choose a reason for hiding this comment

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

Yea sounds good. I'll update it to just forward that if it's there

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Okay yea I see your change now. I'll drop that change in my PR and we can have these tested together.

@alexabird
Copy link
Contributor

build now

@cxddfbot
Copy link

Internal build has been started, your results will be available at build completion.

@cxddfbot
Copy link

Build SUCCESS See the job results in legacy Jenkins UI or in Blue Ocean UI.

@jlcsmith jlcsmith merged commit 5bb718b into codice:2.26.x Jun 12, 2024
2 of 3 checks passed
alexabird added a commit that referenced this pull request Aug 8, 2024
alexabird added a commit that referenced this pull request Sep 13, 2024
alexabird added a commit that referenced this pull request Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👀 Verified Someone has manually verified that the changes work and there are no regressions.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants