XComp commented on code in PR #23971: URL: https://github.com/apache/flink/pull/23971#discussion_r1449977361
########## .github/actions/select_workflow_configs/action.yml: ########## @@ -0,0 +1,59 @@ +# 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: "Selects Flink workflow configurations" +description: "Loads the relevant workflow configuration from a given folder." +inputs: + config-folder: + description: "The directory in which the workflow configurations are located." + required: true + profile: + description: >- + The profile that's used to access the desired workflow configuration + file. Any invalid profile (i.e. no file exists) will lead to using + the default workflow configurations. Configuration files are expected + to have the name format 'flink-workflow.<profile>.json' and should be + located in the folder that's specified through the 'config-folder' parameter. + required: true +outputs: + workflow-configurations: + description: "A JSON representation of the workflow configurations." + value: "${{ steps.workflow-selection.outputs.configs }}" +runs: + using: "composite" + steps: + - name: "Loads Flink workflow configurations" + id: workflow-selection + shell: bash + run: | + fallback_profile="default" + fallback_path="${{ inputs.config-folder }}/flink-workflow.${fallback_profile}.json" Review Comment: > Scheduled workflow runs will be triggered from master. The workflow configuration (the json file) is therefore also loaded from master. The workflow then triggers the checkout of individual branches. The following build failure (which happened in release-1.18) seems to prove me wrong: https://github.com/XComp/flink/actions/runs/7498584099 I have forgotten to backport the job_init action into my fork's `release-1.18` branch in that case. I assume it being true also for the configuration files. So, your solution is viable. That means that we could have one workflow configuration file per branch. We will still keep the functionality around configuration files in general to avoid having too much duplicate code for each of the nightly workflows. -- 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]
