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

mongosh, installed by default in ubuntu-20.04, is absent in ubuntu-22.04 #6626

Closed
2 of 11 tasks
tquid opened this issue Nov 23, 2022 · 6 comments
Closed
2 of 11 tasks
Assignees
Labels
bug report investigate Collect additional information, like space on disk, other tool incompatibilities etc. OS: Ubuntu

Comments

@tquid
Copy link

tquid commented Nov 23, 2022

Description

We use mongosh to do various database operations in our CI workflows. It is installed in ubuntu-20.04, but migrating to 22.04 has broken those workflows. It's possible to install it, of course, but this was an unpleasant surprise and may be for others as well.

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 18.04
  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 10.15
  • macOS 11
  • macOS 12
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

Image: ubuntu-22.04
Version: 20221027.1
Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20221027.1/images/linux/Ubuntu2204-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F2022[10](https://github.com/CircusHR/meetatcircus-web/actions/runs/3528293497/jobs/5930603615#step:1:11)27.1

(Sorry, it's a private repo.)

Is it regression?

ubuntu-20.04

Expected behavior

Run steps incorporating mongosh execute the command without extra setup.

Actual behavior

Run steps fail with "command not found" or similar language

Repro steps

Steps to reproduce:

  1. Using ubuntu-22.04 or ubuntu-latest as the runner, run mongosh as a run step in any workflow.
  2. There should be an error to the effect of "command not found"
@chuma9615
Copy link

chuma9615 commented Nov 23, 2022

Same issue here, I figured out that Ubuntu removed mongo from their default installed database packages on Ubuntu 22.04. This resulted in the Github Action runner image ubuntu-22.04 not having mongo. I guess that from now on we need to install it on every action run.

@tquid
Copy link
Author

tquid commented Nov 23, 2022

Same issue here, I figured out that Ubuntu removed mongo from their default installed database packages on Ubuntu 22.04. This resulted in the Github Action runner image ubuntu-22.04 not having mongo. I guess that from now on we need to install it on every action run.

Ah, that's a bummer, I guess we just need to add an install step, then.

@igorboskovic3
Copy link
Contributor

Hi @chuma9615 we will take look.

@igorboskovic3 igorboskovic3 added OS: Ubuntu investigate Collect additional information, like space on disk, other tool incompatibilities etc. and removed needs triage labels Nov 24, 2022
@igorboskovic3 igorboskovic3 self-assigned this Nov 24, 2022
@igorboskovic3
Copy link
Contributor

We can install only official releases and you can see here that their team have no ETA for Ubuntu 22.04.

@tquid
Copy link
Author

tquid commented Nov 25, 2022

Fair enough. Just for future searchers, though, here is a step that does the trick for me:

      - name: 🍃 Install mongosh
        run: |
          sudo apt-get update
          sudo apt-get install -y wget gnupg
          wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add -
          echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
          sudo apt-get update
          sudo apt-get install -y mongodb-mongosh

@superfaz
Copy link

superfaz commented May 9, 2024

Sharing my solution to avoid the installation, you can use a docker service:

    runs-on: ubuntu-latest
    services:
      mongo:
        image: mongo
        ports:
          - 27017:27017
        env:
          MONGO_INITDB_ROOT_USERNAME: xxx
          MONGO_INITDB_ROOT_PASSWORD: xxx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report investigate Collect additional information, like space on disk, other tool incompatibilities etc. OS: Ubuntu
Projects
None yet
Development

No branches or pull requests

4 participants