beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Work logged] (BEAM-3339) Create post-release testing of the nightly snapshots
Date Mon, 19 Mar 2018 16:02:00 GMT

     [ https://issues.apache.org/jira/browse/BEAM-3339?focusedWorklogId=81907&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-81907
]

ASF GitHub Bot logged work on BEAM-3339:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 19/Mar/18 16:01
            Start Date: 19/Mar/18 16:01
    Worklog Time Spent: 10m 
      Work Description: lukecwik commented on a change in pull request #4788: [BEAM-3339]
Mobile gaming automation for Java nightly snapshot on core runners
URL: https://github.com/apache/beam/pull/4788#discussion_r175486978
 
 

 ##########
 File path: release/src/main/groovy/MoblieGamingJavaUtils.groovy
 ##########
 @@ -0,0 +1,182 @@
+#!groovy
+import java.text.SimpleDateFormat
+
+/*
+ * 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.
+ */
+
+
+class MobileGamingJavaUtils {
+
+    public static final RUNNERS = [DirectRunner: "direct-runner",
+                                   DataflowRunner: "dataflow-runner",
+                                   SparkRunner: "spark-runner",
+                                   ApexRunner: "apex-runner",
+                                   FlinkRunner: "flink-runner"]
+
+    public static final EXECUTION_TIMEOUT = 15
+
+    // Lists used to verify team names generated in the LeaderBoard example
+    public static final COLORS = new ArrayList<>(Arrays.asList(
+            "Magenta",
+            "AliceBlue",
+            "Almond",
+            "Amaranth",
+            "Amber",
+            "Amethyst",
+            "AndroidGreen",
+            "AntiqueBrass",
+            "Fuchsia",
+            "Ruby",
+            "AppleGreen",
+            "Apricot",
+            "Aqua",
+            "ArmyGreen",
+            "Asparagus",
+            "Auburn",
+            "Azure",
+            "Banana",
+            "Beige",
+            "Bisque",
+            "BarnRed",
+            "BattleshipGrey"))
+
+    private static final USERSCORE_OUTPUT_PREFIX = "java-userscore-result-"
+
+    private static final HOURLYTEAMSCORE_OUTPUT_PREFIX = "java-hourlyteamscore-result-"
+
+    public static String generateCommand(String exampleName, String runner, TestScripts t){
+        String commonArgs = "--tempLocation=gs://${t.gcsBucket()}/tmp --runner=${runner}
"
+
+        if(exampleName.equals("UserScore")){
+            return generateUserScoreCommand(runner, t, commonArgs)
+        }
+        if(exampleName.equals("HourlyTeamScore")){
+            return generateHourlyTeamScoreCommand(runner, t, commonArgs)
+        }
+        if(exampleName.equals("LeaderBoard")){
+            return generateLeaderBoardCommand(runner, t, commonArgs)
+        }
+        if(exampleName.equals("GameStats")){
+            return generateGameStatsCommand(runner, t, commonArgs)
+        }
+        if(exampleName.equals("Injector")){
+            return generateInjectorCommand(t)
+        }
+        return "ERROR: Not found the example ${exampleName}."
+    }
+
+    public static String getUserScoreOutputName(String runner){
+        return "${USERSCORE_OUTPUT_PREFIX}${RUNNERS[runner]}.txt"
+    }
+
+    public static String getHourlyTeamScoreOutputName(String runner){
+        return "${HOURLYTEAMSCORE_OUTPUT_PREFIX}${RUNNERS[runner]}.txt"
+    }
+
+
+    private static String generateUserScoreCommand(String runner, TestScripts t, String commonArgs){
+        StringBuilder cmd = new StringBuilder()
+        StringBuilder exeArgs = new StringBuilder(commonArgs)
+
+        exeArgs.append("--input=gs://${t.gcsBucket()}/5000_gaming_data.csv ")
+        if(runner == "DataflowRunner"){
+            exeArgs.append("--project=${t.gcpProject()} ")
+                    .append("--output=gs://${t.gcsBucket()}/${getUserScoreOutputName(runner)}
")
+        }
 
 Review comment:
   nit: style
   `} else {`
   
   here and elsewhere

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 81907)
    Time Spent: 70h 10m  (was: 70h)

> Create post-release testing of the nightly snapshots
> ----------------------------------------------------
>
>                 Key: BEAM-3339
>                 URL: https://issues.apache.org/jira/browse/BEAM-3339
>             Project: Beam
>          Issue Type: Improvement
>          Components: testing
>            Reporter: Alan Myrvold
>            Assignee: Jason Kuster
>            Priority: Major
>          Time Spent: 70h 10m
>  Remaining Estimate: 0h
>
> The nightly java snapshots in https://repository.apache.org/content/groups/snapshots/org/apache/beam
should be verified by following the https://beam.apache.org/get-started/quickstart-java/ instructions,
to verify that the release is usable.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message