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

Move service/parserprovider package to config/configmapprovider #4206

Merged
merged 1 commit into from
Oct 29, 2021

Conversation

mx-psi
Copy link
Member

@mx-psi mx-psi commented Oct 18, 2021

Description:

Second part of #4178.

Link to tracking Issue: Updates #4177

@codecov
Copy link

codecov bot commented Oct 18, 2021

Codecov Report

Merging #4206 (5671d5b) into main (2981b3c) will not change coverage.
The diff coverage is 50.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4206   +/-   ##
=======================================
  Coverage   87.29%   87.29%           
=======================================
  Files         176      176           
  Lines       10622    10622           
=======================================
  Hits         9273     9273           
  Misses       1108     1108           
  Partials      241      241           
Impacted Files Coverage Δ
config/configmapprovider/default.go 100.00% <ø> (ø)
config/configmapprovider/expand.go 76.00% <ø> (ø)
config/configmapprovider/file.go 100.00% <ø> (ø)
config/configmapprovider/inmemory.go 70.00% <ø> (ø)
config/configmapprovider/merge.go 84.21% <ø> (ø)
config/configmapprovider/properties.go 89.65% <ø> (ø)
config/configmapprovider/simple.go 100.00% <ø> (ø)
service/command.go 0.00% <0.00%> (ø)
config/configtest/configtest.go 96.66% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2981b3c...5671d5b. Read the comment docs.

@mx-psi mx-psi force-pushed the mx-psi/move-parserprovider branch from d97752b to 139209c Compare October 19, 2021 16:52
@mx-psi mx-psi marked this pull request as ready for review October 19, 2021 16:53
@mx-psi mx-psi requested review from a team and dmitryax October 19, 2021 16:53
Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

Based on what I'm reading in #4178 i would have expected the contents of parserprovider to end up in config along with the config.MapProvider, it's possible I'm missing context though.

Please resolve the conflict

@mx-psi
Copy link
Member Author

mx-psi commented Oct 20, 2021

Based on what I’m reading in #4178 i would have expected the contents of parserprovider to end up in config along with the config.MapProvider, it’s possible I’m missing context though.

I was moving them to mapprovider based on #4178 (comment). Happy to move them to config though

@codeboten
Copy link
Contributor

I was moving them to mapprovider based on #4178 (comment). Happy to move them to config though

Ah I see, thanks for clarifying. Personally I would expect the functions to initialize the map provider to live in the same place as the interface, but I don't feel strongly about this. @bogdandrutu @tigrannajaryan any thoughts?

@bogdandrutu
Copy link
Member

Maybe a different package but under "config/configmapprovider"?

@mx-psi
Copy link
Member Author

mx-psi commented Oct 21, 2021

@codeboten how does Bogdan's proposal sound to you?

@codeboten
Copy link
Contributor

@codeboten how does Bogdan's proposal sound to you?

config/mapprovider works for me, no need to repeat the config in the package name.

@mx-psi mx-psi force-pushed the mx-psi/move-parserprovider branch from 9f46352 to 4144c88 Compare October 22, 2021 08:46
@mx-psi mx-psi requested a review from codeboten October 22, 2021 08:46
@mx-psi mx-psi changed the title Move parserprovider package to mapprovider Move service/parserprovider package to config/mapprovider Oct 22, 2021
@mx-psi mx-psi force-pushed the mx-psi/move-parserprovider branch from 4144c88 to e5129ad Compare October 22, 2021 08:52
@bogdandrutu
Copy link
Member

@codeboten I think we need to repeat config because right now users will use this as "mapprovider.File" with the repeat the use will be "configmapprovider.File" I think the second is better and clear what map provides.

@mx-psi
Copy link
Member Author

mx-psi commented Oct 27, 2021

After thinking a bit more about this I agree with Bogdan here, but want to hear your thoughts before changing this again @codeboten

@codeboten
Copy link
Contributor

After thinking a bit more about this I agree with Bogdan here, but want to hear your thoughts before changing this again @codeboten

@bogdandrutu's proposal works for me.

@mx-psi mx-psi changed the title Move service/parserprovider package to config/mapprovider Move service/parserprovider package to config/configmapprovider Oct 28, 2021
@mx-psi
Copy link
Member Author

mx-psi commented Oct 28, 2021

@bogdandrutu @codeboten PTAL

@bogdandrutu
Copy link
Member

bogdandrutu commented Oct 28, 2021

Needs a rebase. Last question: if we go with this package, should the provider interface be in the same place then? Can be done after in a separate PR.

@mx-psi mx-psi force-pushed the mx-psi/move-parserprovider branch from 3f8ead0 to 5671d5b Compare October 29, 2021 14:39
@mx-psi
Copy link
Member Author

mx-psi commented Oct 29, 2021

Rebased.

If we go with this package, should the provider interface be in the same place then?

I hate to not have thought about this before doing #4178 but yes, I think it should live in the same place, both for consistency with other packages (e.g. configunmarshaler) and to reduce the chance of uncomfortable dependency cycles. I can do a follow up PR for this.

@mx-psi
Copy link
Member Author

mx-psi commented Nov 2, 2021

See #4337 for the interface move

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.

3 participants