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

DS-4218 - Support for second "initialize-entities" #2404

Conversation

benbosman
Copy link
Member

Executing InitializeEntities multiple times to update the schema used to work, but was broken in #2383 by changing the concept of creating relationship types.

The InitializeEntities implementation has been updated to solve this problem and a unique constraint to the RelationshipType table has been created based on types and labels

This solves https://jira.duraspace.org/browse/DS-4218

…traint to RelationshipType table based on types and labels
@benbosman benbosman added component: configurable entities Related to Configurable Entities feature interface: REST API v7+ REST API for v7 and later (dspace-server-webapp module) labels Apr 17, 2019
@AlexanderS
Copy link
Contributor

I just opened a pr at atmire#15 to fix a minor problem with the indentation.

@benbosman
Copy link
Member Author

Thanks @AlexanderS, I've merged it

Copy link
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

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

@benbosman : the code here looks fine to me, but the new test has some incorrect comments and needs a better description. I'm not sure exactly what it is supposed to be testing.

.andExpect(jsonPath("$.page.totalElements", is(10)))
//There needs to be a self link to this endpoint
.andExpect(jsonPath("$._links.self.href", containsString("api/core/relationshiptypes")))
//We have 4 facets in the default configuration, they need to all be present in the embedded section
Copy link
Member

Choose a reason for hiding this comment

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

incorrect comment

.andExpect(jsonPath("$.page.totalElements", is(10)))
//There needs to be a self link to this endpoint
.andExpect(jsonPath("$._links.self.href", containsString("api/core/relationshiptypes")))
//We have 4 facets in the default configuration, they need to all be present in the embedded section
Copy link
Member

Choose a reason for hiding this comment

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

This comment is also incorrect. Could we better describe this test in general. It's not straightforward what we are looking for... are we simply verifying running this command twice results in a no-op? Are we looking for specific changes? This test needs some better comments in general.


//We expect a 200 OK status
.andExpect(status().isOk())
//The type has to be 'discover'
Copy link
Member

Choose a reason for hiding this comment

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

incorrect comment


//We expect a 200 OK status
.andExpect(status().isOk())
//The type has to be 'discover'
Copy link
Member

Choose a reason for hiding this comment

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

incorrect comment

Missing context complete, this was lost in the previous commit from this PR
@benbosman
Copy link
Member Author

Thanks for the review @tdonohue
The comments have been adjusted, and Raf also noticed the context.complete was accidentally removed in the first commit, which has been solved as well now.

Let me know if there's something unclear about the concept of the IT still

Copy link
Contributor

@paulo-graca paulo-graca left a comment

Choose a reason for hiding this comment

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

I've performed a test with this PR and it worked. I can do several successful attempts to import entities structure.

Copy link
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

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

Thanks @benbosman and @Raf-atmire . The updates look great to me now. Merging into configurable_entities branch.

@tdonohue tdonohue merged commit 1bf1131 into DSpace:configurable_entities Apr 24, 2019
@benbosman benbosman deleted the w2p-61912_initialize-entities-update branch March 13, 2020 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: configurable entities Related to Configurable Entities feature interface: REST API v7+ REST API for v7 and later (dspace-server-webapp module)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants