Skip to content
Snippets Groups Projects
  1. Jul 01, 2021
    • John Snow's avatar
      python: rename 'venv-check' target to 'check-pipenv' · 6f84d726
      John Snow authored
      
      Well, Cleber was right, this is a better name.
      
      In preparation for adding a different kind of virtual environment check
      (One that simply uses whichever version of Python you happen to have),
      rename this test 'check-pipenv' so that it matches the CI job
      'check-python-pipenv'.
      
      Remove the "If you don't know which test to run" hint, because it's not
      actually likely you have Python 3.6 installed to be able to run the
      test. It's still the test I'd most prefer you to run, but it's not the
      test you are most likely to be able to run.
      
      Rename the 'venv' target to 'pipenv' as well, and move the more
      pertinent help text under the 'check-pipenv' target.
      
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      Reviewed-by: default avatarWillian Rampazzo <willianr@redhat.com>
      Reviewed-by: default avatarWainer dos Santos Moschetta <wainersm@redhat.com>
      Message-id: 20210629214323.1329806-8-jsnow@redhat.com
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      6f84d726
  2. Jun 25, 2021
  3. Jun 07, 2021
  4. Jun 02, 2021
  5. Jun 01, 2021
    • John Snow's avatar
      gitlab: add python linters to CI · 6b9c2777
      John Snow authored
      
      Add a Python container that has just enough juice for us to run the
      Python code quality analysis tools. Base this container on Fedora,
      because Fedora has very convenient packaging for testing multiple Python
      versions.
      
      We need python3, pip (for pulling packages), pipenv and virtualenv for
      creating virtual environments, and tox for running tests. make is needed
      for running 'make check-tox' and 'make venv-check' targets. Python3.10
      is needed explicitly because the tox package only pulls in 3.6-3.9, but
      we wish to test the forthcoming release of Python as well to help
      predict any problems. Lastly, we need gcc to compile PyPI packages that
      may not have a binary distribution available.
      
      Add two tests:
      
      check-python-pipenv uses pipenv to test a frozen, very explicit set of
      packages against our minimum supported python version, Python 3.6. This
      test is not allowed to fail. The dependencies this test uses do not
      change unless python/Pipfile.lock is changed.
      
      check-python-tox uses tox to install the latest versions of required
      python dependencies against a wide array of Python versions from 3.6 to
      3.9, even including the yet-to-be-released Python 3.10. This test is
      allowed to fail with a warning.
      
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      Reviewed-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: default avatarCleber Rosa <crosa@redhat.com>
      Message-id: 20210527211715.394144-32-jsnow@redhat.com
      [Fix rebase conflict over .gitlab-ci.yml --js]
      Signed-off-by: default avatarJohn Snow <jsnow@redhat.com>
      6b9c2777
  6. May 27, 2021
  7. May 25, 2021
  8. May 18, 2021
  9. May 14, 2021
  10. May 02, 2021
  11. Mar 24, 2021
  12. Mar 09, 2021
  13. Feb 19, 2021
    • Daniel P. Berrangé's avatar
      gitlab: add fine grained job deps for all build jobs · 764a0747
      Daniel P. Berrangé authored
      
      This allows the build jobs to start running as soon as their respective
      container image is ready, instead of waiting for all container builds
      to finish.
      
      Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Message-Id: <20210216132954.295906-3-berrange@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      764a0747
    • Daniel P. Berrangé's avatar
      gitlab: always build container images · c31fa24e
      Daniel P. Berrangé authored
      
      Currently we attempt to skip building container images if the commits do
      not involve changes to the dockerfiles or gitlab CI definitions.
      
      Conceptually this makes sense, but there is a challenge in the real
      world implementation of this in gitlab.
      
      In the case of a CI pipeline triggered from a merge request, GitLab
      knows the common ancestor of the merge request and the main git repo,
      so it can trivially determine if any of the commits associated with
      the MR change the dockerfiles.
      
      In the case of a CI pipeline triggered from a push to a branch, it is
      much more difficult. There is no concept of a common ancestor in this
      case. Instead GitLab looks at the set of commits in the git push event.
      
      On the surface this may sound reasonable, but it doesn't take into
      account that a push event does not always contain the full set of
      patches from a branch.
      
      For example, consider pushing 5 commits, one of which contains a
      dockerfile change. This will trigger a CI pipeline for the
      containers. Now consider you do some more work on the branch and push 3
      further commits, so you now have a branch of 8 commits. For the second
      push GitLab will only look at the 3 most recent commits, the other 5
      were already present. Thus GitLab will not realize that the branch has
      dockerfile changes that need to trigger the container build.
      
      This can cause real world problems:
      
       - Push 5 commits to branch "foo", including a dockerfile change
      
          => rebuilds the container images with content from "foo"
          => build jobs runs against containers from "foo"
      
       - Refresh your master branch with latest upstream master
      
          => rebuilds the container images with content from "master"
          => build jobs runs against containers from "master"
      
       - Push 3 more commits to branch "foo", with no dockerfile change
      
          => no container rebuild triggers
          => build jobs runs against containers from "master"
      
      The "changes" conditional in gitlab is OK, *provided* your build
      jobs are not relying on any external state from previous builds.
      
      This is NOT the case in QEMU, because we are building container
      images and these are cached. This is a scenario in which the
      "changes" conditional is not usuable.
      
      The only other way to avoid this problem would be to use the git
      branch name as the container image tag, instead of always using
      "latest". The downside of this approach is that the user's gitlab
      registry will grow significantly until it starts to trigger
      GitLab's automatic deletion policy.  Every time the user starts
      a new branch they will have to trigger a rebuild of the container
      images. Given this, we might as well just drop the conditional
      and always build the container images. Most of the time docker
      will be able to use the layer cache to avoid the most expensive
      part of the rebuild process (installing all the RPMs/debs/etc)
      
      Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Message-Id: <20210216132954.295906-2-berrange@redhat.com>
      Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
      c31fa24e
  14. Jan 20, 2021
  15. Jan 11, 2021
  16. Jan 02, 2021
  17. Dec 09, 2020
Loading