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
feat: Refactor IImage
properties to align with DSL
#962
base: develop
Are you sure you want to change the base?
feat: Refactor IImage
properties to align with DSL
#962
Conversation
Add `IImage.Registry`; Remove `IImage.Name`
✅ Deploy Preview for testcontainers-dotnet ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Thanks for the PR once again 😃. I have not had a chance to thoroughly review it yet, but I would like to give some quick feedback on something I noticed.
I believe we should try to introduce as few breaking changes as possible to ensure a smooth transition. For the replaced members, I suggest using the obsolete flag (although I do not think a lot of developers are using them). Also, I want to mention that I forgot to include the GetHostname()
in the issue, but have updated it.
- Does this new support for registries make the
hubImageNamePrefix
parameter obsolete?
No, it does not. Developers have the option to configure it using the custom configurations to replace the default registry (host) from which they want to pull the images.
In this case, should the How do you want to handle the // current constructor
[Obsolete]
public DockerImage(string repository, string name, string tag, string hubImageNamePrefix = null)
: this(hubImageNamePrefix, $"{repository}/{name}", tag) { } // <-- forward to new constructor
// new constructor
public DockerImage(string registry, string repository, string tag) { } |
Sorry for the late response, I was not able to reply earlier.
Yes, I think that make sense. Do you think we can remove the registry in case the
I have thought about that too. I do not think we can avoid a "breaking change", but I think the impact is very small.
|
What does this PR do?
IImage
properties to align with DSLstring Registry
string Name
DockerImage
constructor to align with new propertiesMatchImage.Match(string)
method to appropriately extract new propertiesWhy is it important?
Aligns terminology used with that of the general Docker/container DSL.
Related issues
IImage
properties (align with DSL) #740Follow-ups
hubImageNamePrefix
parameter obsolete?