Git Product home page Git Product logo

Comments (2)

justfortherec avatar justfortherec commented on May 27, 2024

The problem seems caused by stale version information of the gitlab-runner debian packages.

The repository caches seem not to be updated. When listing all available versions for the package, I only see the old versions:

$ sudo apt list -a gitlab-runner
Listing... Done
gitlab-runner/bionic,now 12.10.1 amd64 [installed]
gitlab-runner/bionic 12.10.0 amd64
gitlab-runner/bionic 12.9.0 amd64
# ... older versions omitted for brevity

After manually updating the caches on the affected machine, the latest version is available:

$ sudo apt update
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:3 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:4 https://packages.gitlab.com/runner/gitlab-runner/ubuntu bionic InRelease [23.4 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1,023 kB]
# ... other packages omitted for brevity
Get:21 https://packages.gitlab.com/runner/gitlab-runner/ubuntu bionic/main amd64 Packages [10.3 kB]
Fetched 5,185 kB in 3s (1,682 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
74 packages can be upgraded. Run 'apt list --upgradable' to see them.
$ sudo apt list -a gitlab-runner
Listing... Done
gitlab-runner/bionic 13.2.1 amd64 [upgradable from: 12.10.1]
gitlab-runner/bionic 13.2.0 amd64
gitlab-runner/bionic 13.1.1 amd64
gitlab-runner/bionic 13.1.0 amd64
gitlab-runner/bionic 13.0.1 amd64
gitlab-runner/bionic 13.0.0 amd64
gitlab-runner/bionic 12.10.3 amd64
gitlab-runner/bionic 12.10.2 amd64
gitlab-runner/bionic,now 12.10.1 amd64 [installed,upgradable to: 13.2.1]
gitlab-runner/bionic 12.10.0 amd64
gitlab-runner/bionic 12.9.1 amd64
gitlab-runner/bionic 12.9.0 amd64
# ... older versions omitted for brevity

After this manual step, the latest version of gitlab-runner is correctly installed.

This issue could be resolved by adding update_cache to the task installing the package in tasks/install-debian.yml (I don't know if there are any undesired side-effects though):

 - name: (Debian) Install GitLab Runner
   apt:
     name: "{{ gitlab_runner_package }}"
     state: "{{ gitlab_runner_package_state }}"
+    update_cache: yes
   become: true
   environment:
     GITLAB_RUNNER_DISABLE_SKEL: "true"
   when: ansible_distribution_version == "10"
 
 - name: (Debian) Install GitLab Runner
   apt:
     name: "{{ gitlab_runner_package }}"
     state: "{{ gitlab_runner_package_state }}"
+    update_cache: yes
   become: true
   when: ansible_distribution_version != "10"

from ansible-gitlab-runner.

riemers avatar riemers commented on May 27, 2024

There is a PR that does just that, but i think this should not be in this package. If every package maintainer adds a "update cache" then you could end up with updating the cache multiple times which would make it not efficient. Could add a note to the readme that we assume cache is updated?

from ansible-gitlab-runner.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.