You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2019/05/28 17:05:22 UTC

[flink] branch master updated (ec2c1a2 -> 3558bac)

This is an automated email from the ASF dual-hosted git repository.

chesnay pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git.


    from ec2c1a2  [FLINK-12115][fs] Add NOTICE file for flink-azure-fs-hadoop
     new 4fe936d  [FLINK-12636][rest] Fail stability test on compatible modifications
     new 3558bac  [FLINK-12635][rest] Move stability test to runtime-web

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 flink-runtime-web/pom.xml                          |   6 +
 .../runtime/rest/compatibility/Compatibility.java  |   0
 .../compatibility/CompatibilityCheckResult.java    |   0
 .../rest/compatibility/CompatibilityRoutine.java   |   0
 .../rest/compatibility/CompatibilityRoutines.java  |   0
 .../rest/compatibility/RestAPIStabilityTest.java   |  12 +
 .../src/test/resources/rest_api_v1.snapshot        | 322 +++++++++++++++++++++
 flink-runtime/pom.xml                              |   6 -
 8 files changed, 340 insertions(+), 6 deletions(-)
 rename {flink-runtime => flink-runtime-web}/src/test/java/org/apache/flink/runtime/rest/compatibility/Compatibility.java (100%)
 rename {flink-runtime => flink-runtime-web}/src/test/java/org/apache/flink/runtime/rest/compatibility/CompatibilityCheckResult.java (100%)
 rename {flink-runtime => flink-runtime-web}/src/test/java/org/apache/flink/runtime/rest/compatibility/CompatibilityRoutine.java (100%)
 rename {flink-runtime => flink-runtime-web}/src/test/java/org/apache/flink/runtime/rest/compatibility/CompatibilityRoutines.java (100%)
 rename {flink-runtime => flink-runtime-web}/src/test/java/org/apache/flink/runtime/rest/compatibility/RestAPIStabilityTest.java (92%)
 rename {flink-runtime => flink-runtime-web}/src/test/resources/rest_api_v1.snapshot (89%)


[flink] 01/02: [FLINK-12636][rest] Fail stability test on compatible modifications

Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

chesnay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 4fe936dc8f65d57645eea908337653c76d83f400
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Mon May 27 14:59:18 2019 +0200

    [FLINK-12636][rest] Fail stability test on compatible modifications
---
 .../rest/compatibility/RestAPIStabilityTest.java   | 12 ++++++++
 .../src/test/resources/rest_api_v1.snapshot        | 34 ++++++++++++++++++++++
 2 files changed, 46 insertions(+)

diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/compatibility/RestAPIStabilityTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/rest/compatibility/RestAPIStabilityTest.java
index a388b49..be47449 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/compatibility/RestAPIStabilityTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/rest/compatibility/RestAPIStabilityTest.java
@@ -131,6 +131,18 @@ public final class RestAPIStabilityTest extends TestLogger {
 					"To update the snapshot, re-run this test with -D" + REGENERATE_SNAPSHOT_PROPERTY + " being set.");
 			}
 		}
