Skip to content

[BUG] openshift-tools-installer action takes too long when used through Github Enterprise #62

Open
@urswiss

Description

@urswiss

Version

v1

Describe the bug

Since #58 was fixed we face the issue that the openshift-tools-installer runs around 3 minutes (compared to around 16 seconds before).

Steps to reproduce, workflow links, screenshots

On a Github Enterprise instance, create and run the below action:

name: Master Workflow

env:
  REPOSITORY_NAME: ${{ github.event.repository.name }}

on:
  push:
    branches:
      - 'master'

jobs:
  build-release:
    name: 'Build new release'
    runs-on: [ self-hosted, linux, x64 ]
    steps:
      - name: 'Setup OpenShift Tools'
        uses: redhat-actions/openshift-tools-installer@v1
        with:
          oc: 4

Output

Running this action results into the below output.

Setup Job (2s)

Current runner version: '2.284.0'
Runner name: 'github-actions-runner-basic-3-4r7q5'
Runner group name: 'Default'
Machine name: 'github-actions-runner-basic-3-4r7q5'
GITHUB_TOKEN Permissions
Actions: write
Checks: write
Contents: write
Deployments: write
Issues: write
Metadata: read
OrganizationPackages: write
Packages: write
PullRequests: write
RepositoryProjects: write
SecurityEvents: write
Statuses: write
Runner is running behind proxy server 'http://egress-http-proxy-external:8080' for all HTTP requests.
Runner is running behind proxy server 'http://egress-http-proxy-external:8080' for all HTTPS requests.
Prepare workflow directory
Prepare all required actions
Getting action download info
Download action repository 'redhat-actions/openshift-tools-installer@v1' (SHA:99744decfe48e62f0304d622c34bce5f1d045858)

Setup Openshift Tools (3m 2s)

Run redhat-actions/openshift-tools-installer@v1
with:
oc: 4
github_pat: ***
source: mirror
skip_cache: false
env:
REPOSITORY_NAME: test-openshift-tools-installer
Installing oc matching version "4"
ℹ️ Tools will be installed from "mirror".

🔎 Searching for a version of oc satisfying the range ">=4.0.0 <5.0.0-0" that was input as "4"
Download directory for oc is https://mirror.openshift.com/pub/openshift-v4/clients/ocp/
Max oc version satisfying >=4.0.0 <5.0.0-0 is 4.9.15
Current operating system is linux
Selecting openshift-client-linux-4.9.15.tar.gz
⏩ GitHub enterprise detected; skipping cache. For more information, see actions/cache#505
⬇️ Downloading 47.12MB https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.9.15/openshift-client-linux-4.9.15.tar.gz ...
Downloaded openshift-client-linux-4.9.15.tar.gz in 1.8s
⬇️ Downloading hash file https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.9.15/sha256sum.txt
sha256 verification of openshift-client-linux-4.9.15.tar.gz succeeded.
/usr/bin/tar xz --warning=no-unknown-keyword -C /home/runner/_work/_temp/730744aa-ac4a-47d3-99d5-ab1953101224 -f /home/runner/_work/_temp/ef57516c22ae02527befdc776956cc11-openshift-client-linux-4.9.15.tar.gz
Removed /home/runner/_work/_temp/ef57516c22ae02527befdc776956cc11-openshift-client-linux-4.9.15.tar.gz
Current architecture is amd64
Using temporary directory for storage
📁 CLIs will be downloaded to /home/runner/_work/_temp/openshift-bin
Added /home/runner/_work/_temp/openshift-bin to PATH
oc installed into /home/runner/_work/_temp/openshift-bin/oc
/home/runner/_work/_temp/openshift-bin/oc version --client
Client Version: 4.9.15
⏩ GitHub enterprise detected; skipping cache. For more information, see actions/cache#505
✅ Successfully installed oc 4.9.15.

✅ Successfully installed 1/1 client:

  • oc 4.9.15

Wrote out installed versions to /home/runner/_work/_temp/openshift-bin/openshift-clients-installed.json

Complete Job

Cleaning up orphan processes

Summary

As you can see the download itself is quite fast (1.8s) but a lot of time (around 3 minutes) is lost somewhere after. The statement Wrote out installed versions to /home/runner/_work/_temp/openshift-bin/openshift-clients-installed.json is actually appearing in less than a second, but afterwards the action is stuck for 3 minutes.
As mentioned, the action was running in less than 20 seconds on December 15th still, so I suspect the slow-down has something to do with the fix for #58 or the underlying problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions