-
Notifications
You must be signed in to change notification settings - Fork 163
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
API review of Steeltoe.Configuration #1008
Conversation
/azp run Steeltoe.All |
Azure Pipelines successfully started running 1 pipeline(s). |
/cc @ccheetham |
…ationNameInContext
…eam, and dispose the allocated stream
Scoped to Steeltoe.Configuration.* projects and tests
Given other use cases, should this feature be detached from the command line and/or move into Placeholder (since the purpose seems to align as another config transform)? |
Thanks for the clarification. I was mislead by the type name, thinking it would read command-line values. But what it actually does is rename already-loaded keys, regardless of where they came from. I understand this is a useful feature to keep. While it has functional parity with Placeholder, this implementation is a lot simpler, so I'd prefer to keep them separate. I'm trying to come up with a better name that reflects what it does, but can't think of any. The current name indicates its purpose, which is handling Spring Boot command-line key syntax conversion. We could clarify the documentation a bit, though:
and:
|
I don't think that's fair. Aside from a few small things (such as making test classes sealed, intentionally in a separate commit so it can be glanced over quickly), nearly all changes stem from the guidance here. The subset of sonar rules turned on in this PR exclusively concerns public API surface. This is unrelated to Resharper/StyleCop or code quality, it is about the exposed signatures. And where they changed, I've updated unit tests accordingly. I'm aware that this PR is large, but I've tried very hard to produce commits that target a single purpose, to make code review as easy as possible.
I disagree, there are still quite some open questions we haven't explored, discussed and decided on. The most important one being: What should be public and what should not be? Based on the outcome, I expect more changes regarding optional parameters and overloads. Merging now would not fulfill the purpose of this PR, which is to rationalize the public API surface and confirm this is what we want to expose. Reviewing which types should be public may not be as hard as it seems, assuming a basic understanding of the interaction between types. We have 7 projects, each containing 10-15 files on average. We no longer have multiple types per .cs file, so going over the files per project should be doable. Another approach is to look at the PublicAPI.Unshipped.txt files. At a high level: everything in Kubernetes is internal, except for extension methods. In the other projects, nearly everything is public. I'd like to propose to make everything internal everywhere, except for extension methods. From there, we can decide which changes need to be reverted because we intend to expose those types. Would that work? |
Azure Pipelines successfully started running 1 pipeline(s). |
We've discussed the open questions in our team meeting and agreed to the following:
|
Azure Pipelines successfully started running 1 pipeline(s). |
SonarCloud Quality Gate failed. |
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.
LGTM
Description
This PR is the result of me reviewing the public API surface of the Steeltoe.Configuration namespace, based on this guidance. Notable changes:
To facilitate the process, I've made several changes that are scoped to the Steeltoe.Configuration projects:
PublicAPI.Unshipped.txt
between the first and latest commit.Open questions:
AbstractOptions
andAbstractServiceOptions
accordingly?Fixes #899.
Quality checklist
If your change affects other repositories, such as Documentation, Samples and/or MainSite, add linked PRs here.