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

VX-72 VX-73 VX-74 Add pod get function & regex name check & api docs #84

Merged
merged 2 commits into from
Jul 11, 2018

Conversation

chenyunchen
Copy link
Contributor

No description provided.

@codecov-io
Copy link

codecov-io commented Jul 11, 2018

Codecov Report

Merging #84 into develop will increase coverage by 0.4%.
The diff coverage is 93.1%.

Impacted file tree graph

@@            Coverage Diff             @@
##           develop      #84     +/-   ##
==========================================
+ Coverage    68.86%   69.27%   +0.4%     
==========================================
  Files           32       32             
  Lines         1243     1266     +23     
==========================================
+ Hits           856      877     +21     
- Misses         330      331      +1     
- Partials        57       58      +1
Impacted Files Coverage Δ
src/pod/pod.go 95.38% <100%> (+0.64%) ⬆️
src/server/route.go 49.18% <100%> (+0.84%) ⬆️
src/server/handler_pod.go 76.76% <88.23%> (+1.47%) ⬆️

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 d252352...8d36b66. Read the comment docs.

@chenyunchen chenyunchen force-pushed the alex/fixPodGenerate branch from 5c964e9 to 4ee5ab0 Compare July 11, 2018 07:16
@chenyunchen chenyunchen changed the title Add pod get function & regex name check & api docs VX-72 VX-73 VX-74 Add pod get function & regex name check & api docs Jul 11, 2018
@hwchiu hwchiu requested a review from John-Lin July 11, 2018 07:21
src/pod/pod.go Outdated
@@ -72,13 +78,20 @@ func CreatePod(sp *serviceprovider.Container, pod *entity.Pod) error {

var containers []corev1.Container
for _, container := range pod.Containers {
if !checkName(container.Name) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can check the name in the CheckPodParameter function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

update

@@ -41,7 +41,7 @@ func createPod(ctx *web.Context) {
}

if err := pod.CreatePod(sp, &p); err != nil {
response.InternalServerError(req.Request, resp.ResponseWriter, err)
response.BadRequest(req.Request, resp.ResponseWriter, err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Keep the InternalServerError, we will check the parameter in the above function pod.CheckPodParameter

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fix

@chenyunchen chenyunchen force-pushed the alex/fixPodGenerate branch from 1499f15 to 8d36b66 Compare July 11, 2018 07:48
Copy link
Contributor

@hwchiu hwchiu left a comment

Choose a reason for hiding this comment

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

LGTM

@hwchiu hwchiu merged commit 88f7285 into develop Jul 11, 2018
@hwchiu hwchiu deleted the alex/fixPodGenerate branch July 11, 2018 09:17
John-Lin pushed a commit that referenced this pull request Jul 25, 2018
VX-72 VX-73 VX-74 Add pod get function & regex name check & api docs

Former-commit-id: 3fd24e7f162769ee586c1fe5c6bea656567c797a [formerly 88f7285]
Former-commit-id: 840cc65e463b19bde9fc1472ce9914b97bea1a9d
John-Lin pushed a commit that referenced this pull request Jul 25, 2018
VX-72 VX-73 VX-74 Add pod get function & regex name check & api docs

Former-commit-id: 3fd24e7f162769ee586c1fe5c6bea656567c797a [formerly 3fd24e7f162769ee586c1fe5c6bea656567c797a [formerly 88f7285]]
Former-commit-id: 840cc65e463b19bde9fc1472ce9914b97bea1a9d
Former-commit-id: f1d97d4
John-Lin pushed a commit that referenced this pull request Jul 25, 2018
VX-72 VX-73 VX-74 Add pod get function & regex name check & api docs
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