Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport loader contexts 3000 #399

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ requests>=1.0.0
singledispatch==3.4.0.3; python_version < '3.4'
# Required by Tornado to handle threads stuff.
futures>=2.0; python_version < '3.0'
contextvars; python_version < '3.7'
45 changes: 40 additions & 5 deletions requirements/static/py3.4/cloud.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,46 @@ azure-storage-common==1.4.0 # via azure-cosmosdb-table, azure-storage-blob, azu
azure-storage-file==1.4.0 # via azure
azure-storage-queue==1.4.0 # via azure
azure==4.0.0
certifi==2019.3.9 # via msrest, requests
cffi==1.12.2 # via azure-datalake-store, cryptography
chardet==3.0.4 # via requests
cryptography==2.6.1 # via adal, azure-cosmosdb-table, azure-keyvault, azure-storage-common, requests-ntlm, smbprotocol
idna==2.8 # via requests
backports.functools-lru-cache==1.5
backports.ssl-match-hostname==3.7.0.1 ; python_version < "3.7"
bcrypt==3.1.6 # via paramiko
boto3==1.13.5
boto==2.49.0
botocore==1.16.26 # via boto3, moto, s3transfer
cachetools==3.1.0 # via google-auth
cassandra-driver==3.23.0
certifi==2020.6.20
certvalidator==0.11.1 # via vcert
cffi==1.14.3
chardet==3.0.4
cheetah3==3.1.0
cheroot==6.5.4
cherrypy==17.3.0
click==7.1.1 # via geomet
contextlib2==0.5.5
contextvars==2.4 ; python_version < "3.7"
croniter==0.3.29
cryptography==3.2
distlib==0.3.0 # via virtualenv
dnspython==1.16.0
docker-pycreds==0.4.0 # via docker
docker==3.7.2
docutils==0.15.2 # via botocore
ecdsa==0.13.3 # via python-jose
filelock==3.0.12 # via virtualenv
future==0.17.1 # via python-jose, textfsm
genshi==0.7.3
geomet==0.1.2 # via cassandra-driver
gitdb2==2.0.5 # via gitpython
gitpython==2.1.11
google-auth==1.6.3 # via kubernetes
hgtools==8.1.1
idna==2.8
immutables==0.14
importlib-metadata==0.23 # via importlib-resources, pluggy, pytest, virtualenv
importlib-resources==1.5.0 # via virtualenv
iniconfig==1.0.1 # via pytest
ipaddress==1.0.22 # via kubernetes
isodate==0.6.0 # via msrest
msrest==0.6.6 # via azure-applicationinsights, azure-eventgrid, azure-keyvault, azure-loganalytics, azure-mgmt-cdn, azure-mgmt-compute, azure-mgmt-containerinstance, azure-mgmt-containerregistry, azure-mgmt-containerservice, azure-mgmt-dns, azure-mgmt-eventhub, azure-mgmt-keyvault, azure-mgmt-media, azure-mgmt-network, azure-mgmt-rdbms, azure-mgmt-resource, azure-mgmt-servicebus, azure-mgmt-servicefabric, azure-mgmt-signalr, azure-servicefabric, msrestazure
msrestazure==0.6.0 # via azure-batch, azure-eventgrid, azure-graphrbac, azure-keyvault, azure-mgmt-advisor, azure-mgmt-applicationinsights, azure-mgmt-authorization, azure-mgmt-batch, azure-mgmt-batchai, azure-mgmt-billing, azure-mgmt-cdn, azure-mgmt-cognitiveservices, azure-mgmt-commerce, azure-mgmt-compute, azure-mgmt-consumption, azure-mgmt-containerinstance, azure-mgmt-containerregistry, azure-mgmt-containerservice, azure-mgmt-cosmosdb, azure-mgmt-datafactory, azure-mgmt-datalake-analytics, azure-mgmt-datalake-store, azure-mgmt-datamigration, azure-mgmt-devspaces, azure-mgmt-devtestlabs, azure-mgmt-dns, azure-mgmt-eventgrid, azure-mgmt-eventhub, azure-mgmt-hanaonazure, azure-mgmt-iotcentral, azure-mgmt-iothub, azure-mgmt-iothubprovisioningservices, azure-mgmt-keyvault, azure-mgmt-loganalytics, azure-mgmt-logic, azure-mgmt-machinelearningcompute, azure-mgmt-managementgroups, azure-mgmt-managementpartner, azure-mgmt-maps, azure-mgmt-marketplaceordering, azure-mgmt-media, azure-mgmt-monitor, azure-mgmt-msi, azure-mgmt-network, azure-mgmt-notificationhubs, azure-mgmt-policyinsights, azure-mgmt-powerbiembedded, azure-mgmt-rdbms, azure-mgmt-recoveryservices, azure-mgmt-recoveryservicesbackup, azure-mgmt-redis, azure-mgmt-relay, azure-mgmt-reservations, azure-mgmt-resource, azure-mgmt-scheduler, azure-mgmt-search, azure-mgmt-servicebus, azure-mgmt-servicefabric, azure-mgmt-signalr, azure-mgmt-sql, azure-mgmt-storage, azure-mgmt-subscription, azure-mgmt-trafficmanager, azure-mgmt-web
Expand Down
11 changes: 8 additions & 3 deletions requirements/static/py3.5/windows.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ cheetah3==3.1.0
cheroot==6.5.5 # via cherrypy
cherrypy==17.4.1
colorama==0.4.1 # via pytest
contextlib2==0.5.5 # via cherrypy
cryptography==2.6.1
contextlib2==0.6.0.post1
contextvars==2.4 ; python_version < "3.7"
cryptography==3.2
distlib==0.3.0 # via virtualenv
dmidecode==0.9.0
dnspython==1.16.0
docker-pycreds==0.4.0 # via docker
Expand All @@ -38,7 +40,10 @@ gitdb==0.6.4
gitpython==2.1.10
google-auth==1.6.3 # via kubernetes
idna==2.8
importlib-metadata==0.23 # via pluggy, pytest
immutables==0.14
importlib-metadata==0.23 # via importlib-resources, pluggy, pytest, virtualenv
importlib-resources==1.5.0 # via virtualenv
iniconfig==1.0.1 # via pytest
ioloop==0.1a0
ipaddress==1.0.22
jaraco.functools==2.0 # via tempora
Expand Down
3 changes: 1 addition & 2 deletions salt/cli/caller.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,7 @@ def call(self):
sys.stderr.write(trace)
sys.exit(salt.defaults.exitcodes.EX_GENERIC)
try:
retcode = sys.modules[
func.__module__].__context__.get('retcode', 0)
retcode = self.minion.executors.pack["__context__"].get("retcode", 0)
except AttributeError:
retcode = salt.defaults.exitcodes.EX_GENERIC

