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

zmq: consider loosening version constraints #5311

Closed
oliver-sanders opened this issue Jan 18, 2023 · 1 comment · Fixed by #5307
Closed

zmq: consider loosening version constraints #5311

oliver-sanders opened this issue Jan 18, 2023 · 1 comment · Fixed by #5307

Comments

@oliver-sanders
Copy link
Member

Pyzmq/ZMQ is a dependency of Cylc. Cylc is a distributed system.

We currently pin the version of pyzmq (and consequently ZMQ?) to a major release in order to ensure that all Cylc components in a distributed installation are installed with the same version of ZMQ. We do this because we haven't investigated the compatibility policy for ZMQ so are on the side of caution.

Take a dive into the ZMQ docs to find out what their policy for forward/backward compatibility is to see what would be a sensible version range for Cylc going forward.

See also #5272

Pull requests welcome!

@oliver-sanders
Copy link
Member Author

There's no direct statement saying pyzmq vx will work with vy, here's the chain of statements which leads to the implicit conclusion of interoperability...


Pyzmq supports v4 and later v3 versions of libzmq:

PyZMQ aims to support all stable (≥ 3.2.2, ≥ 4.0.1 ) versions of libzmq

-- pyzmq (retrieved 02-02-2023)

Libzmq implements the ZMTP protocol:

ZeroMQ core engine in C++, implements ZMTP/3.1

libzmq v4.3.4 (retrieved 02-02-2023)

The ZMTP protocol has built-in version detection with defined behaviour:

When we have detected a ZMTP 2.0 peer ... sending our version number... as defined by the ZMTP 2.0 specification.

When we have detected a ZMTP 3.0 peer ... and then continue with the security handshake as normal.

-- 23/ZMTP (retrieved 02-02-2023)

The ZMTP protocol at V3 leaves room for forward compatibility:

A peer MUST accept higher protocol versions as valid. That is, a ZMTP peer MUST accept protocol versions greater or equal to 3.1. This allows future implementations to safely interoperate with current implementations.

A peer SHALL always use its own protocol (including framing) when talking to an equal or higher protocol peer.

A peer MAY downgrade its protocol to talk to a lower protocol peer.

If a peer cannot downgrade its protocol to match its peer, it MUST close the connection.

-- http://zmtp.org/page:read-the-docs (retrieved 02-02-2023)

There was historically a period where this was not true:

Ah, the pain, the pain. I’m not speaking of the time at age eight when I stepped on a plank with a 4-inch nail protruding from it. That was relatively OK. I’m speaking of 2010-2011 when we had multiple parallel releases of ZeroMQ, each with different incompatible APIs or wire protocols. It was an exercise in bad rules, pointlessly enforced, that still hurts us today. The rule was, “If you change the API or protocol, you SHALL create a new major version”. Give me the nail through the foot; that hurt less.

-- zmq-guide (retrieved 02-02-2023)

0MQ/3.2.2 stable and later releases are compatible with 2.2 and 2.1. All other 3.x versions up to 3.2.1 are only compatible with themselves, which is unfortunate but caused by releases 3.0 and 3.1 which broke the protocol without adding any version information. One of the symptoms of using these incompatible releases (3.0.x, 3.1.x, 3.2.0, 3.2.1) with stable releases is that request-reply will work in one direction only.

-- zeromq (retrieved 02-02-2023)

However, that isn't relevant because:

PyZMQ aims to support all stable (≥ 3.2.2, ≥ 4.0.1 ) versions of libzmq

-- pyzmq (retrieved 02-02-2023)


Wow, that was a long chain.

So all this is a long-winded way of saying, yes, we should be good to loosen our version coupling.

oliver-sanders added a commit to oliver-sanders/cylc-flow that referenced this issue Feb 2, 2023
* The ZMTP protocol provides robust forward & backward compatibility
  from libzmq version 3.2.2 onwards.
* Since this is the minimum version compatible with pyzmq, we can
  safely loosen this version coupling.
* For more information see the rationale in
  cylc#5311 (comment)

* Closes cylc#5272
* Closes cylc#5311
* Unblocks cylc/cylc-uiserver#411
oliver-sanders added a commit to oliver-sanders/cylc-flow that referenced this issue Feb 2, 2023
* The ZMTP protocol provides robust forward & backward compatibility
  from libzmq version 3.2.2 onwards.
* Since this is the minimum version compatible with pyzmq, we can
  safely loosen this version coupling.
* For more information see the rationale in
  cylc#5311 (comment)

* Closes cylc#5272
* Closes cylc#5311
* Unblocks cylc/cylc-uiserver#411
hjoliver pushed a commit to hjoliver/cylc-flow that referenced this issue Mar 13, 2023
* The ZMTP protocol provides robust forward & backward compatibility
  from libzmq version 3.2.2 onwards.
* Since this is the minimum version compatible with pyzmq, we can
  safely loosen this version coupling.
* For more information see the rationale in
  cylc#5311 (comment)

* Closes cylc#5272
* Closes cylc#5311
* Unblocks cylc/cylc-uiserver#411
wxtim added a commit to wxtim/cylc that referenced this issue Apr 14, 2023
* Convert old clock triggers to wall_clock xtriggers.

* Fix test.

* Update change log.

* tests/f: fix job-submission/03

* bump version

* deps: remove aiofiles

* Aiofiles is a simple wrapper for a thread pool executor.
  We don't need a 3rd party library to do this for us.
* Closes cylc#5306

* Update cylc/flow/__init__.py

* Revert "Update cylc/flow/__init__.py"

This reverts commit d40bdc1.

* fix to make setup.cfg work with setuptools v67.0.0

* Use different version strings for isodatatime for python 3.7

* Update setup.cfg

Co-authored-by: Ronnie Dutta <[email protected]>

* id: pass tokens objects between interfaces

* Change `TaskProxy.tokens` to hold the absolute ID rather than the
  relative ID to make the object useful in more situations.
* Refactor the data_store_mgr interfaces to accept `Tokens` instances
  rather than raw inputs (e.g. cycle_point, task_name, etc).
* This avoids doing `Tokens(str(tokens))` when passing context into the
  data store interfaces.

* deps: loosen pyzmq dependency

* The ZMTP protocol provides robust forward & backward compatibility
  from libzmq version 3.2.2 onwards.
* Since this is the minimum version compatible with pyzmq, we can
  safely loosen this version coupling.
* For more information see the rationale in
  cylc#5311 (comment)

* Closes cylc#5272
* Closes cylc#5311
* Unblocks cylc/cylc-uiserver#411

* Update README.md

* Quick fix for mypy

* remove issue templates

* Defaults can now be centrally configured in
  https://github.com/cylc/.github

* workflow_files: move clean functionality into its own module

* `cylc clean` has outgrown the workflow_files module somewhat.

* workflow_files: move install functionality into its own module

* remove pull request template

* update CONTRIBUTING

* add missing import

* Bump pypa/gh-action-pypi-publish from 1.6.4 to 1.7.1

Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.6.4 to 1.7.1.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](pypa/gh-action-pypi-publish@v1.6.4...v1.7.1)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump pypa/gh-action-pypi-publish from 1.7.1 to 1.8.1 (cylc#5413)

Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.7.1 to 1.8.1.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](pypa/gh-action-pypi-publish@v1.7.1...v1.8.1)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* remote: add note about sys.exit behaviour (cylc#5393)

* Bump pypa/gh-action-pypi-publish from 1.8.1 to 1.8.3

Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.8.1 to 1.8.3.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](pypa/gh-action-pypi-publish@v1.8.1...v1.8.3)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* vr: add --yes option

* tui: add vr command

* add instruction to report critical traceback

* CLI: short option changes

* Rename `-n` for `--no-detach` to `-N`. This removes the conflict with
  `--workflow-name` allowing the option to be used in `cylc vip`.
* Add `-r` as a short option for `--run-name`.

* efficiency: pass tokens instances to get_broadcast

* This saves some unnecessary tokenise/detokenise operations

* Update cylc/flow/scheduler.py

* Update cylc/flow/tui/data.py

* Update cylc/flow/broadcast_mgr.py

Co-authored-by: Tim Pillinger <[email protected]>

* Apply suggestions from code review [skip ci]

Co-authored-by: Oliver Sanders <[email protected]>

* Bump pypa/gh-action-pypi-publish from 1.8.3 to 1.8.4 (cylc#5446)

Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.8.3 to 1.8.4.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](pypa/gh-action-pypi-publish@v1.8.3...v1.8.4)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump pypa/gh-action-pypi-publish from 1.8.4 to 1.8.5

Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.8.4 to 1.8.5.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](pypa/gh-action-pypi-publish@v1.8.4...v1.8.5)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Improve documentation for retrieve job logs command

* Update cylc/flow/cfgspec/globalcfg.py

* fix a typo in document

* actions: add build test

* Stop Cylc Reinstall modifying global variables
This caused the same variable to be added multiple times causing
errors from clashing options.

* validate-reinstall: don't print reload message

* The reload message is not applicable when using `cylc vr` because it
  does it for you.
* Closes cylc#5344

* play: preserve colour formatting when detaching

* Closes cylc#5159

* Upload coverage to Codecov in separate job (cylc#5459)

GH Actions: upload coverage to Codecov in separate job

- Reduces how hard we hit Codecov API
- Allows easy re-attempt to upload
- remove unnecessary step on MacOS

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Hilary Oliver <[email protected]>
Co-authored-by: Oliver Sanders <[email protected]>
Co-authored-by: Melanie Hall <[email protected]>
Co-authored-by: Ronnie Dutta <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dpmatthews <[email protected]>
Co-authored-by: Cheng Da <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant