I don't know why this is suddenly happening, and it is only happening in my freshly cloned mondo-ingest repositories that I am using to run builds, but when I run an sh run.sh make command, I'm getting an error.
The error
docker: invalid reference format.
joeflack4@MacBook-Pro ontology % sh run.sh make build-mondo-ingest
Running obolibrary/odkfull:dev with '-Xmx20G' as options for ROBOT and other Java-based pipeline steps.
docker: invalid reference format.
See 'docker run --help'.
Additional information
Details
This is not happening in my local development environment. It's only happening for recently cloned repositories that I'm using to try and run builds. I've been doing this clone / run build thing regularly, including yesterday and several other times this week, and this is the first time this has happened. Even more strangely, this is not just happening in the freshly cloned repo I created today, but also happening in a repo that I used to run a build just the other day.
The error is happening as a result of this command:
```sh
docker run $ODK_DOCKER_OPTIONS $BIND_OPTIONS -w $WORK_DIR \
-e ROBOT_JAVA_ARGS="$ODK_JAVA_OPTS" -e JAVA_OPTS="$ODK_JAVA_OPTS" -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock -e ODK_USER_ID=$ODK_USER_ID -e ODK_GROUP_ID=$ODK_GROUP_ID -e ODK_DEBUG=$ODK_DEBUG \
--rm -ti obolibrary/$ODK_IMAGE:$ODK_TAG $TIMECMD "$@"
```
I tried to use `printf` to see what this was evaluating to:
```sh
printf "docker run $ODK_DOCKER_OPTIONS $BIND_OPTIONS -w $WORK_DIR -e ROBOT_JAVA_ARGS="$ODK_JAVA_OPTS" -e JAVA_OPTS="$ODK_JAVA_OPTS" -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock -e ODK_USER_ID=$ODK_USER_ID -e ODK_GROUP_ID=$ODK_GROUP_ID -e ODK_DEBUG=$ODK_DEBUG --rm -ti obolibrary/$ODK_IMAGE:$ODK_TAG make"
```
Resulted printout, development environment:
```sh
docker run -v /Users/joeflack4/projects/mondo-ingest
/src/ontology/../../:/work -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -w /work/src/ontology -e ROBOT_JAVA_ARGS=-Xmx20G -e JAVA_OPTS=-Xmx20G -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock -e ODK_USER_ID=502 -e ODK_GROUP_ID=20 -e ODK_DEBUG=yes --rm -ti obolibrary/odkfull:dev make
```
Resulted printout, fresh clone:
```sh
docker run -v /Users/joeflack4/Desktop/mondo builds/mondo-ingest-build-ordo-subset2
/src/ontology/../../:/work -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -w /work/src/ontology -e /ssh-auth.sock:/run/host-services/ssh-auth.sock -w /work/src/ontology -e ROBOT_JAVA_ARGS=-Xmx20G -e JAVA_OPTS=-Xmx20G -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock -e ODK_USER_ID=502 -e ODK_GROUP_ID=20 -e ODK_DEBUG=yes --rm -ti obolibrary/odkfull:dev make
```
Observed things likely to be causing error:
_These things are appearing in the command printed out by the fresh clone only._
- `-w /work/src/ontology` appears a second time
- There is an additional `-e` with a `/ssh-auth.sock:/run/host-services/ssh-auth.sock` coming after it. Strangely, this is a halfway chopped off, part of another named parameter which appears in both printouts: `-v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock`
## Things I tried
- Using another terminal
- Trying the same command on another clone (tried 3 separate clones)
- Trying another command (e.g. `help`)
- Checked to see if this was a manifestation of the `CRLF` vs `LF` issue
- Restarting my computer
## Temporary workarounds
For now, I'm running builds from my development environment using `-B`.
Solution
Aha! It's a classic bug involving spaces in the path. Observe:
Path which has includes a dir mondo builds/, error:
joeflack4@MacBook-Pro ontology % pwd
/Users/joeflack4/Desktop/mondo builds/mondo-ingest-build-ordo-subset/src/ontology
oeflack4@MacBook-Pro ontology % sh run.sh make build-mondo-ingest
Running obolibrary/odkfull:dev with '-Xmx20G' as options for ROBOT and other Java-based pipeline steps.
docker: invalid reference format.
See 'docker run --help'.
Changes dir name to mondo-builds/, success!:
joeflack4@MacBook-Pro ontology % pwd
/Users/joeflack4/Desktop/mondo-builds/mondo-ingest-build-ordo-subset/src/ontology
joeflack4@MacBook-Pro ontology % sh run.sh make build-mondo-ingest
Running obolibrary/odkfull:dev with '-Xmx20G' as options for ROBOT and other Java-based pipeline steps.
mondo-ingest.Makefile:65: warning: overriding recipe for target 'components/omim.owl'
Overview
I don't know why this is suddenly happening, and it is only happening in my freshly cloned
mondo-ingest
repositories that I am using to run builds, but when I run ansh run.sh make
command, I'm getting an error.The error
docker: invalid reference format.
Additional information
Details
This is not happening in my local development environment. It's only happening for recently cloned repositories that I'm using to try and run builds. I've been doing this clone / run build thing regularly, including yesterday and several other times this week, and this is the first time this has happened. Even more strangely, this is not just happening in the freshly cloned repo I created today, but also happening in a repo that I used to run a build just the other day. The error is happening as a result of this command: ```sh docker run $ODK_DOCKER_OPTIONS $BIND_OPTIONS -w $WORK_DIR \ -e ROBOT_JAVA_ARGS="$ODK_JAVA_OPTS" -e JAVA_OPTS="$ODK_JAVA_OPTS" -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock -e ODK_USER_ID=$ODK_USER_ID -e ODK_GROUP_ID=$ODK_GROUP_ID -e ODK_DEBUG=$ODK_DEBUG \ --rm -ti obolibrary/$ODK_IMAGE:$ODK_TAG $TIMECMD "$@" ``` I tried to use `printf` to see what this was evaluating to: ```sh printf "docker run $ODK_DOCKER_OPTIONS $BIND_OPTIONS -w $WORK_DIR -e ROBOT_JAVA_ARGS="$ODK_JAVA_OPTS" -e JAVA_OPTS="$ODK_JAVA_OPTS" -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock -e ODK_USER_ID=$ODK_USER_ID -e ODK_GROUP_ID=$ODK_GROUP_ID -e ODK_DEBUG=$ODK_DEBUG --rm -ti obolibrary/$ODK_IMAGE:$ODK_TAG make" ``` Resulted printout, development environment: ```sh docker run -v /Users/joeflack4/projects/mondo-ingest /src/ontology/../../:/work -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -w /work/src/ontology -e ROBOT_JAVA_ARGS=-Xmx20G -e JAVA_OPTS=-Xmx20G -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock -e ODK_USER_ID=502 -e ODK_GROUP_ID=20 -e ODK_DEBUG=yes --rm -ti obolibrary/odkfull:dev make ``` Resulted printout, fresh clone: ```sh docker run -v /Users/joeflack4/Desktop/mondo builds/mondo-ingest-build-ordo-subset2 /src/ontology/../../:/work -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock -w /work/src/ontology -e /ssh-auth.sock:/run/host-services/ssh-auth.sock -w /work/src/ontology -e ROBOT_JAVA_ARGS=-Xmx20G -e JAVA_OPTS=-Xmx20G -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock -e ODK_USER_ID=502 -e ODK_GROUP_ID=20 -e ODK_DEBUG=yes --rm -ti obolibrary/odkfull:dev make ``` Observed things likely to be causing error: _These things are appearing in the command printed out by the fresh clone only._ - `-w /work/src/ontology` appears a second time - There is an additional `-e` with a `/ssh-auth.sock:/run/host-services/ssh-auth.sock` coming after it. Strangely, this is a halfway chopped off, part of another named parameter which appears in both printouts: `-v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock` ## Things I tried - Using another terminal - Trying the same command on another clone (tried 3 separate clones) - Trying another command (e.g. `help`) - Checked to see if this was a manifestation of the `CRLF` vs `LF` issue - Restarting my computer ## Temporary workarounds For now, I'm running builds from my development environment using `-B`.
Solution
Aha! It's a classic bug involving spaces in the path. Observe:
Path which has includes a dir
mondo builds/
, error:Changes dir name to
mondo-builds/
, success!:I'll make an issue for this in ODK