Bash syntax error when attempting to check for database PID
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start with the divio project pull db [STAGE] command path and the database-server wait step that runs the shown docker exec ... psql command. Reproduce the failure using the listed local setup, then confirm that the database export completes without the Bash syntax error.
Written by the indexing model from the issue text.
Description
How to Reproduce
- Go to your project's local directory.
- Do
divio project configureif there's no$PWD/.divio/config.jsonfile. Otherwise, skip. - Ensure you have the
docker-compose.ymlfile. - Run
divio project pull db [STAGE]in a terminal.
Expectation vs. Reality
Reality: Bash syntax error just fired up.
Expectation: Database export ran smoothly.
Dumps
gildedguy@andreijiroh:~/git-projects/ThePinsTeam/wiki.js$ divio project pull db live
/home/gildedguy/.local/lib/python3.8/site-packages/divio_cli/localdev/utils.py:218: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
self.config = yaml.load(check_output(docker_compose("config")))
/home/gildedguy/.local/lib/python3.8/site-packages/divio_cli/localdev/utils.py:218: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
self.config = yaml.load(check_output(docker_compose("config")))
===> Pulling database from repohubdev-wiki live environment
---> Preparing download [6s]
---> Downloading database [4s]
---> Starting local database server
/home/gildedguy/.local/lib/python3.8/site-packages/divio_cli/localdev/utils.py:218: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
self.config = yaml.load(check_output(docker_compose("config")))
Building with native build. Learn about native build in Compose here: https://docs.docker.com/go/compose-native-build/
wikijs_db_1 is up-to-date
[1s]
---> Waiting for local database server [10s]
------------------------------------------------------------------------------------------------------------
There was an error trying to run a command. This is most likely
not an issue with divio-cli, but the called program itself.
Try checking the output of the command above.
The command was:
docker exec 301e553875925ef50334bc5612c794eaebd2b00c8fae02f1e9c5373a998569dc psql -U postgres -c SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE pg_stat_activity.datname = 'db' AND pid <> pg_backend_pid();
- Dominant language
- Python
- Stars
- 23
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from divio/divio-cli
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 50/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 52/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100