You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tz...@apache.org on 2020/03/26 08:13:03 UTC

[flink-statefun] branch master updated (091ebf3 -> 797cad7)

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

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


    from 091ebf3  [FLINK-16785] [py] Add descriptions to Python SDK setup.py
     new 339cc39  [hotfix] [testutil] Fix Javadocs in statefun-testutil
     new 797cad7  [release] Add tools script for creating Python SDK distributions

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:
 .../testutils/function/FunctionTestHarness.java    |  2 +
 .../matchers/StatefulFunctionMatchers.java         | 16 ++++++--
 ...ease_branch.sh => create_python_sdk_release.sh} | 43 ++++++++++++++++------
 3 files changed, 45 insertions(+), 16 deletions(-)
 copy tools/releasing/{create_release_branch.sh => create_python_sdk_release.sh} (62%)


[flink-statefun] 02/02: [release] Add tools script for creating Python SDK distributions

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

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

commit 797cad71f0cba2570e630f4b9391e53ec0ec4f94
Author: Tzu-Li (Gordon) Tai <tz...@apache.org>
AuthorDate: Thu Mar 26 16:11:48 2020 +0800

    [release] Add tools script for creating Python SDK distributions
---
 tools/releasing/create_python_sdk_release.sh | 81 ++++++++++++++++++++++++++++
 1 file changed, 81 insertions(+)