Expand Down
3 changes: 3 additions & 0 deletions salt/client/ssh/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,8 @@ def run_wfunc(self):
opts_pkg['extension_modules'] = self.opts['extension_modules']
opts_pkg['module_dirs'] = self.opts['module_dirs']
opts_pkg['_ssh_version'] = self.opts['_ssh_version']
opts_pkg['thin_dir'] = self.opts['thin_dir']
opts_pkg['master_tops'] = self.opts['master_tops']
opts_pkg['__master_opts__'] = self.context['master_opts']
if 'known_hosts_file' in self.opts:
opts_pkg['known_hosts_file'] = self.opts['known_hosts_file']
Expand Down Expand Up @@ -1138,6 +1140,7 @@ def run_wfunc(self):
fsclient=self.fsclient,
minion_opts=self.minion_opts,
**self.target)
wrapper.fsclient.opts['cachedir'] = opts['cachedir']
self.wfuncs = salt.loader.ssh_wrapper(opts, wrapper, self.context)
wrapper.wfuncs = self.wfuncs

Expand Down
2 changes: 1 addition & 1 deletion salt/client/ssh/wrapper/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def sls(mods, saltenv='base', test=None, exclude=None, **kwargs):
__context__['fileclient'])
st_.push_active()
mods = _parse_mods(mods)
high_data, errors = st_.render_highstate({saltenv: mods})
high_data, errors = st_.render_highstate({saltenv: mods}, context=__context__)
if exclude:
if isinstance(exclude, six.string_types):
exclude = exclude.split(',')
Expand Down
8 changes: 5 additions & 3 deletions salt/cloud/clouds/vmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,12 @@ def get_configured_provider():
'''
Return the first configured instance.
'''
try:
active_provider = __active_provider_name__.value()
except AttributeError:
active_provider = __active_provider_name__
return config.is_provider_configured(
__opts__,
__active_provider_name__ or __virtualname__,
('url', 'user', 'password',)
__opts__, active_provider or __virtualname__, ("url", "user", "password",),
)


Expand Down
Loading