Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • cubicweb cubicweb
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 181
    • Issues 181
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 21
    • Merge requests 21
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • cubicwebcubicweb
  • cubicwebcubicweb
  • Issues
  • #296
Closed
Open
Issue created Apr 14, 2021 by Arthur Lutz@arthurOwner

db-create --automatic prompting when a different schema/namespace is specified

When using CW_DB_NAMESPACE: published we get :

# -c echo "checking postgresql database $CW_DB_NAME if it doesn't exist, create it with db-create"; [ "$(PGPASSWORD=$CW_DB_PASSWORD psql -h $CW_DB_HOST -p $CW_DB_PORT -d template1 -tAc "SELECT 1 FROM pg_database WHERE datname='$CW_DB_NAME'")" = '1' ] || cubicweb-ctl db-create $(CW_INSTANCE) -a echo "done"

Traceback (most recent call last):
File "/usr/bin/cubicweb-ctl", line 11, in <module>
load_entry_point('cubicweb==3.28.3', 'console_scripts', 'cubicweb-ctl')()
File "/usr/lib/python3/dist-packages/cubicweb/cwctl.py", line 830, in run
CWCTL.run(args)
File "/usr/lib/python3/dist-packages/logilab/common/clcommands.py", line 149, in run
sys.exit(command.main_run(args, rcfile))
File "/usr/lib/python3/dist-packages/logilab/common/clcommands.py", line 290, in main_run
self.run(args)
File "/usr/lib/python3/dist-packages/cubicweb/server/serverctl.py", line 393, in run
% (namespace, dbname)):
File "/usr/lib/python3/dist-packages/logilab/common/shellutils.py", line 411, in confirm
answer = self.ask(question, ("y", "n"), default)
File "/usr/lib/python3/dist-packages/logilab/common/shellutils.py", line 389, in ask
answer = self._input(prompt).strip().lower()
EOFError: EOF when reading a line
Create schema published in database service-map ? [Y/n]: done

The convoluted shell program at the start (you've guessed it's in kubernetes) will probably be simplified once #202 (closed) is used (3.30 I guess).

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking