potiuk commented on code in PR #45266: URL: https://github.com/apache/airflow/pull/45266#discussion_r1899177086
########## .github/actions/prepare_single_ci_image/action.yml: ########## @@ -0,0 +1,43 @@ +# 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: 'Prepare single images' +description: 'Recreates current python image from artifacts' +inputs: + python: + description: 'Python version for image to prepare' + required: true + python-versions-list-as-string: + description: 'Stringified array of all Python versions to prepare - separated by spaces.' + required: true + platform: + description: 'Platform for the build - linux/amd64 or linux/arm64' + required: true +runs: + using: "composite" + steps: + - name: "Restore CI docker images ${{ inputs.platform }}:${{ inputs.python }}" + uses: apache/infrastructure-actions/stash/restore@c94b890bbedc2fc61466d28e6bd9966bc6c6643c + with: + key: "ci-image-save-${{ inputs.platform }}-${{ inputs.python }}" + path: "/tmp/" + if: contains(inputs.python-versions-list-as-string, inputs.python) + - name: "Load CI image ${{ inputs.platform }}:${{ inputs.python }}" + run: breeze ci-image load --platform "${{ inputs.platform }}" --python "${{ inputs.python }}" + shell: bash + if: contains(inputs.python-versions-list-as-string, inputs.python) Review Comment: Nope. It's a workaround for lack of "list" support in stash actions (see the "contains" if - we had to hard-code 5 calls of this action (for Python 3.8 (for backports), 3.9, 3.10, 3.11, 3.12 - because we can only download one key per action, so this action is really specialized to filter whether to run it or not based on the "python-versios-list-as-string" values. I hope we will get rid of this once we contribute this to the stash action: https://github.com/apache/airflow/issues/45268 -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
