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

Replace getTrait usages with Operation #2581

Closed
t92549 opened this issue Jan 28, 2022 · 5 comments · Fixed by #2901
Closed

Replace getTrait usages with Operation #2581

t92549 opened this issue Jan 28, 2022 · 5 comments · Fixed by #2901
Assignees
Labels
enhancement Improvement to existing functionality/feature tech-debt Relates to Technical Debt

Comments

@t92549
Copy link
Contributor

t92549 commented Jan 28, 2022

#2552 removed deprecated code, however, the getTraits function is still used (although deprecated).
Similar to #2573, the function version of getTraits should be replaced by executing the GetTraits Operation.

This, however, cannot be done as part of alpha 1 and has to be done later. This is because it is reliant upon #2580 which needs to be done with the major FederatedStore changes.

@t92549 t92549 added the tech-debt Relates to Technical Debt label Jan 28, 2022
@t92549 t92549 added this to the v2.0.0-alpha-0.5 milestone Jan 28, 2022
@GCHQDev404
Copy link
Contributor

I think this is should happen after #2791 because the traits is often based on values in the schema.

@GCHQDeveloper314
Copy link
Member

The related getSchema ticket (now closed) is not blocking this I don't think. The only difficulty with this will be updating tests to mock the operation instead of the method.

t92549 pushed a commit that referenced this issue Feb 22, 2023
* gh-2890 cache service single static instance bug removal.

* Revert "gh-2890 cache service single static instance bug removal."

This reverts commit 59b23ab.

* gh-2890 cache service single static instance bug removal. K.I.S.S

* gh-2890 cache service single static instance bug removal. K.I.S.S Tests

* gh-2890 cache service. delete backwards compatibility 1.12

* gh-2890 cache service single static instance bug removal. K.I.S.S Tests

* gh-2890 cache service single static instance bug removal. spotbugs

* gh-2890 cache service static instance bug. proof test.

* checkstyle

* gh-2581 getTraits to use operation, tidy up.

---------

Co-authored-by: GCHQDev404 <GCHQDev404@users.noreply.github.com>
@t92549 t92549 added the enhancement Improvement to existing functionality/feature label Feb 22, 2023
@GCHQDeveloper314 GCHQDeveloper314 linked a pull request Feb 22, 2023 that will close this issue
@GCHQDeveloper314
Copy link
Member

There are some problems with the GetTrait operation returning different results to the method. See PR #2901 for details.

@GCHQDeveloper314
Copy link
Member

Problems with the PR have been resolved by using the operation option to not get current traits - ready for PR to be reviewed.

GCHQDeveloper314 added a commit that referenced this issue Mar 1, 2023
* Remove getTraits from Store

* Remove getTraits from Graph

* Remove getTraits from Map Store

* Remove getTraits from Accumulo Store

* Remove getTraits from Core Rest

* Remove getTraits from Proxy Store

* Fix to ensure user info doesn't get lost
Federated Store needs the user

* Remove getTraits from Federated Store

* Remove getTraits from Spring Rest

* Revert disabling IT for Federated Store
Fails due to QUERY_AGGREGATION Trait not being reported as a Trait of this store

* Change uses of GetTraits operation to get all supported traits
By default this operation gets the currently supported traits. It needs to get all supported instead as that is what the method used to do.

* Improve description of endpoint for Spring

* Simplify test in FederatedStoreUtilTest

* Fix for handling null User in OperationChainValidator

* Update Copyright

* Restore getTraits method for Map Store internal use
Using the static field directly would work, except this is overriden in some child classes which requires a getter to be used.

* Enable handler for GetTraits in proxy store
Previously this was unused as the handler was not added. Handler works the same as getTrait method did, removing visibility trait from returned traits. Also set other unused handler to null.

* Copyright corrections

* Fix test to include newly supported Operation in Proxy Store

* ProxyStoreBasicIT should get all supported traits and not current
This has no effect on the test currently but makes it clear what should be tested

* Revert superseded change identified in PR comment
GCHQDeveloper314 added a commit that referenced this issue Mar 1, 2023
@GCHQDeveloper314
Copy link
Member

Closed by #2901

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement to existing functionality/feature tech-debt Relates to Technical Debt
Projects
None yet
3 participants