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

Upgrade Spring version #2971

Closed
GCHQDeveloper314 opened this issue Jun 8, 2023 · 1 comment · Fixed by #2975
Closed

Upgrade Spring version #2971

GCHQDeveloper314 opened this issue Jun 8, 2023 · 1 comment · Fixed by #2975
Assignees
Labels
dependencies Updates/changes to Maven or other dependencies enhancement Improvement to existing functionality/feature
Milestone

Comments

@GCHQDeveloper314
Copy link
Member

We're not using the latest patch version available. It would also be good to move to a newer minor version if that can be done easily.

@GCHQDeveloper314 GCHQDeveloper314 added enhancement Improvement to existing functionality/feature dependencies Updates/changes to Maven or other dependencies labels Jun 8, 2023
@GCHQDeveloper314 GCHQDeveloper314 added this to the v2.1.0 milestone Jun 8, 2023
@GCHQDeveloper314
Copy link
Member Author

Upgrading to version 2.5.15 of org.springframework.boot:spring-boot-starter-test can be done easily.

Upgrading to 2.7.12 should be possible but there's currently a problem with the Spring ProxyStoreIT. This is caused by the getGafferUrl method in ProxyProperties.java. This returns URLs with a double / in the path. Causing this error when the proxy sends the request to Spring:

Caused by: uk.gov.gchq.gaffer.operation.OperationException: Delegate Gaffer store returned status: 404. Response content was: {"timestamp":1686218889065,"status":404,"error":"Not Found","path":"//graph/operations/execute"}
	at uk.gov.gchq.gaffer.proxystore.ProxyStore.executeOpChainViaUrl(ProxyStore.java:246)

Versions of the Spring dependency prior to 2.6 ignore the duplicate / and so these tests pass.

A change to ProxyProperties should fix this. This might impact other code if it were to require the //.

GCHQDeveloper314 added a commit that referenced this issue Jun 9, 2023
GCHQDeveloper314 added a commit that referenced this issue Jun 12, 2023
* Upgrade Spring and Springdoc to latest patch versions

* Fix use of deprecated Mockito import

* Prevent double '/' URL when contextRoot is '/'
Also refactor this class to remove redundant/unused methods and verbosity

* Ensure URL always ends with '/'

* Add new test class covering the changes in this PR
Also covers some methods not covered previously
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Updates/changes to Maven or other dependencies enhancement Improvement to existing functionality/feature
Projects
None yet
1 participant