You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "hussein-awala (via GitHub)" <gi...@apache.org> on 2023/08/13 21:23:24 UTC

[GitHub] [airflow] hussein-awala opened a new pull request, #33371: Migrate the CI workflows to the new runners on EKS cluster

hussein-awala opened a new pull request, #33371:
URL: https://github.com/apache/airflow/pull/33371

   <!--
    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.
    -->
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of an existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   This PR updates the labels used in `runs-on` to migrate the workflows to the new GHA runners running on Airflow EKS cluster, and managed by an Actions Runner Controller (ARC).
   
   In the new cluster, we can choose between 3 different sizes for the self hosted runners (the instance type could be change):
   - small -> t4g-medium (2 cpus, 4Gb of ram) -> `runs-on: ${{ fromJson(needs.build-info.outputs.runs-on-small) }}`
   - medium -> t4g-xlarge (4 cpus, 16Gb of ram) -> `runs-on: ${{ fromJson(needs.build-info.outputs.runs-on-medium) }}`
   - large -> t4g-2xlarge (8 cpus, 32 Gb of ram) -> `runs-on: ${{ fromJson(needs.build-info.outputs.runs-on-large) }}`
   
   And we can add new runner sets with different characteristics in the future, for ex create a specific docker image which contains some pre-installed packages and use it in specific jobs, or maybe create a new runner image from Airflow CI image and update it via the CI after updating the breeze or Airflow dependencies. (to be discussed later).
   
   Also, this PR removes all the steps which setup python using `actions/setup-python@v4`, because of a bug in the action (actions/setup-python#705). As a workaround, I pre-installed python in the runner docker image, we can revert this change after fixing the bug, or keep it based on the performance of the runner.
   
   
   <!-- Please keep an empty line above the dashes. -->
   ---
   **^ Add meaningful description above**
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
   


-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] potiuk commented on a diff in pull request #33371: Migrate the CI workflows to the new runners on EKS cluster

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on code in PR #33371:
URL: https://github.com/apache/airflow/pull/33371#discussion_r1293217191


##########
.github/workflows/ci.yml:
##########
@@ -115,6 +115,15 @@ jobs:
       helm-test-packages: ${{ steps.selective-checks.outputs.helm-test-packages }}
       debug-resources: ${{ steps.selective-checks.outputs.debug-resources }}
       runs-on: ${{ steps.selective-checks.outputs.runs-on }}
