-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Remove duplicated Shared
module
#11670
Conversation
08a64e7
to
3224c15
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Files like version docker_compose/ version are not in use then we can remove that file and use docker/version file directly.
@randhircs Actually, we need to keep those files, they're what register the core classes that Dependabot needs to generate updates. |
@robaiken I am good if you feel that just an import of other file is needed to have the file in stead of using the original one but I would prefer to use the original version class in place of docker_composer. |
@randhircs I have removed the files |
Dependabot::Utils.register_version_class("docker_compose", Dependabot::Docker::Version) | ||
Dependabot::UpdateCheckers.register("docker_compose", Dependabot::Docker::UpdateChecker) | ||
Dependabot::Utils.register_requirement_class("docker_compose", Dependabot::Docker::Requirement) | ||
Dependabot::MetadataFinders.register("docker_compose", Dependabot::Docker::MetadataFinder) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a better approach. We just need to ensure that Docker sources are imported when Docker Compose is imported. The package should explicitly require the Docker code.
@@ -23,3 +23,4 @@ USER dependabot | |||
COPY --chown=dependabot:dependabot docker_compose $DEPENDABOT_HOME/docker_compose | |||
COPY --chown=dependabot:dependabot common $DEPENDABOT_HOME/common | |||
COPY --chown=dependabot:dependabot updater $DEPENDABOT_HOME/dependabot-updater | |||
COPY --chown=dependabot:dependabot docker $DEPENDABOT_HOME/docker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's good point since we need docker sources.
Everything looks good to me! Just as I mentioned, you might want to explicitly require require "dependabot/docker" in docker_compose.rb to ensure the dependabot-docker library is properly loaded. |
93aeada
to
05e4d8a
Compare
The files suggested for removal were removed.
* Remove duplicated `Shared` module * use docker classes rather than recreate them * bump typed * remove unneeded registry files * remove duplicated test * removing update checker from reg * use docker updater base image * edger load docker * Add docker as a dep to the docker_compose dep * updating updater lock file * adding docker image details * reverting docker_compose image * removing docker image section
What are you trying to accomplish?
This eliminates technical debt created during the beta release
Anything you want to highlight for special attention from reviewers?
Please review how Docker Compose now imports and extends the original Docker classes instead of using duplicated code.
How will you know you've accomplished your goal?
Checklist