+
+		// check for entirely new calls, for which the snapshot should be updated
+		for (final JsonNode curCall : cur.calls) {
+			final List<Tuple2<JsonNode, CompatibilityCheckResult>> compatibilityCheckResults = old.calls.stream()
+				.map(oldCall -> Tuple2.of(curCall, checkCompatibility(oldCall, curCall)))
+				.collect(Collectors.toList());
+
+			if (compatibilityCheckResults.stream().noneMatch(result -> result.f1.getBackwardCompatibility() == Compatibility.IDENTICAL)) {
+				Assert.fail("The API was modified in a compatible way, but the snapshot was not updated. " +
+					"To update the snapshot, re-run this test with -D" + REGENERATE_SNAPSHOT_PROPERTY + " being set.");
+			}
+		}
 	}
 
 	private static void fail(final JsonNode oldCall, final List<Tuple2<JsonNode, CompatibilityCheckResult>> compatibilityCheckResults) {
diff --git a/flink-runtime/src/test/resources/rest_api_v1.snapshot b/flink-runtime/src/test/resources/rest_api_v1.snapshot
index 7a11004..a4a7b47 100644
--- a/flink-runtime/src/test/resources/rest_api_v1.snapshot
+++ b/flink-runtime/src/test/resources/rest_api_v1.snapshot
@@ -1269,6 +1269,40 @@
       }
     }
   }, {
+    "url" : "/jobs/:jobid/stop-with-savepoint",
+    "method" : "POST",
+    "status-code" : "202 Accepted",
+    "file-upload" : false,
+    "path-parameters" : {
+      "pathParameters" : [ {
+        "key" : "jobid"
+      } ]
+    },
+    "query-parameters" : {
+      "queryParameters" : [ ]
+    },
+    "request" : {
+      "type" : "object",
+      "id" : "urn:jsonschema:org:apache:flink:runtime:rest:messages:job:savepoints:stop:StopWithSavepointRequestBody",
+      "properties" : {
+        "targetDirectory" : {
+          "type" : "string"
+        },
+        "endOfEventTime" : {
+          "type" : "boolean"
+        }
+      }
+    },
+    "response" : {
+      "type" : "object",
+      "id" : "urn:jsonschema:org:apache:flink:runtime:rest:handler:async:TriggerResponse",
+      "properties" : {
+        "request-id" : {
+          "type" : "any"
+        }
+      }
+    }
+  }, {
     "url" : "/jobs/:jobid/vertices/:vertexid",
     "method" : "GET",
     "status-code" : "200 OK",


[flink] 02/02: [FLINK-12635][rest] Move stability test to runtime-web

Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

chesnay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 3558bac8b2cd9609642414a0bf96d622653d144f
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Mon May 27 14:49:15 2019 +0200

    [FLINK-12635][rest] Move stability test to runtime-web
---
 flink-runtime-web/pom.xml                          |   6 +
 .../runtime/rest/compatibility/Compatibility.java  |   0
 .../compatibility/CompatibilityCheckResult.java    |   0
 .../rest/compatibility/CompatibilityRoutine.java   |   0
 .../rest/compatibility/CompatibilityRoutines.java  |   0
 .../rest/compatibility/RestAPIStabilityTest.java   |   0
 .../src/test/resources/rest_api_v1.snapshot        | 288 +++++++++++++++++++++
 flink-runtime/pom.xml                              |   6 -
 8 files changed, 294 insertions(+), 6 deletions(-)

diff --git a/flink-runtime-web/pom.xml b/flink-runtime-web/pom.xml
index d6db2ff..5207ab8 100644
--- a/flink-runtime-web/pom.xml
+++ b/flink-runtime-web/pom.xml
@@ -111,6 +111,12 @@ under the License.
 			<scope>test</scope>
 		</dependency>
 
+		<dependency>
+			<groupId>org.apache.flink</groupId>
+			<artifactId>flink-shaded-jackson-module-jsonSchema</artifactId>
+			<scope>test</scope>
+		</dependency>
+
 	</dependencies>
 
 	<profiles>
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/compatibility/Compatibility.java b/flink-runtime-web/src/test/java/org/apache/flink/runtime/rest/compatibility/Compatibility.java
similarity index 100%
rename from flink-runtime/src/test/java/org/apache/flink/runtime/rest/compatibility/Compatibility.java
rename to flink-runtime-web/src/test/java/org/apache/flink/runtime/rest/compatibility/Compatibility.java
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/compatibility/CompatibilityCheckResult.java b/flink-runtime-web/src/test/java/org/apache/flink/runtime/rest/compatibility/CompatibilityCheckResult.java
similarity index 100%
rename from flink-runtime/src/test/java/org/apache/flink/runtime/rest/compatibility/CompatibilityCheckResult.java
rename to flink-runtime-web/src/test/java/org/apache/flink/runtime/rest/compatibility/CompatibilityCheckResult.java
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/compatibility/CompatibilityRoutine.java b/flink-runtime-web/src/test/java/org/apache/flink/runtime/rest/compatibility/CompatibilityRoutine.java
similarity index 100%
rename from flink-runtime/src/test/java/org/apache/flink/runtime/rest/compatibility/CompatibilityRoutine.java
rename to flink-runtime-web/src/test/java/org/apache/flink/runtime/rest/compatibility/CompatibilityRoutine.java
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/compatibility/CompatibilityRoutines.java b/flink-runtime-web/src/test/java/org/apache/flink/runtime/rest/compatibility/CompatibilityRoutines.java
similarity index 100%
rename from flink-runtime/src/test/java/org/apache/flink/runtime/rest/compatibility/CompatibilityRoutines.java
rename to flink-runtime-web/src/test/java/org/apache/flink/runtime/rest/compatibility/CompatibilityRoutines.java
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/rest/compatibility/RestAPIStabilityTest.java b/flink-runtime-web/src/test/java/org/apache/flink/runtime/rest/compatibility/RestAPIStabilityTest.java
similarity index 100%
rename from flink-runtime/src/test/java/org/apache/flink/runtime/rest/compatibility/RestAPIStabilityTest.java
rename to flink-runtime-web/src/test/java/org/apache/flink/runtime/rest/compatibility/RestAPIStabilityTest.java
diff --git a/flink-runtime/src/test/resources/rest_api_v1.snapshot b/flink-runtime-web/src/test/resources/rest_api_v1.snapshot
similarity index 90%
rename from flink-runtime/src/test/resources/rest_api_v1.snapshot
rename to flink-runtime-web/src/test/resources/rest_api_v1.snapshot
index a4a7b47..20ef479 100644
--- a/flink-runtime/src/test/resources/rest_api_v1.snapshot
+++ b/flink-runtime-web/src/test/resources/rest_api_v1.snapshot
@@ -52,6 +52,294 @@
       }
     }
   }, {
+    "url" : "/jars",
+    "method" : "GET",
+    "status-code" : "200 OK",
+    "file-upload" : false,
+    "path-parameters" : {
+      "pathParameters" : [ ]
+    },
+    "query-parameters" : {
+      "queryParameters" : [ ]
+    },
+    "request" : {
+      "type" : "any"
+    },
+    "response" : {
+      "type" : "object",
+      "id" : "urn:jsonschema:org:apache:flink:runtime:webmonitor:handlers:JarListInfo",
+      "properties" : {
+        "address" : {
+          "type" : "string"
+        },
+        "files" : {
+          "type" : "array",
+          "items" : {
+            "type" : "object",
+            "id" : "urn:jsonschema:org:apache:flink:runtime:webmonitor:handlers:JarListInfo:JarFileInfo",
+            "properties" : {
+              "id" : {
+                "type" : "string"
+              },
+              "name" : {
+                "type" : "string"
+              },
+              "uploaded" : {
+                "type" : "integer"
+              },
+              "entry" : {
+                "type" : "array",
+                "items" : {
+                  "type" : "object",
+                  "id" : "urn:jsonschema:org:apache:flink:runtime:webmonitor:handlers:JarListInfo:JarEntryInfo",
+                  "properties" : {
+                    "name" : {
+                      "type" : "string"
+                    },
+                    "description" : {
+                      "type" : "string"
+                    }
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+  }, {
+    "url" : "/jars/upload",
+    "method" : "POST",
+    "status-code" : "200 OK",
+    "file-upload" : true,
+    "path-parameters" : {
+      "pathParameters" : [ ]
+    },
+    "query-parameters" : {
+      "queryParameters" : [ ]
+    },
+    "request" : {
+      "type" : "any"
+    },
+    "response" : {
+      "type" : "object",
+      "id" : "urn:jsonschema:org:apache:flink:runtime:webmonitor:handlers:JarUploadResponseBody",
+      "properties" : {
+        "filename" : {
+          "type" : "string"
+        },
+        "status" : {
+          "type" : "string",
+          "enum" : [ "success" ]
+        }
+      }
+    }
+  }, {
+    "url" : "/jars/:jarid",
+    "method" : "DELETE",
+    "status-code" : "200 OK",
+    "file-upload" : false,
+    "path-parameters" : {
+      "pathParameters" : [ {
+        "key" : "jarid"
+      } ]
+    },
+    "query-parameters" : {
+      "queryParameters" : [ ]
+    },
+    "request" : {
+      "type" : "any"
+    },
+    "response" : {
+      "type" : "any"
+    }
+  }, {
+    "url" : "/jars/:jarid/plan",
+    "method" : "GET",
+    "status-code" : "200 OK",
+    "file-upload" : false,
+    "path-parameters" : {
+      "pathParameters" : [ {
+        "key" : "jarid"
+      } ]
+    },
+    "query-parameters" : {
+      "queryParameters" : [ {
+        "key" : "program-args",
+        "mandatory" : false
+      }, {
+        "key" : "programArg",
+        "mandatory" : false
+      }, {
+        "key" : "entry-class",
+        "mandatory" : false
+      }, {
+        "key" : "parallelism",
+        "mandatory" : false
+      } ]
+    },
+    "request" : {
+      "type" : "object",
+      "id" : "urn:jsonschema:org:apache:flink:runtime:webmonitor:handlers:JarPlanRequestBody",
+      "properties" : {
+        "entryClass" : {
+          "type" : "string"
+        },
+        "programArgs" : {
+          "type" : "string"
+        },
+        "programArgsList" : {
+          "type" : "array",
+          "items" : {
+            "type" : "string"
+          }
+        },
+        "parallelism" : {
+          "type" : "integer"
+        },
+        "jobId" : {
+          "type" : "any"
+        }
+      }
+    },
+    "response" : {
+      "type" : "object",
+      "id" : "urn:jsonschema:org:apache:flink:runtime:rest:messages:JobPlanInfo",
+      "properties" : {
+        "plan" : {
+          "type" : "any"
+        }
+      }
+    }
+  }, {
+    "url" : "/jars/:jarid/plan",
+    "method" : "GET",
+    "status-code" : "200 OK",
+    "file-upload" : false,
+    "path-parameters" : {
+      "pathParameters" : [ {
+        "key" : "jarid"
+      } ]
+    },
+    "query-parameters" : {
+      "queryParameters" : [ {
+        "key" : "program-args",
+        "mandatory" : false
+      }, {
+        "key" : "programArg",
+        "mandatory" : false
+      }, {
+        "key" : "entry-class",
+        "mandatory" : false
+      }, {
+        "key" : "parallelism",
+        "mandatory" : false
+      } ]
+    },
+    "request" : {
+      "type" : "object",
+      "id" : "urn:jsonschema:org:apache:flink:runtime:webmonitor:handlers:JarPlanRequestBody",
+      "properties" : {
+        "entryClass" : {
+          "type" : "string"
+        },
+        "programArgs" : {
+          "type" : "string"
+        },
+        "programArgsList" : {
+          "type" : "array",
+          "items" : {
+            "type" : "string"
+          }
+        },
+        "parallelism" : {
+          "type" : "integer"
+        },
+        "jobId" : {
+          "type" : "any"
+        }
+      }
+    },
+    "response" : {
+      "type" : "object",
+      "id" : "urn:jsonschema:org:apache:flink:runtime:rest:messages:JobPlanInfo",
+      "properties" : {
+        "plan" : {
+          "type" : "any"
+        }
+      }
+    }
+  }, {
+    "url" : "/jars/:jarid/run",
+    "method" : "POST",
+    "status-code" : "200 OK",
+    "file-upload" : false,
+    "path-parameters" : {
+      "pathParameters" : [ {
+        "key" : "jarid"
+      } ]
+    },
+    "query-parameters" : {
+      "queryParameters" : [ {
+        "key" : "allowNonRestoredState",
+        "mandatory" : false
+      }, {
+        "key" : "savepointPath",
+        "mandatory" : false
+      }, {
+        "key" : "program-args",
+        "mandatory" : false
+      }, {
+        "key" : "programArg",
+        "mandatory" : false
+      }, {
+        "key" : "entry-class",
+        "mandatory" : false
+      }, {
+        "key" : "parallelism",
+        "mandatory" : false
+      } ]
+    },
+    "request" : {
+      "type" : "object",
+      "id" : "urn:jsonschema:org:apache:flink:runtime:webmonitor:handlers:JarRunRequestBody",
+      "properties" : {
+        "entryClass" : {
+          "type" : "string"
+        },
+        "programArgs" : {
+          "type" : "string"
+        },
+        "programArgsList" : {
+          "type" : "array",
+          "items" : {
+            "type" : "string"
+          }
+        },
+        "parallelism" : {
+          "type" : "integer"
+        },
+        "jobId" : {
+          "type" : "any"
+        },
+        "allowNonRestoredState" : {
+          "type" : "boolean"
+        },
+        "savepointPath" : {
+          "type" : "string"
+        }
+      }
+    },
+    "response" : {
+      "type" : "object",
+      "id" : "urn:jsonschema:org:apache:flink:runtime:webmonitor:handlers:JarRunResponseBody",
+      "properties" : {
+        "jobid" : {
+          "type" : "any"
+        }
+      }
+    }
+  }, {
     "url" : "/jobmanager/config",
     "method" : "GET",
     "status-code" : "200 OK",
diff --git a/flink-runtime/pom.xml b/flink-runtime/pom.xml
index 6e7b5a3..a75c20f 100644
--- a/flink-runtime/pom.xml
+++ b/flink-runtime/pom.xml
@@ -298,12 +298,6 @@ under the License.
 		</dependency>
 
 		<dependency>
-			<groupId>org.apache.flink</groupId>
-			<artifactId>flink-shaded-jackson-module-jsonSchema</artifactId>
-			<scope>test</scope>
-		</dependency>
-
-		<dependency>
 			<groupId>com.typesafe.akka</groupId>
 			<artifactId>akka-testkit_${scala.binary.version}</artifactId>
 		</dependency>