+      runs-on-small: >-
+        ${{ steps.selective-checks.outputs.runs-on == 'self-hosted'

Review Comment:
   Suggestion: Maybe the output should be named "selective-checks.outputs.small-runner", "selective-checks.outputs.medium-runner" etc. 
   
   That will be a nice "abstraction layer" (selective checks based on labels will choose what the "medium" runner really is.
   
   That will also read better:
   
   runs-on: "${{ fromJson(needs.build-info.outputs.medium-runner) }}"



-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] potiuk commented on a diff in pull request #33371: Migrate the CI workflows to the new runners on EKS cluster

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on code in PR #33371:
URL: https://github.com/apache/airflow/pull/33371#discussion_r1293213695


##########
.github/actions/breeze/action.yml:
##########
@@ -25,12 +25,6 @@ outputs:
 runs:
   using: "composite"
   steps:
-    - name: "Setup python"

Review Comment:
   I am afraid this will not work if we want to merge it and would like to freely switch between the "public", "AWS" and "ARC" runners. 
   
   I would  prefer to have the  case where we have a way to easily switch to choose which runners we are using on a PR-by PR basis (i.e. for example apply label to make specific PR to run on ARC - similalry as we do with "use public runners") - at least for a few week transition period.
   
   I think what can be done is that this action can be conditional based on (yes, you guessed it) selective checks output. I think when you are calling a composite action, you are able to pass it a parameter from the calling action, so we could pass "use-arc" or simlar selective check output and based on that we could either run the setup python action or not.



-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Migrate the CI workflows to the new runners on EKS cluster [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #33371:
URL: https://github.com/apache/airflow/pull/33371#issuecomment-1752133568

   We **might** want to come back to this change. It was stale for a while but probably worth keeping it until we get to changing our CI env


-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Migrate the CI workflows to the new runners on EKS cluster [airflow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #33371: Migrate the CI workflows to the new runners on EKS cluster
URL: https://github.com/apache/airflow/pull/33371


-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] potiuk commented on a diff in pull request #33371: Migrate the CI workflows to the new runners on EKS cluster

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on code in PR #33371:
URL: https://github.com/apache/airflow/pull/33371#discussion_r1293206681


##########
.github/workflows/ci.yml:
##########
@@ -115,6 +115,15 @@ jobs:
       helm-test-packages: ${{ steps.selective-checks.outputs.helm-test-packages }}
       debug-resources: ${{ steps.selective-checks.outputs.debug-resources }}
       runs-on: ${{ steps.selective-checks.outputs.runs-on }}
+      runs-on-small: >-
+        ${{ steps.selective-checks.outputs.runs-on == 'self-hosted'

Review Comment:
   I have bad experiences with conditions embedded using the expreession language. It's prone to errors. Would not it be better to generate `runs-on-small/medium/large` as direct output of selective checks? 
   
   That has the potential that we can also base it on labels later when we connect ARC - then we could for example apply an "ARC" label to PR to test it on the ARC setup. 
   
   This has the nice property that selective checks are also very well covered by unit tests so we can easily test any logic we will apply there.



-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] github-actions[bot] commented on pull request #33371: Migrate the CI workflows to the new runners on EKS cluster

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #33371:
URL: https://github.com/apache/airflow/pull/33371#issuecomment-1740145615

   This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.


-- 
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: commits-unsubscribe@airflow.apache.org

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


[GitHub] [airflow] potiuk commented on a diff in pull request #33371: Migrate the CI workflows to the new runners on EKS cluster

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on code in PR #33371:
URL: https://github.com/apache/airflow/pull/33371#discussion_r1293217191


##########
.github/workflows/ci.yml:
##########
@@ -115,6 +115,15 @@ jobs:
       helm-test-packages: ${{ steps.selective-checks.outputs.helm-test-packages }}
       debug-resources: ${{ steps.selective-checks.outputs.debug-resources }}
       runs-on: ${{ steps.selective-checks.outputs.runs-on }}
+      runs-on-small: >-
+        ${{ steps.selective-checks.outputs.runs-on == 'self-hosted'

Review Comment:
   Suggestion: Maybe the output should be named "selective-checks.outputs.small-runner", "selective-checks.outputs.medium-runner" etc. 
   
   That will be a nice "abstraction layer" (selective checks based on labels will choose what the "medium" runner really is.
   
   That will also read better:
   
   ```
   runs-on: "${{ fromJson(needs.build-info.outputs.medium-runner) }}"
   ```



-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Migrate the CI workflows to the new runners on EKS cluster [airflow]

Posted by "hussein-awala (via GitHub)" <gi...@apache.org>.
hussein-awala closed pull request #33371: Migrate the CI workflows to the new runners on EKS cluster
URL: https://github.com/apache/airflow/pull/33371


-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Migrate the CI workflows to the new runners on EKS cluster [airflow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #33371: Migrate the CI workflows to the new runners on EKS cluster
URL: https://github.com/apache/airflow/pull/33371


-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Migrate the CI workflows to the new runners on EKS cluster [airflow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #33371:
URL: https://github.com/apache/airflow/pull/33371#issuecomment-1870706019

   This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.


-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Migrate the CI workflows to the new runners on EKS cluster [airflow]

Posted by "hussein-awala (via GitHub)" <gi...@apache.org>.
hussein-awala commented on PR #33371:
URL: https://github.com/apache/airflow/pull/33371#issuecomment-1752135099

   > We **might** want to come back to this change. It was stale for a while but probably worth keeping it until we get to changing our CI env
   
   Recently I did a similar migration in a personal project, I will come back to this one in two weeks with a much better version.


-- 
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: commits-unsubscribe@airflow.apache.org

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