saltstack / saltstack/salt

django_orm pillar provider using outdated django.db.models.loading

Open
#53,956 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Confirmed severity-low
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

The django_orm pillar provider makes reference to django.db.models.loading.
This doesn't exist in newer versions of Django.

It was deprecated in 1.7 here: https://docs.djangoproject.com/en/2.2/releases/1.7/#app-loading-refactor.

When dealing with newer Django applications, the salt master will return the following error:

2019-07-22 18:03:22,181 [salt.loaded.int.pillar.django_orm:238 ][ERROR   ][32493] Failed to import library: No module named 'django.db.models.loading'

Master still appears to be affected, but I am running 2019.2.0.

root@salt:~ # salt --versions-report
Salt Version:
           Salt: 2019.2.0
 
Dependency Versions:
           cffi: 1.12.3
       cherrypy: Not Installed
       dateutil: Not Installed
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.10.1
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.6.1
   mysql-python: Not Installed
      pycparser: 2.19
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 3.6.9 (default, Jul 11 2019, 01:10:39)
   python-gnupg: Not Installed
         PyYAML: 5.1
          PyZMQ: 18.0.2
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.3.1
 
System Versions:
           dist:   
         locale: UTF-8
        machine: amd64
        release: 12.0-RELEASE-p3
         system: FreeBSD
        version: Not Installed
 
root@salt:~ # 

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the django_orm pillar provider and inspect its reference to django.db.models.loading, using the linked Django app-loading refactor as context. Verify the provider against newer Django applications and confirm that the reported import error no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
backend, databases
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.