-
Notifications
You must be signed in to change notification settings - Fork 950
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
feature: upgrade go-swagger to 0.17.1 #2350
feature: upgrade go-swagger to 0.17.1 #2350
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2350 +/- ##
==========================================
- Coverage 68.15% 66.95% -1.21%
==========================================
Files 265 265
Lines 18211 18211
==========================================
- Hits 12412 12193 -219
- Misses 4370 4628 +258
+ Partials 1429 1390 -39
|
- name: "body" | ||
in: "body" | ||
schema: | ||
$ref: "#/definitions/CheckpointCreateOptions" |
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.
Could you do this kind of change in another pull request? Since then swagger.yml refactoring has nothing to do with the swagger upgrade. WDYT? @zhuangqh
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.
Could you do this kind of change in another pull request? Since then swagger.yml refactoring has nothing to do with the swagger upgrade. WDYT? @zhuangqh
Actually, this part of code is wrong, which failed to pass the stricter validation. Futhermore, it makes this PR fail to pass the CI. So this part of change should be included in this PR although it looks confused...
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.
Roger that.
@@ -939,19 +929,20 @@ paths: | |||
$ref: "#/responses/404ErrorResponse" | |||
tags: ["Container"] | |||
|
|||
/containers/{id}/checkpoints/{id}: | |||
/containers/{id}/checkpoints/{checkpointId}: |
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.
error: duplicated parameter id
9eb5153
to
b631268
Compare
CpuRealtimeRuntime, CpusetCpus, CpusetMems, DeviceCgroupRules, KernelMemory, MemoryReservation, | ||
MemorySwap, MemorySwappiness, NanoCpus, OomKillDisable, PidsLimit, CpuCount, CpuPercent, | ||
IOMaximumIOps, IOMaximumBandwidth, IntelRdtL3Cbm, ScheLatSwitch, MemoryWmarkRatio, MemoryExtra, | ||
MemoryForceEmptyCtl] |
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.
These fields should be included in encoded json string. However, they are not required. x-omitempty
extension provide the ability to solve this situation.
@@ -12,7 +12,7 @@ readonly cmd="nsenter" | |||
nsenter::check_version() { | |||
local has_installed version | |||
|
|||
has_installed="$(command -v nsenter1 || echo false)" | |||
has_installed="$(command -v nsenter || echo false)" |
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.
minor CI bug
@@ -125,7 +125,7 @@ func (suite *PouchRunMemorySuite) TestRunWithMemoryswappiness(c *check.C) { | |||
"--memory-swappiness", "-1", | |||
"--name", cname, busyboxImage, "top") | |||
DelContainerForceMultyTime(c, cname) | |||
res.Assert(c, icmd.Success) | |||
c.Assert(res.ExitCode, check.Equals, 1) |
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.
This command would be fail because validation really works.
It is so good to see we have make swagger play more important role. I will make this move on as soon as possible. |
I am afraid that you still need to update
Here we need to update the swagger version to 0.17.1 as well. @zhuangqh |
LGTM |
b631268
to
a55bbd5
Compare
correct several test case Signed-off-by: zhuangqh <zhuangqhc@gmail.com>
a55bbd5
to
9fdc4e4
Compare
has updated @allencloud |
Ⅰ. Describe what this PR did
upgrade go-swagger to 0.17.1
brief changelog of go-swagger 0.17.1
Ⅱ. Does this pull request fix one issue?
ready to fix all of the issue which were in relation to api parameters validation.
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
Ⅳ. Describe how to verify it
It is compatible with current code but enable to validate types.
Ⅴ. Special notes for reviews