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

Do not try to add parents to simple paths #2502

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

paul-butcher
Copy link
Contributor

This fixes the problem seen here: #2500

(See this comment for details)

@paul-butcher paul-butcher changed the title Do not add parents to simple paths Do not try to add parents to simple paths Dec 18, 2023
Comment on lines +104 to +118
it("does not add a parent to a root-only path") {
// When the requested path consists of a single node, it is the root of its own tree,
// and cannot have a parent.
// An earlier iteration of this service would get confused by the trailing slash in
// a path in a different tree.
val works: List[Work[Merged]] = List(
work(path = "parent"),
work(path = "a/completely/different/tree/")
)
withLocalMergedWorksIndex {
index =>
insertIntoElasticsearch(index, works: _*)
whenReady(service(index).getParentPath("parent")) {
_ shouldBe empty
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the only actual addition to this file. The rest is IntelliJ deciding it didn't like the formatting. Sorry about that.

Copy link
Contributor

@kenoir kenoir left a comment

Choose a reason for hiding this comment

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

This LGTM although I have not run this locally yet, +1 ing to unblock (if it compiles and tests pas which they do, you're good).

@paul-butcher paul-butcher merged commit 6380590 into main Dec 19, 2023
1 check passed
@paul-butcher paul-butcher deleted the pathconcat-trailing-slash branch December 19, 2023 14:02
@paul-butcher paul-butcher restored the pathconcat-trailing-slash branch December 19, 2023 14:24
@paul-butcher paul-butcher deleted the pathconcat-trailing-slash branch December 19, 2023 14:25
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.

2 participants