Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • P platform-airflow-dags
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • Gmodena
  • platform-airflow-dags
  • Merge requests
  • !8

T292741 implement ci checks

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Gmodena requested to merge T292741-implement-ci-checks into multi-project-dags-repo Nov 02, 2021
  • Overview 0
  • Commits 13
  • Pipelines 0
  • Changes 5

This PR implements a set of basic CI checks as described in T292741.

Checks

A successful CI build should pass linting and testing steps.

Linting

Run lint manually inside a docker container with make lint.

The linting step currently treats errors as warnings: the build won't stop when failures are detected.

We lint with flake8 and the following (conservative) settings:

  • McCabe complexity threshold: 10
  • maximum allowed line length: 127 (Default PEP8: 79)
  • check for syntax errors or undefined names

Tests

Run test manually, inside a docker container, with make test. Test results and coverage are reported to standard output:

---------- coverage: platform linux, python 3.7.11-final-0 -----------
Name                           Stmts   Miss  Cover
--------------------------------------------------
spark/__init__.py                  0      0   100%
spark/instances_to_filter.py      12      0   100%
spark/raw2parquet.py              21     21     0%
spark/schema.py                    7      0   100%
spark/search_table.py             22     22     0%
spark/transform.py                42     17    60%
--------------------------------------------------
TOTAL                            104     60    42%

======================== 2 passed, 9 warnings in 9.05s =========================

Automation and Github mirroing

Gitlab Pipelines are currently unavailable in Wikimedia's instance. To automate CI, for demo purposes, we propose to mirror this repo to Github, and execute tests on a Github runner

./github/workflow/build.yml implements a CI workflow that runs on every push. Output is available at https://github.com/gmodena/wmf-platform-airflow-dags/actions/workflows/build.yml?query=branch%3AT292741-implement-ci-checks.

Companion PRs

  • !6 (merged)
  • !5 (merged)
Edited Nov 09, 2021 by Gmodena
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: T292741-implement-ci-checks