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

Add a template variables contribution SPI #1312

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

reda-alaoui
Copy link
Contributor

@reda-alaoui reda-alaoui commented Jun 24, 2020

Add a template variables contribution SPI to resolve issues such as #706
This is also a first step (in a 2 steps process) to treat spring-projects/spring-data-commons#2168

@reda-alaoui reda-alaoui force-pushed the template-variables-spi branch 3 times, most recently from 996df75 to 2884cf4 Compare June 24, 2020 11:02
@reda-alaoui reda-alaoui force-pushed the template-variables-spi branch from 2884cf4 to af4ea49 Compare August 2, 2020 21:13
@reda-alaoui
Copy link
Contributor Author

Hello?

@reda-alaoui
Copy link
Contributor Author

Ping :)

@reda-alaoui
Copy link
Contributor Author

Is there something I can do to ease the merge of this fix?

# Conflicts:
#	src/main/java/org/springframework/hateoas/server/core/WebHandler.java
#	src/main/java/org/springframework/hateoas/server/mvc/WebMvcLinkBuilderFactory.java
@gregturn gregturn changed the base branch from master to main April 7, 2021 18:20
@reda-alaoui
Copy link
Contributor Author

Hello?

@reda-alaoui
Copy link
Contributor Author

Me again :)

@reda-alaoui
Copy link
Contributor Author

reda-alaoui commented Jul 9, 2021

Hello,

The underlying issue (#706) seems critical for anyone hopping to use hypermedia pagination with filtering criteria.
For a year now, I have been maintaining a forked version of Spring HATEOAS and Spring Data Commons (containing this change and its implementation) to make this work on our main project.

Please help me fix this issue upstream 🙏

# Conflicts:
#	src/main/java/org/springframework/hateoas/server/mvc/WebMvcLinkBuilderFactory.java
#	src/test/java/org/springframework/hateoas/server/mvc/WebMvcLinkBuilderFactoryUnitTest.java
@reda-alaoui
Copy link
Contributor Author

up 😭

@odrotbohm odrotbohm force-pushed the main branch 3 times, most recently from 2e02d7a to 856b6b9 Compare November 16, 2022 17:53
# Conflicts:
#	src/main/java/org/springframework/hateoas/server/core/WebHandler.java
#	src/main/java/org/springframework/hateoas/server/mvc/WebMvcLinkBuilderFactory.java
@reda-alaoui
Copy link
Contributor Author

Merge conflict fixed

reda-alaoui added a commit to Cosium/spring-hateoas that referenced this pull request Dec 4, 2022
@reda-alaoui
Copy link
Contributor Author

Still waiting for feedback ;(

@reda-alaoui
Copy link
Contributor Author

reda-alaoui commented May 21, 2023

@odrotbohm , @gregturn is there a reason related to the proposed change explaining why I have had no feedback for 3 years?

@reda-alaoui
Copy link
Contributor Author

Because of this, I have been dragging 2 forks on production for 3 years through all Spring major versions. One for this project, the other for spring-projects/spring-data-commons#2168 .

@odrotbohm
Copy link
Member

odrotbohm commented May 21, 2023

Not at all, except that it somehow has slipped our radar. From a quick glance at the SD Commons issue I can tell, that, generally speaking, as of SD 2.0, null values for Pageable have become invalid and have to be replaced by Pageable.unpaged(). I'll see whether we can be a bit smarter in the DummyInvocationUtils to maybe treat a null Pageable special. I can see that it would be more convenient to just signal absence of pagination information by using a plain null in that particular case.

I'll investigate on Tuesday but can also say that the absence of pagination information in an original request is properly handled by, for example, Spring Data REST. That makes me doubt that we have a fundamental problem which needs a fork to make that work. But then again, I might be wrong of course. Expect some judgement on the overall situation soon.

And again: sorry for the delay and thanks for your patience.

@reda-alaoui
Copy link
Contributor Author

I'll investigate on Tuesday but can also say that the absence of pagination information in an original request is properly handled by, for example, Spring Data REST. That makes me doubt that we have a fundamental problem which needs a fork to make that work.

From what I read around https://github.com/spring-projects/spring-data-rest/blob/e9c43f1373b68c31c14985e189e31ad0a0af31e1/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/support/RepositoryEntityLinks.java#L122, that would be because Spring Data REST doesn’t use WebMvcLinkBuilderFactory to create those uri templates.

@reda-alaoui
Copy link
Contributor Author

Hello @odrotbohm ,

Could you find time to take a look at this? 🙏

@reda-alaoui
Copy link
Contributor Author

@odrotbohm sorry to bother you again with this 🥹
I’d like to move to Spring Boot 3.1.0 without those forks ^^

@odrotbohm
Copy link
Member

I am travelling this week but will make sure I'll have a look ASAP.

@reda-alaoui
Copy link
Contributor Author

reda-alaoui commented Jun 7, 2023

@odrotbohm please don't hate me for pinging you so much 🙏

@reda-alaoui
Copy link
Contributor Author

@odrotbohm ping 🫣

@odrotbohm
Copy link
Member

Reda, this is not helpful. I wrote ASAP. There's other stuff we're busy with. Furthermore, as this will be a significant change and like causes downstream effects on projects like Spring Data REST, we can only ship this in a minor version cycle. I.e., the first milestone version this can reasonably go out in will come mid-July, GA in autumn. Thanks for understanding.

@reda-alaoui
Copy link
Contributor Author

reda-alaoui commented Jun 16, 2023

I understand Oliver. Thank you for providing those details. I’ll keep syncing my forks until then 🙂

reda-alaoui added a commit to Cosium/spring-hateoas that referenced this pull request Sep 10, 2023
@reda-alaoui
Copy link
Contributor Author

A little reminder 🫣

@odrotbohm odrotbohm force-pushed the main branch 4 times, most recently from 5828e78 to e643c37 Compare November 16, 2023 10:46
reda-alaoui added a commit to Cosium/spring-hateoas that referenced this pull request Nov 30, 2023
reda-alaoui added a commit to Cosium/spring-hateoas that referenced this pull request Sep 18, 2024
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