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

feat: Improve version constraining #165

Merged
merged 21 commits into from
Jun 10, 2022

Conversation

in03
Copy link
Owner

@in03 in03 commented Jun 10, 2022

This implements a new version-constraint system independent of actual application versioning. This side-steps the need for complicated logic to support local git builds, direct URL git builds and PyPi release builds. It also means we can support compatibility between those multiple builds' versioning systems if the codebase is exactly the same.

Changes

  • Uses a GitHub action 'random-pet' to create a unique codename
  • Yet another topic branch plagued by an upstream .gitignore deletion (fixed) :rolleyes:

Further considerations:

This repo, 'python-petname' might be a better option for generating names. It has a longer word list, including adverbs and adjectives; handles alliteration automatically and allows for a custom word-chain length. It doesn't exist as a GitHub action though and uses an Apache license. Might be an opportunity for inspiration.

It would be good to give the whole repo a license check actually! MIT is quite permissive and might not be accommodating some used libraries.

We also need to test PyPi release support. When does Poetry build and upload to PyPi? We need to build releases and upload AFTER the VC key action. Maybe we can use an additional GitHub action to build releases for us.

Addresses discussion in #151
pre-commit.ci autofix

in03 and others added 21 commits June 7, 2022 15:55
Using 'version-constraint key' instead of 'queue-id' to be more descriptive.
Celery terminology is already opaque to end users, i.e. 'routing-key'
vs 'queue'. Queue is both a noun and a verb, and refers to both Celery's
queue name that receives queued tasks as well as the act of queuing them.
File was being written with "" as key, since variable reference was wrong.
- moved hefty imports to CLI sub-commands for faster loading time and
quicker UI responsiveness

- queuer checks other workers compatibility against its own
`version_constraint_key` file

TODO:

- get worker queue name from `version_constraint_key` file, otherwise
all locally workers will still be using git-sha mechanism, including self.

- implement `--hide_banner` option globally with Typer

- implement `RPROX_HIDE_BANNER` environment variable

- further test version collision probability
Still in a bit of a weird place with terminology here. We have `queue`, `version constraint key` and `routing key`. The choice to refer to the name of the queue as `version constraint key` better reflects application usage and user expectations. "Queue" on its own is both a noun and a verb and we already use the term to describe a module and the process of "queuing" proxies. Some additional terminology changes in code may be necessary at a later date.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants