Uploaded image for project: 'Project Quay'
  1. Project Quay
  2. PROJQUAY-9511

Container creating a lot of deprecation and syntax warnings on startup

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • quay-v3.15.0
    • quay
    • False
    • Hide

      None

      Show
      None
    • False

      Messages such as:

      Running init script '/quay-registry/conf/init/certs_install.sh'
      /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
      /bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
      Running init script '/quay-registry/conf/init/client_certs.sh'
      /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
      Running init script '/quay-registry/conf/init/copy_config_files.sh'
      /bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
      Running init script '/quay-registry/conf/init/d_validate_config_bundle.sh'
      /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
      ...
      Running init script '/quay-registry/conf/init/nginx_conf_create.sh'
      /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
      Running init script '/quay-registry/conf/init/runmigration.sh'
      /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
      /app/lib/python3.12/site-packages/peewee.py:2784: SyntaxWarning: invalid escape sequence '\w'
        clean_field_names = re.sub('[^\w]+', '', '_'.join(accum))
      /app/lib/python3.12/site-packages/peewee.py:5763: SyntaxWarning: invalid escape sequence '\w'
        return re.sub('[^\w]+', '_', self.name)
      /app/lib/python3.12/site-packages/playhouse/sqlite_ext.py:451: SyntaxWarning: invalid escape sequence '\s'
        _quote_re = re.compile('(?:[^\s"]|"(?:\\.|[^"])*")+')
      /app/lib/python3.12/site-packages/peewee.py:2784: SyntaxWarning: invalid escape sequence '\w'
        clean_field_names = re.sub('[^\w]+', '', '_'.join(accum))
      /app/lib/python3.12/site-packages/peewee.py:5763: SyntaxWarning: invalid escape sequence '\w'
        return re.sub('[^\w]+', '_', self.name)
      /app/lib/python3.12/site-packages/playhouse/sqlite_ext.py:451: SyntaxWarning: invalid escape sequence '\s'
        _quote_re = re.compile('(?:[^\s"]|"(?:\\.|[^"])*")+')
      Running init script '/quay-registry/conf/init/supervisord_conf_create.sh'
      /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
      Running init script '/quay-registry/conf/init/zz_boot.sh'
      /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
      /app/lib/python3.12/site-packages/peewee.py:2784: SyntaxWarning: invalid escape sequence '\w'
        clean_field_names = re.sub('[^\w]+', '', '_'.join(accum))
      /app/lib/python3.12/site-packages/peewee.py:5763: SyntaxWarning: invalid escape sequence '\w'
        return re.sub('[^\w]+', '_', self.name)
      /app/lib/python3.12/site-packages/playhouse/sqlite_ext.py:451: SyntaxWarning: invalid escape sequence '\s'
        _quote_re = re.compile('(?:[^\s"]|"(?:\\.|[^"])*")+')
      /quay-registry/boot.py:76: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
        expiration = datetime.utcnow() + timedelta(minutes=minutes_until_expiration)
      

      are printed during container startup causing needless chatter in the log files. The locale related ones are nonsensical, since locale seems to be properly set inside the container:

      # podman exec -it quay env | grep -i utf
      PYTHONIOENCODING=UTF-8
      LC_ALL=en_US.UTF-8
      LANG=en_US.UTF-8
      

      However:

      # podman exec -it quay /bin/bash
      bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
      bash-4.4$
      

      We don't set locale anywhere in those scripts so it does appear that some kind of config is missing (maybe locale package?).

              Unassigned Unassigned
              rhn-support-ibazulic Ivan Bazulic
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: