Skip to content

daemon: Improve NetworkingConfig & EndpointSettings validation#46183

Merged
thaJeztah merged 9 commits intomoby:masterfrom
akerouanton:validate-NetworkingConfig
Sep 18, 2023
Merged

daemon: Improve NetworkingConfig & EndpointSettings validation#46183
thaJeztah merged 9 commits intomoby:masterfrom
akerouanton:validate-NetworkingConfig

Conversation

@akerouanton
Copy link
Copy Markdown
Member

@akerouanton akerouanton commented Aug 10, 2023

Depends on:

- What I did

So far, only a subset of NetworkingConfig was validated when calling ContainerCreate. Other parameters would be validated when the container was started. And the same goes for EndpointSettings on NetworkConnect.

Also, the validation code was early exiting as soon as it caught an error. It now tries to validate as much as it can, and returns all the errors.

- How to verify it

Testing with the CLI won't work because it has its own client-side layer of validation (although incomplete). Some Go code has to be written to test all validation cases.

- Description for the changelog

  • NetworkConnect and ContainerCreate have improved data validation, and now return all validation errors at once.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/daemon Core Engine area/ux impact/api kind/enhancement Enhancements are not bugs or new features but can improve usability or performance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1.10-rc1 docker run should not create container if network options are invalid

2 participants