diff --git a/tools/releasing/create_python_sdk_release.sh b/tools/releasing/create_python_sdk_release.sh
new file mode 100755
index 0000000..ea1b326
--- /dev/null
+++ b/tools/releasing/create_python_sdk_release.sh
@@ -0,0 +1,81 @@
+#!/usr/bin/env bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##
+## Variables with defaults (if not overwritten by environment)
+##
+SKIP_GPG=${SKIP_GPG:-false}
+MVN=${MVN:-mvn}
+
+##
+## Required variables
+##
+RELEASE_VERSION=${RELEASE_VERSION}
+
+if [ -z "${RELEASE_VERSION}" ]; then
+    echo "RELEASE_VERSION was not set."
+    exit 1
+fi
+
+# fail immediately
+set -o errexit
+set -o nounset
+
+if [ "$(uname)" == "Darwin" ]; then
+    SHASUM="shasum -a 512"
+else
+    SHASUM="sha512sum"
+fi
+
+CURR_DIR=`pwd`
+BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
+PROJECT_ROOT="${BASE_DIR}/../../"
+
+# Sanity check to ensure that resolved paths are valid; a LICENSE file should aways exist in project root
+if [ ! -f ${PROJECT_ROOT}/LICENSE ]; then
+    echo "Project root path ${PROJECT_ROOT} is not valid; script may be in the wrong directory."
+    exit 1
+fi
+
+###########################
+
+RELEASE_DIR=${PROJECT_ROOT}/release/
+mkdir -p ${RELEASE_DIR}
+
+cd ${PROJECT_ROOT}/statefun-python-sdk/
+./build-distribution.sh
+
+mv dist/* ${RELEASE_DIR}
+
+SOURCE_DIST="apache-flink-statefun-$RELEASE_VERSION.tar.gz"
+WHL_VERSION=`echo "$RELEASE_VERSION" | tr - _`
+WHL_DIST="apache_flink_statefun-$WHL_VERSION-py3-none-any.whl"
+
+cd ${RELEASE_DIR}
+# Sign sha the files
+if [ "$SKIP_GPG" == "false" ] ; then
+    gpg --armor --detach-sig ${SOURCE_DIST}
+    gpg --armor --detach-sig ${WHL_DIST}
+fi
+${SHASUM} "${SOURCE_DIST}" > "${SOURCE_DIST}.sha512"
+${SHASUM} "${WHL_DIST}" > "${WHL_DIST}.sha512"
+
+echo "Created Python SDK distribution files at $RELEASE_DIR."
+
+cd ${CURR_DIR}


[flink-statefun] 01/02: [hotfix] [testutil] Fix Javadocs in statefun-testutil

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

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

commit 339cc39579563b74ba6bf1f78c5ef9ba1f394cd3
Author: Tzu-Li (Gordon) Tai <tz...@apache.org>
AuthorDate: Thu Mar 26 15:35:56 2020 +0800

    [hotfix] [testutil] Fix Javadocs in statefun-testutil
---
 .../statefun/testutils/function/FunctionTestHarness.java |  2 ++
 .../testutils/matchers/StatefulFunctionMatchers.java     | 16 ++++++++++++----
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/statefun-testutil/src/main/java/org/apache/flink/statefun/testutils/function/FunctionTestHarness.java b/statefun-testutil/src/main/java/org/apache/flink/statefun/testutils/function/FunctionTestHarness.java
index 9c1fedf..202f03d 100644
--- a/statefun-testutil/src/main/java/org/apache/flink/statefun/testutils/function/FunctionTestHarness.java
+++ b/statefun-testutil/src/main/java/org/apache/flink/statefun/testutils/function/FunctionTestHarness.java
@@ -120,6 +120,7 @@ public class FunctionTestHarness {
   /**
    * Advances the internal clock the harness and fires and pending timers.
    *
+   * @param duration the amount of time to advance for this tick.
    * @return A responses sent from the function after invocation.
    */
   public Map<Address, List<Object>> tick(Duration duration) {
@@ -129,6 +130,7 @@ public class FunctionTestHarness {
 
   /**
    * @param identifier An egress identifier
+   * @param <T> the data type consumed by the egress.
    * @return All the messages sent to that egress.
    */
   public <T> List<T> getEgress(EgressIdentifier<T> identifier) {
diff --git a/statefun-testutil/src/main/java/org/apache/flink/statefun/testutils/matchers/StatefulFunctionMatchers.java b/statefun-testutil/src/main/java/org/apache/flink/statefun/testutils/matchers/StatefulFunctionMatchers.java
index 5cf1644..f96b174 100644
--- a/statefun-testutil/src/main/java/org/apache/flink/statefun/testutils/matchers/StatefulFunctionMatchers.java
+++ b/statefun-testutil/src/main/java/org/apache/flink/statefun/testutils/matchers/StatefulFunctionMatchers.java
@@ -24,13 +24,13 @@ import java.util.List;
 import java.util.Map;
 import org.apache.flink.statefun.sdk.Address;
 import org.apache.flink.statefun.sdk.FunctionType;
+import org.apache.flink.statefun.testutils.function.FunctionTestHarness;
 import org.hamcrest.Matcher;
 
 /**
- * A set of Hamcrest matchers to help check the responses from a {@link
- * org.apache.flink.statefun.testutils.function.FunctionTestHarness}
+ * A set of Hamcrest matchers to help check the responses from a {@link FunctionTestHarness}
  *
- * <p>{@see FunctionTestHarness} for usage details.
+ * @see FunctionTestHarness for usage details.
  */
 public final class StatefulFunctionMatchers {
 
@@ -52,6 +52,10 @@ public final class StatefulFunctionMatchers {
    *
    * <p><b>Important:</b> This matcher expects an exact match on the number of responses sent to
    * this function.
+   *
+   * @param matcher matcher for address.
+   * @param matchers matchers for addresses.
+   * @return a matcher that checks all the responses sent to a given {@link FunctionType}.
    */
   public static MessagesSentToAddress sent(
       MatchersByAddress matcher, MatchersByAddress... matchers) {
@@ -65,7 +69,11 @@ public final class StatefulFunctionMatchers {
     return new MessagesSentToAddress(messagesByAddress);
   }
 
-  /** A matcher that checks the function did not send any messages. */
+  /**
+   * A matcher that checks the function did not send any messages.
+   *
+   * @return a matcher that checks the function did not send any messages.
+   */
   public static SentNothingMatcher sentNothing() {
     return new SentNothingMatcher();
   }