Skip to content

Refactor Gateway - #338

Open
scanon wants to merge 90 commits into
masterfrom
refactor_gateway
Open

scanon wants to merge 90 commits into
masterfrom
refactor_gateway

Conversation

@scanon

@scanon scanon commented Jun 6, 2026 •

Copy link
Copy Markdown
Member

This is a massive PR to refactor the image gateway and bring it up to something more modern.

A summary of what has changed.

  • Update to python 3.10
  • Move from Sanic to FastAPI
  • Convert from nose to pytest
  • Convert from dictionaries to objects for many core data types
  • Update the github actions to work with the new code
  • Update to the Dockerfile for the new code
  • Convert to a config object
  • Add types to the majority of the python code

scanon added 30 commits October 19, 2025 10:29
These converts all of the test to use pytest.  It also addresses
some warnings.
Convert from nose to pytest
Convert from SANIC to FastAPI
This does a bit of cleanup and improvemnents
* Added models to api
* Convert to f strings in api.py
* Added custome exception
- Switched to using a config class instead of a dict.  Much
  cleaner but this touched almost every file.
- Lots of flake8 fixes
- Switched a large chunk of old strings to f-strings.
This removes support for remote clusters (e.g. ssh/scp)
Finished remove and converting strings to f-strings
This replaces the dictionary based session
with a class.  It also switches to using
pymunge versus calling out.  Todo is to remove
some of the unneeded code.
This cleans up a lot of dead code or unused features.  It also
replaces some dictionary based arguments with explicity arguments.

- Remove cacert option
- Have DockerV2 class taken specific arguments instead of a dict.
- Refactor auth to use pymunge and remove the Auth class
- Remove call to id -G and use python libraries instead
- Remove munge module
- Remove tarfilemp (no longer used)
- Lots of cleanup in tests
This refactors the worker thread class and image request class.
Now there is one general submit function in the worker thread
class.  The ImageRequest class has been replaced with a set
of AsyncRequests classes for each operation.  This makes
the code a bit cleaner and the inputs for each async tasks
are more clearly defined.
This drops some deprecated functions for code hygiene.
This adds additional tests to api.py and minor changes to api.py
This adds default to config.py for the Platform and Locations
classes.  This makes the documentation  a little better.
This removes old code that allowed the imagemgr to be run as
a command.  This is deprecated.
This does some cleanup to the converter module
and cleans up and adds test for it.
This changes the transfer module to use built-in python
functions instead of ls/cp/etc.  It removes the various
utilities used for those and cleans up the tests.
Adds more test
Removes dead code
This moves all of the fake/mock commands into
a fakebin directory so the test directory
is a little less cluttered.  It also removes
some old mock scripts.
This removes references to remote type since it isn't used
any longer.
Adds pymunge to requirements.txt
Converts string to binary for munge decode
This adds a ttl cache to the lookup call.
This required some changes to the variable structure.
This is mostly flake8 fixes but has a few test fixes as well.
This adds typing to all of the methods in imagemgr.
These converts all of the test to use pytest.  It also addresses
some warnings.
Convert from nose to pytest
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.

1 participant