This repository has been archived by the owner on Jul 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Use semver.VersionInfo type, reorg install action, fix circular dep cases, faster installed db lookups #158
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ie, unless we detect it is a trad role
And warn about it later, but don't stop because of it.
In InstallInfo and RepositorySpec models. * Add convert_string_to_semver util method used by models that need a semver.VersionInfo converter. Return version if already a VersionInfo, else attempt to parse a string and convert it * Support matching for 'no version' as 'any version' so searches for installed repos using underspecified RepositorySpecs (ie, no version info ala 'mazer install alikins.some_repo') can match against installed repos of any version. * Temporarily run str() on semvers when matching against galaxy requests. The logic for matching and preserving versions of the form '1.0.0' or 'v1.0.0' requires version strings for now, since there s no way to have a valid semver like 'v1.0.0'. * Let InstallInfo model be yaml persisted. Sort of... add a method to get a yaml-able dict of it. This fixes errors writing the install_info data to disk (.galaxy_install_info) so that it is persisted corectly. * Some debug logging cleanup
Start of moving from resolving deps for each repository as they are installed one by one to installing a list of things then finding the cumulative requirements and resolving. Cleanups (rm prettyprinter, etc)
When loading requirements.yml as part of loading a Repository, pass the RepositorySpec of the Repository being loaded into requirements.load() so that the Requirements it creates know which repo asked for the require. Update install action to show this info when available. ie: Installing requirement alikins.collection_reqs_2deep_2 (required by alikins.collection_reqs_2deep_1) ansible_galaxy.repository.load() now attempts to load .galaxy_install_info first, then collection_info (galaxy.yml) though that latter isnt really used at the moment.
If passed a full repository_spec, select() will look for that specific entry directly (ie, if the namespace/name path exists) instead of iterate over all/most repos and filtering out non-matches. update irdb.by_requirement() and by_repository_spec() to use the new select(repository_spec=repo_spec) args. Reduce the amount of directies we need to read and the number of repositories we need to load from disk for things like 'is blah installed already?'
Instead of raising exception on the first thing that is already installed up front, just warn about it in install_repositories (but before finding/fetching the repo from remote). install_repositories will just ignore it if is already installed so that: mazer installl ns.something_installed_already ns.new_thing Will warn that 'ns.something_installed_already' is in fact already installed. But also continue and install ns.new_thing.
alikins
changed the title
[WIP] use semver.VersionInfo type, reorg install action, fix circular dep cases, faster installed db lookups
Use semver.VersionInfo type, reorg install action, fix circular dep cases, faster installed db lookups
Nov 5, 2018
Fixes #155 |
42 tasks
Fixes #138 |
This was referenced Nov 6, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
Various fixes to improve how installing collections and roles with dependencies works.
Most of this is related to variations of 'do the right thing when asked to install something that is already installed'. Either directly, or as a requirement.
Repository() objects that need to be loaded from disk.
ISSUE TYPE
MAZER VERSION
ADDITIONAL INFORMATION