-
Notifications
You must be signed in to change notification settings - Fork 583
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
Back port of Task Thin Execution List and List By Name #6062
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the back port @corneil . I have some questions. I notice there is also quite a few files modified in the source that is not in this PR. Please describe the discrepancies.
Thanks
...test/java/org/springframework/cloud/dataflow/server/rest/documentation/ApiDocumentation.java
Show resolved
Hide resolved
...test/java/org/springframework/cloud/dataflow/server/rest/documentation/ApiDocumentation.java
Show resolved
Hide resolved
...test/java/org/springframework/cloud/dataflow/server/rest/documentation/ApiDocumentation.java
Show resolved
Hide resolved
...w-rest-client/src/main/java/org/springframework/cloud/dataflow/rest/client/TaskTemplate.java
Outdated
Show resolved
Hide resolved
...w-rest-client/src/main/java/org/springframework/cloud/dataflow/rest/client/TaskTemplate.java
Show resolved
Hide resolved
...-core/src/main/java/org/springframework/cloud/dataflow/server/controller/RootController.java
Show resolved
Hide resolved
.../java/org/springframework/cloud/dataflow/server/controller/TaskExecutionControllerTests.java
Show resolved
Hide resolved
I have resolved comments. There are a few elements I'll port to main to get parity. |
...va/org/springframework/cloud/dataflow/server/config/DataFlowControllerAutoConfiguration.java
Show resolved
Hide resolved
Updated task thin executions link handing and added extra test for parity with 2.11.x See spring-cloud#6062
Updated task thin executions link handing and added extra test for parity with 2.11.x See spring-cloud#6062
Updated task thin executions link handing and added extra test for parity with 2.11.x. Update minimum supported version of client. See spring-cloud#6062
Updated task thin executions link handing and added extra test for parity with 2.11.x. Update minimum supported version of client. See spring-cloud#6062
Updated task thin executions link handing and added extra test for parity with 2.11.x. Update minimum supported version of client. See spring-cloud#6062
this.thinExecutionsByNameLink = resources.getLink(THIN_EXECUTIONS_BY_NAME_RELATION).orElse(null); | ||
this.executionLaunchLink = resources.getLink(EXECUTION_LAUNCH_RELATION).orElse(null); | ||
this.executionsCurrentLink = resources.getLink(EXECUTIONS_CURRENT_RELATION).orElse(null); | ||
if(VersionUtils.isDataFlowServerVersionGreaterThanOrEqualToRequiredVersion(version, VALIDATION_THIN_TASK_VERSION) && resources.getLink(THIN_EXECUTIONS_RELATION).isPresent()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would consider moving this logic into a well-named helper method to avoid the repeat checks as its hard to read currently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the resources.getLink(THIN_EXECUTIONS_RELATION).isPresent()
from if
@@ -165,12 +181,7 @@ public class TaskTemplate implements TaskOperations { | |||
this.executionLaunchLink = null; | |||
} | |||
|
|||
if (VersionUtils.isDataFlowServerVersionGreaterThanOrEqualToRequiredVersion(version, EXECUTIONS_CURRENT_RELATION_VERSION)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did this move up? If its not required to be at the top, please keep it in place so as to avoid confusing during the review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed the order to match the previous version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer change history over matching order in a different branch. Please undo the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will a squash into on commit not fix this so that the diff is smaller because the order is that same as before the PR branch?
@@ -283,18 +294,26 @@ public TaskExecutionResource.Page executionList() { | |||
} | |||
|
|||
@Override | |||
public PagedModel<TaskExecutionThinResource> thinExecutionList() { | |||
public TaskExecutionThinResource.Page thinExecutionList() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signature change? Seems breaking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The result is the same type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 185 in 464868b
public static class Page extends PagedModel<TaskExecutionThinResource> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well if they are the same let's leave it as is since this is a simple backport on what will be a patch release. What is the value in changing it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other uses on tasks/execution uses the .Page
I noticed when comparing the various tasks/executions and tasks/thinexecutions controller methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a lot cleaner as a result return restTemplate.getForObject(executionsLink.getHref(), TaskExecutionThinResource.Page.class);
src/scripts/build-docs.sh
Outdated
@@ -4,7 +4,7 @@ if [ -z "$BASH_VERSION" ]; then | |||
exit 1 | |||
fi | |||
SCDIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")") | |||
SCDIR=$(realpath $SCDIR) | |||
pushd "$SCDIR" > /dev/null || exit | |||
SCDIR=$(realpath "$SCDIR/../..") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't understand what this has to do w/ thin executions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll move this to a separate PR
8118ada
to
ea8bfd3
Compare
...w-rest-client/src/main/java/org/springframework/cloud/dataflow/rest/client/TaskTemplate.java
Show resolved
Hide resolved
@@ -66,16 +65,17 @@ public class TaskTemplate implements TaskOperations { | |||
|
|||
private static final String EXECUTIONS_CURRENT_RELATION_VERSION = "1.7.0"; | |||
|
|||
private static final String VALIDATION_RELATION_VERSION = "1.7.0"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this deleted? Please add a comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I restored that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see it.
Updated task thin executions link handing and added extra test for parity with 2.11.x. Update minimum supported version of client. Added test for invalid old version. See spring-cloud#6062
@@ -134,51 +136,51 @@ public class TaskTemplate implements TaskOperations { | |||
EXECUTION_RELATION_BY_NAME, | |||
EXECUTIONS_INFO_RELATION, | |||
PLATFORM_LIST_RELATION, | |||
RETRIEVE_LOG | |||
RETRIEVE_LOG, | |||
VALIDATION_REL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was rolled back in the version I want to push.
Updated task thin executions link handing and added extra test for parity with 2.11.x. Update minimum supported version of client. Added test for invalid old version. See spring-cloud#6062
ea8bfd3
to
198bf9d
Compare
Updated task thin executions link handing and added extra test for parity with 2.11.x See spring-cloud#6062 Update Task Thin Executions list function for parity with 2.11.x Updated task thin executions link handing and added extra test for parity with 2.11.x. Update minimum supported version of client. See spring-cloud#6062 Update Task Thin Executions list function for parity with 2.11.x Updated task thin executions link handing and added extra test for parity with 2.11.x. Update minimum supported version of client. See spring-cloud#6062 Update Task Thin Executions list function for parity with 2.11.x Updated task thin executions link handing and added extra test for parity with 2.11.x. Update minimum supported version of client. See spring-cloud#6062 Revised TaskTemplate to retain order of link init in the constructor. Update Task Thin Executions list function for parity with 2.11.x Updated task thin executions link handing and added extra test for parity with 2.11.x. Update minimum supported version of client. Added test for invalid old version. See spring-cloud#6062
Updates api docs for tasks/thinexecutions/name and all HATEOAS links. Updates related tests for links. Improved link handling and tests in TaskTemplate.
Original PR #5994
Issues #5991, #5973
Fixes #5995