Skip to content

Clean up relay credentials generation#1289

Merged
chadwhitacre merged 1 commit into
masterfrom
cwlw/fix-relay-credentials-bug
Feb 3, 2022
Merged

Clean up relay credentials generation#1289
chadwhitacre merged 1 commit into
masterfrom
cwlw/fix-relay-credentials-bug

Conversation

@chadwhitacre
Copy link
Copy Markdown
Member

This is a follow-up to #1273, and it should get CI back on track on master.

@chadwhitacre chadwhitacre requested review from BYK and aminvakil February 2, 2022 16:52
# 2. We need to use -T to avoid additional garbage output cluttering
# credentials.json under Docker Compose 1.x and 2.2.3+.

creds="$dcr --no-deps -T relay credentials"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@aminvakil It looks like there is no --no-tty option in Docker Compose 1, only in 2. That could explain why merging #1251 caused CI to start failing.

$ docker-compose run -T --no-deps relay credentials show      
Creating sentry-self-hosted_relay_run ... done
Credentials:
  relay id: ed128877-ceb6-47e0-8a4e-e3df4bed162f
  public key: EyGAkE-3wBlBQuSbKJLsXdhQWEMsaZIDSnOCvnVE5zo
$
$
$ docker-compose run --no-tty --no-deps relay credentials show
Run a one-off command on a service.

For example:

    $ docker-compose run web python manage.py shell

By default, linked services will be started, unless they are already
running. If you do not want to start linked services, use
`docker-compose run --no-deps SERVICE COMMAND [ARGS...]`.

Usage:
    run [options] [-v VOLUME...] [-p PORT...] [-e KEY=VAL...] [-l KEY=VALUE...] [--]
        SERVICE [COMMAND] [ARGS...]

Options:
    -d, --detach          Detached mode: Run container in the background, print
                          new container name.
    --name NAME           Assign a name to the container
    --entrypoint CMD      Override the entrypoint of the image.
    -e KEY=VAL            Set an environment variable (can be used multiple times)
    -l, --label KEY=VAL   Add or override a label (can be used multiple times)
    -u, --user=""         Run as specified username or uid
    --no-deps             Don't start linked services.
    --rm                  Remove container after run. Ignored in detached mode.
    -p, --publish=[]      Publish a container's port(s) to the host
    --service-ports       Run command with the service's ports enabled and mapped
                          to the host.
    --use-aliases         Use the service's network aliases in the network(s) the
                          container connects to.
    -v, --volume=[]       Bind mount a volume (default [])
    -T                    Disable pseudo-tty allocation. By default `docker-compose run`
                          allocates a TTY.
    -w, --workdir=""      Working directory inside the container
$
$
$ docker-compose --version
docker-compose version 1.29.2, build 5becea4c
$

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Bah ... but in that case why was CI green on #1251? 🤔

@chadwhitacre
Copy link
Copy Markdown
Member Author

Hrm, red CI ... 🧐

@chadwhitacre chadwhitacre force-pushed the cwlw/fix-relay-credentials-bug branch from 0fcefa7 to b90fff2 Compare February 3, 2022 20:52
@chadwhitacre
Copy link
Copy Markdown
Member Author

I reticketed the CI flakiness as #1293. Rebased here and aiming to merge ...

@chadwhitacre chadwhitacre merged commit f1fa49d into master Feb 3, 2022
@chadwhitacre chadwhitacre deleted the cwlw/fix-relay-credentials-bug branch February 3, 2022 22:39
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants