Skip to content

Commit

Permalink
Merge freeze into master (#62438)
Browse files Browse the repository at this point in the history
* fixes #62372 unable to use random shuffle and sample functions as Jinja filters

* move random_shuffle and random_sample logic to utils

* static seed in tests seems to have shifted

* static seed in tests require hash module

* Change Tiamat to onedir in release notes

* Reinstate known issues

* Update release notes with onedir package support policy

* need to check the version of Netmiko python library and then import the exceptions from different locations depending on the result.

* Adding changelog.

* swap out if...else for double try...except.

* Remove extra fix we don't need anymore

* [Docs] include onedir system python note

* Update all platforms to use pycparser 2.21 or greater for Py 3.9 or higher, fixes fips fault with openssl v3.x

* Remove the PyObjC dependency

Signed-off-by: Pedro Algarvio <[email protected]>

* Add "<tiamat> python" subcommand to allow execution or arbitrary scripts via bundled Python runtime

* Document usage of bundled Python runtime for Client API

* Use explicit locals for custom script execution, handle exception in similar fashion as Python

* Remove old __file__ replacement

* Apply suggestions from code review

Co-authored-by: Pedro Algarvio <[email protected]>

Co-authored-by: nicholasmhughes <[email protected]>
Co-authored-by: Alyssa Rock <[email protected]>
Co-authored-by: Gareth J. Greenaway <[email protected]>
Co-authored-by: Twangboy <[email protected]>
Co-authored-by: David Murphy < [email protected]>
Co-authored-by: Pedro Algarvio <[email protected]>
Co-authored-by: Lukas Raska <[email protected]>
Co-authored-by: Pedro Algarvio <[email protected]>
  • Loading branch information
9 people authored Aug 8, 2022
1 parent d6307c2 commit fc7d0a9
Show file tree
Hide file tree
Showing 42 changed files with 271 additions and 780 deletions.
16 changes: 4 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,29 +142,25 @@ repos:
- id: pip-tools-compile
alias: compile-pkg-darwin-3.9-zmq-requirements
name: Darwin Packaging Py3.9 ZeroMQ Requirements
files: ^(requirements/((base|zeromq|crypto|darwin|pyobjc)\.txt|static/pkg/(darwin\.in|py3\.9/darwin\.txt)))$
files: ^(requirements/((base|zeromq|crypto|darwin)\.txt|static/pkg/(darwin\.in|py3\.9/darwin\.txt)))$
pass_filenames: false
args:
- -v
- --py-version=3.9
- --platform=darwin
- --include=requirements/darwin.txt
- --include=requirements/pyobjc.txt
- --passthrough-line-from-input=^pyobjc(.*)$
- requirements/static/pkg/darwin.in

- id: pip-tools-compile
alias: compile-pkg-darwin-3.10-zmq-requirements
name: Darwin Packaging Py3.10 ZeroMQ Requirements
files: ^(requirements/((base|zeromq|crypto|darwin|pyobjc)\.txt|static/pkg/(darwin\.in|py3\.10/darwin\.txt)))$
files: ^(requirements/((base|zeromq|crypto|darwin)\.txt|static/pkg/(darwin\.in|py3\.10/darwin\.txt)))$
pass_filenames: false
args:
- -v
- --py-version=3.10
- --platform=darwin
- --include=requirements/darwin.txt
- --include=requirements/pyobjc.txt
- --passthrough-line-from-input=^pyobjc(.*)$
- requirements/static/pkg/darwin.in

- id: pip-tools-compile
Expand Down Expand Up @@ -525,36 +521,32 @@ repos:
- id: pip-tools-compile
alias: compile-ci-darwin-py3.9-zmq-requirements
name: Darwin CI Py3.9 ZeroMQ Requirements
files: ^(pkg/osx/(req|req_pyobjc)\.txt|requirements/((base|zeromq|pytest)\.txt|static/((ci|pkg)/(darwin|common)\.in|pkg/py3\.9/darwin\.txt)))$
files: ^(requirements/((base|zeromq|pytest)\.txt|static/((ci|pkg)/(darwin|common)\.in|pkg/py3\.9/darwin\.txt)))$
pass_filenames: false
args:
- -v
- --py-version=3.9
- --platform=darwin
- --include=requirements/darwin.txt
- --include=requirements/pyobjc.txt
- --include=requirements/pytest.txt
- --include=requirements/static/pkg/darwin.in
- --include=requirements/static/ci/common.in
- --passthrough-line-from-input=^pyobjc(.*)$
- --pip-args=--constraint=requirements/static/pkg/py{py_version}/darwin.txt
- requirements/static/ci/darwin.in

- id: pip-tools-compile
alias: compile-ci-darwin-py3.10-zmq-requirements
name: Darwin CI Py3.10 ZeroMQ Requirements
files: ^(pkg/osx/(req|req_pyobjc)\.txt|requirements/((base|zeromq|pytest)\.txt|static/((ci|pkg)/(darwin|common)\.in|pkg/py3\.10/darwin\.txt)))$
files: ^(requirements/((base|zeromq|pytest)\.txt|static/((ci|pkg)/(darwin|common)\.in|pkg/py3\.10/darwin\.txt)))$
pass_filenames: false
args:
- -v
- --py-version=3.10
- --platform=darwin
- --include=requirements/darwin.txt
- --include=requirements/pyobjc.txt
- --include=requirements/pytest.txt
- --include=requirements/static/pkg/darwin.in
- --include=requirements/static/ci/common.in
- --passthrough-line-from-input=^pyobjc(.*)$
- --pip-args=--constraint=requirements/static/pkg/py{py_version}/darwin.txt
- requirements/static/ci/darwin.in

Expand Down
1 change: 1 addition & 0 deletions changelog/62372.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix use of random shuffle and sample functions as Jinja filters
1 change: 1 addition & 0 deletions changelog/62381.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add "<tiamat> python" subcommand to allow execution or arbitrary scripts via bundled Python runtime
1 change: 1 addition & 0 deletions changelog/62400.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update all platforms to use pycparser 2.21 or greater for Py 3.9 or higher, fixes fips fault with openssl v3.x
5 changes: 5 additions & 0 deletions changelog/62432.removed
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Removed the PyObjC dependency.

This addresses problems with building a one dir build for macOS.
It became problematic because depending on the macOS version, it pulls different dependencies, and we would either have to build a macos onedir for each macOS supported release, or ship a crippled onedir(because it would be tied to the macOS version where the onedir was built).
Since it's currently not being used, it's removed.
8 changes: 8 additions & 0 deletions doc/ref/clients/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ These entry points are often referred to as ``*Client()`` APIs. Each client
accesses different parts of Salt, either from the master or from a minion. Each
client is detailed below.

.. note::
For Tiamat-bundled Salt distribution, you need to use the bundled Python runtime
as the system Python won't be able to access Salt internals.

To execute scripts via bundled Python runtime, either run the script with
``/path/to/salt python script.py`` or use ``#!/path/to/salt python`` `shebang <https://en.wikipedia.org/wiki/Shebang_(Unix)>`_


.. seealso:: There are many ways to access Salt programmatically.

Salt can be used from CLI scripts as well as via a REST interface.
Expand Down
3 changes: 1 addition & 2 deletions requirements/darwin.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Darwin source distribution requirements

-r zeromq.txt
-r pyobjc.txt

apache-libcloud>=2.4.0
backports.ssl_match_hostname>=3.7.0.1; python_version < '3.7'
Expand All @@ -12,7 +11,7 @@ idna>=2.8
linode-python>=1.1.1
mako>=1.0.7
pyasn1>=0.4.8
pycparser>=2.19
pycparser>=2.21
pyopenssl>=19.0.0
python-dateutil>=2.8.0
python-gnupg>=0.4.4
Expand Down
Loading

0 comments on commit fc7d0a9

Please sign in to comment.