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

Do not iterate through transient plugin dependencies if a newer dependency version is explicitly defined in the plugin list #102

Merged
merged 11 commits into from
Jun 16, 2020

Conversation

oleg-nenashev
Copy link
Member

@oleg-nenashev oleg-nenashev commented Jun 8, 2020

Currently the tool checks for older transient dependency versions even if a newer one is explicitly defined in a plugin source. Fixes #101

icon-shim:2.0.3
yet-another-docker-plugin:0.2.0

Leads to....

icon-shim has no dependencies

yet-another-docker-plugin depends on: 
icon-shim 1.0.5
cloud-stats 0.23
credentials 2.1.3
docker-commons 1.3.1
durable-task 1.3
ssh-slaves 1.22

icon-shim depends on: 
uithemes 1.0

Fixes #101

@oleg-nenashev oleg-nenashev added the bug Something isn't working label Jun 8, 2020
@oleg-nenashev oleg-nenashev changed the title Ensure that Plugin Installation Manager does not iterate through versions if a newer version is explicitly defined in the plugin list Ensure that Plugin Installation Manager does not iterate through plugin dependencies if a newer dependency version is explicitly defined in the plugin list Jun 8, 2020
@oleg-nenashev oleg-nenashev changed the title Ensure that Plugin Installation Manager does not iterate through plugin dependencies if a newer dependency version is explicitly defined in the plugin list Do not iterate through transient plugin dependencies if a newer dependency version is explicitly defined in the plugin list Jun 8, 2020
@@ -0,0 +1,60 @@
ace-editor:1.1
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused at the moment

@oleg-nenashev
Copy link
Member Author

It will take a while to finish my patch. I will cut the release from the master branch for now

…there is a higher-version dependency resolved
@oleg-nenashev oleg-nenashev marked this pull request as ready for review June 8, 2020 21:40
@oleg-nenashev oleg-nenashev requested a review from a team June 8, 2020 21:40
@oleg-nenashev
Copy link
Member Author

I applied a partial fix which kinda works for dependencies explicitly declared in plugins.txt or plugin.yml . It will still be an issue for dependency conflicts in the dependency tree

@@ -721,74 +721,6 @@ public void downloadPluginsUnsuccessfulTest() throws IOException {
pluginManagerSpy.downloadPlugins(plugins);
}

@Test
public void findPluginsAndDependenciesTest() throws IOException {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to the integration test which does not use Mocking

@oleg-nenashev oleg-nenashev requested a review from timja June 16, 2020 12:28
} else {
String message = String.format("Plugin %s:%s depends on %s:%s, but there is an older version defined on the top level - %s:%s",
plugin.getName(), plugin.getVersion(), p.getName(), p.getVersion(), pinnedPlugin.getName(), pinnedPlugin.getVersion());
// TODO(oleg_nenashev): Should be an error by default, but it is not how the tests are written now
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO there should be an error by default, but it is not how the tests are written now

Skipping it for now, original test from @stopalopa will fail

@oleg-nenashev oleg-nenashev merged commit b6b504e into master Jun 16, 2020
@oleg-nenashev oleg-nenashev deleted the issue-101 branch June 16, 2020 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working squash-merge-me
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Updates check fails due to the missing uithemes plugin
2 participants