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: move CI to GitHub Actions #408

Merged
merged 4 commits into from
Jul 26, 2021

Conversation

aktech
Copy link
Contributor

@aktech aktech commented Jul 12, 2021

Fixes #346

First pass at converting from .travis.yml to GitHub Actions.

Notes:

  • This doesn't includes skipping tests based on commit message at the moment, not sure if we need them (thoughts?)
  • Currently runs on all branches (will change before merge)
  • The tests are failing (probably because they are failing in Travis as well)
  • Fixing flaky tests is beyond the scope of this, we can fix them, after this is merged (?).
  • Also, it seems most of the tests haven't ran for a long long time except the main tests.

Here are the sample runs:
Docs: https://github.com/aktech/dask-gateway/actions/runs/1024666853
Tests: https://github.com/aktech/dask-gateway/actions/runs/1024666852

@jacobtomlinson @martindurant

@aktech aktech marked this pull request as draft July 12, 2021 23:44
@martindurant
Copy link
Member

cc @douglasdavis

@aktech aktech marked this pull request as ready for review July 13, 2021 09:52
@TomAugspurger
Copy link
Member

Do we have any hope for fixing the failing tests with CI running on Travis and then merging this once all the tests are passing?

@martindurant
Copy link
Member

Are we missing YARN tests, or are those all the Errored ones I am seeing?

@aktech
Copy link
Contributor Author

aktech commented Jul 13, 2021

Are we missing YARN tests, or are those all the Errored ones I am seeing?

They are marked as hadoop-tests

Do we have any hope for fixing the failing tests with CI running on Travis and then merging this once all the tests are passing?

We can, although GitHub Actions doesn't need to "replace" Travis yet. Also, I am not sure how much effort is that, I'll check it though.

@martindurant
Copy link
Member

They are marked as hadoop-tests

Oh! And they are green :)

@aktech
Copy link
Contributor Author

aktech commented Jul 13, 2021

pbs-tests and slurm-tests tests are sometimes flaky though.

@TomAugspurger TomAugspurger mentioned this pull request Jul 14, 2021
@consideRatio
Copy link
Collaborator

Wieee nice work on this @aktech!

In case you think it's useful, I want to highlight github actions we developed in the JupyterHub organization as part of creating CI infrastructure for the JupyterHub and BinderHub helm charts.

An action to setup a k8s cluster - includes install of kubectl and helm, and includes a reliable NetworkPolicy controller to validate such functions

Full context of example here, and a link to the github action's documentation.

      # Starts a k8s cluster with NetworkPolicy enforcement and installs both
      # kubectl and helm
      #
      # ref: https://github.com/jupyterhub/action-k3s-helm/
      - uses: jupyterhub/action-k3s-helm@v1
        with:
          k3s-channel: ${{ matrix.k3s-channel }}
          metrics-enabled: false
          traefik-enabled: false
          docker-enabled: true

An action to provide insights if something went wrong or not

Full context of example here, and a link to the github action's documentation.

      # ref: https://github.com/jupyterhub/action-k8s-namespace-report
      - name: Kubernetes namespace report
        uses: jupyterhub/action-k8s-namespace-report@v1
        if: always()
        with:
          important-workloads: deploy/hub deploy/proxy

An action to await installed Helm charts efficiently - more informative than helm install --wait

Full context of example here, and a link to the github action's documentation.

      # It is only needed at this point forward as this is when we install
      # jupyterhub and the autohttps pod is about to start, so for CI
      # performance we delayed this until now and did other things in between.
      - name: Await local ACME server
        uses: jupyterhub/action-k8s-await-workloads@v1
        with:
          timeout: 150
          max-restarts: 1

@martindurant
Copy link
Member

Those do look like useful action recipes! I should not be surprised that k8s-on-gh is a well-developed space.

@aktech
Copy link
Contributor Author

aktech commented Jul 15, 2021

@consideRatio That's excellent stuff! thanks for sharing.

@jacobtomlinson
Copy link
Member

Another tool that could be useful that we use over on dask-kubernetes is pytest-kind which handles k8s cluster creation as a pytest fixture. Makes local testing consistent with CI testing. Docker is your only dependency.

@aktech aktech mentioned this pull request Jul 23, 2021
5 tasks
@aktech
Copy link
Contributor Author

aktech commented Jul 23, 2021

Travis tests are fixed in this PR: #411

@martindurant
Copy link
Member

Can you merge your fixes in here and rerun your actions, please?

@aktech
Copy link
Contributor Author

aktech commented Jul 23, 2021

Just ran: https://github.com/aktech/dask-gateway/actions/runs/1060226799

All green except the kubernetes tests, I haven't had the chance to looked into it yet. Can we fix that in another PR maybe?

There maybe some flaky tests, which needs to be fixed but would be good to get the CI in first, I guess.

@aktech
Copy link
Contributor Author

aktech commented Jul 23, 2021

Note that I had to use the pytest marker (kubernetes) to mark the kubernetes test to avoid running them in the main tests job as helm is probably present by default in GitHub Actions, hence the k8s tests are not skipped by default.

@martindurant
Copy link
Member

That all seems fine to me. Anyone else here have an opinion? If no -1, I intend to merge, and we can then iterate with GA tests.

@martindurant martindurant merged commit 55c87d6 into dask:main Jul 26, 2021
@martindurant
Copy link
Member

Thank you @aktech !

@martindurant
Copy link
Member

https://github.com/dask/dask-gateway/actions/runs/1067491048

@aktech aktech deleted the travis-to-github-actions branch July 26, 2021 13:40
@aktech
Copy link
Contributor Author

aktech commented Jul 26, 2021

Thanks for getting this in @martindurant 🎉

@martindurant
Copy link
Member

We should start a new issue discussing what it will take to get kubernetes passing

@aktech
Copy link
Contributor Author

aktech commented Jul 26, 2021

We should start a new issue discussing what it will take to get kubernetes passing

Yep, makes sense. I think I might have some idea.

@aktech
Copy link
Contributor Author

aktech commented Jul 26, 2021

I have created an issue here: #412

@consideRatio consideRatio changed the title Move CI to GitHub Actions ci: move CI to GitHub Actions Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate CI to GitHub Actions
5 participants