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

Install oc without external action #402

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mgoerens
Copy link
Contributor

The redhat-actions/openshift-tools-installer is experiencing slowness when installing oc. This steps can take up to 3 minutes. More info: redhat-actions/openshift-tools-installer#105

Using a custom script reduces the installation of oc to less than 10s.

The redhat-actions/openshift-tools-installer is experiencing slowness
when installing oc. This steps can take up to 3 minutes. More info:
redhat-actions/openshift-tools-installer#105

Using a custom script reduces the installation of oc to less than 10s.

Signed-off-by: Matthias Goerens <[email protected]>
This was referenced Nov 19, 2024
Copy link
Contributor

@komish komish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1). Remove progress bar flags

2). Should we consider making this a reusable action? I know we also pull oc down in chart-verifier's CI. https://github.com/redhat-certification/chart-verifier/blob/main/.github/workflows/build.yaml#L83-L91

3). Does adding this to $GITHUB_PATH add it to the end or the beginning of the resolution? Just want to make sure we won't get an oc that comes up sooner in the path than what we're installing.

with:
oc: latest
run: |
wget --progress=dot:mega https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/openshift-client-linux.tar.gz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably don't need --progress in CI.

run: |
wget --progress=dot:mega https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/openshift-client-linux.tar.gz
tar -zxvf openshift-client-linux.tar.gz oc -C .
echo "$PWD/oc" >> $GITHUB_PATH
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You prefer this to symlinking to /usr/local/bin/?

tar -zxvf openshift-client-linux.tar.gz oc -C .
echo "$PWD/oc" >> $GITHUB_PATH
rm -f openshift-client-linux.tar.gz
oc version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pass the --client flag here. We don't care about server details here.

@mgoerens
Copy link
Contributor Author

@komish First off, I want to briefly address the pertinence of this PR. Do we want to (a) implement this workaround, or (b) investigate the upstream action ?

In favor of (a):

  • it's relatively simple to do (in fact this is as good as done, even though your other comments are valid)
  • the upstream issue is not trivial, also the upstream action is not actively maintained so we would are almost on our own.
  • (previously this issue that this is solving was critic as we had very frequent CI timeouts) -> less relevant today.

In favor of (b):

  • fixing it upstream means fixing it for everybody
  • @komish has some experience with the issue and with the upstream repo as he already fixed a similar issue.

I will answer your other comments at a later time

@komish
Copy link
Contributor

komish commented Jan 31, 2025

I'd love to use the tools installer, but it's mostly in a maintenance mode. Debugging the last arbitrary 3m wait was non-trivial for me, as I'm not overly engaged in the TypeScript ecosystem. I'm open to taking our own path for installing this client in our CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants