You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/11/08 07:21:45 UTC

[GitHub] [spark-docker] martin-g commented on a diff in pull request #23: [SPARK-40519] Add "Publish" workflow to help release apache/spark image

martin-g commented on code in PR #23:
URL: https://github.com/apache/spark-docker/pull/23#discussion_r1016218102


##########
.github/workflows/publish.yml:
##########
@@ -0,0 +1,70 @@
+#
+# 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.
+#
+
+name: "Publish"
+
+on:
+  workflow_dispatch:
+    inputs:
+      spark:
+        description: 'The Spark version of Spark image.'
+        required: true
+        default: '3.3.0'
+        type: choice
+        options:
+        - 3.3.0
+        - 3.3.1
+      scala:
+        description: 'The Scala version of Spark image.'
+        required: true 
+        type: string

Review Comment:
   why not `choice` with options `'2.12'` and `'2.13'` ?



##########
.github/workflows/publish.yml:
##########
@@ -0,0 +1,70 @@
+#
+# 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.
+#
+
+name: "Publish"
+
+on:
+  workflow_dispatch:
+    inputs:
+      spark:
+        description: 'The Spark version of Spark image.'
+        required: true
+        default: '3.3.0'
+        type: choice
+        options:
+        - 3.3.0
+        - 3.3.1
+      scala:
+        description: 'The Scala version of Spark image.'
+        required: true 
+        type: string
+        default: 2.12
+      java:
+        description: 'The Java version of Spark image.'
+        required: true 
+        type: string
+        default: 11
+      publish:
+        description: 'Publish the image or not.'
+        default: '3.3.0'

Review Comment:
   it should be `true` or `false`



##########
.github/workflows/publish.yml:
##########
@@ -0,0 +1,70 @@
+#
+# 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.
+#
+
+name: "Publish"
+
+on:
+  workflow_dispatch:
+    inputs:
+      spark:
+        description: 'The Spark version of Spark image.'
+        required: true
+        default: '3.3.0'
+        type: choice
+        options:
+        - 3.3.0
+        - 3.3.1
+      scala:
+        description: 'The Scala version of Spark image.'
+        required: true 
+        type: string
+        default: 2.12

Review Comment:
   nit: wrap the value in single quotes as L28 ?!



##########
versions.json:
##########
@@ -0,0 +1,35 @@
+{
+  "versions": [

Review Comment:
   here I see only images with Scala 2.12, so my earlier comment about using a `choice` for 2.12/2.13 maybe is not needed



##########
tools/manifest.py:
##########
@@ -0,0 +1,82 @@
+#!/usr/bin/env python3
+
+#
+# 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.
+#
+
+from argparse import ArgumentParser
+import json
+from statistics import mode
+
+
+def parse_opts():
+    parser = ArgumentParser(prog="manifest.py")
+
+    parser.add_argument(
+        dest="mode",
+        choices=["tags"],
+        type=str,
+        help="The path to specific dockerfile",

Review Comment:
   copy/paste error ?!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org