Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Fix Connection time out in Python workflow #1651

Merged
merged 22 commits into from
Oct 25, 2024

Conversation

furqaankhan
Copy link
Contributor

@furqaankhan furqaankhan commented Oct 21, 2024

Did you read the Contributor Guide?

Is this PR related to a JIRA ticket?

  • No, this is a CI update. The PR name follows the format [CI] my subject

What changes were proposed in this PR?

How was this patch tested?

  • Passed CI

Did this PR include necessary documentation updates?

  • No, this PR does not affect any public API so no need to change the documentation.

@furqaankhan furqaankhan marked this pull request as ready for review October 25, 2024 02:32
@furqaankhan
Copy link
Contributor Author

@jbampton @jiayuasu Not sure why the lint is not passing. It is passing on my fork's PR: furqaankhan#2

@jbampton
Copy link
Member

Hey @furqaankhan the requirements txt fixer hook is failing.

Basically docker/sedona-spark-jupyterlab/requirements.txt is not sorted.

I have the fix in #1654

Copy link
Member

@jiayuasu jiayuasu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This value /home/runner/.local/share/virtualenvs/python-${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/site-packages/pyspark is so long. Can you make it a global env?

.github/workflows/python.yml Outdated Show resolved Hide resolved
@jiayuasu
Copy link
Member

A quick example about global env from ChatGPT

name: Matrix CI Workflow

on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest

    # Define a matrix of input values
    strategy:
      matrix:
        environment: [staging, production]
        node: [16, 18]

    # Use the matrix value inside `env`
    env:
      ENV_NAME: ${{ matrix.environment }}
      NODE_VERSION: ${{ matrix.node }}

    steps:
      - name: Check out repository
        uses: actions/checkout@v3

      - name: Print Matrix Inputs as Environment Variables
        run: |
          echo "Environment: $ENV_NAME"
          echo "Node Version: $NODE_VERSION"

      - name: Use Environment-Specific Logic
        run: |
          if [ "$ENV_NAME" == "production" ]; then
            echo "This is a production build.";
          else
            echo "This is a staging build.";
          fi

Co-authored-by: Jia Yu <jiayu@wherobots.com>
- spark: '3.0.3'
scala: '2.12.8'
python: '3.7'
hadoop: '2.7'
env:
VENV_PATH: /home/runner/.local/share/virtualenvs/python-${{ matrix.python }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't add the whole path because it would be easier this way to use the existing virtual environment at lines 143 and 158.

@jiayuasu
Copy link
Member

Great work!

@jiayuasu jiayuasu merged commit 661f8fa into apache:master Oct 25, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants