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

Sandbox old api #120

Merged
merged 5 commits into from
Dec 3, 2018
Merged

Sandbox old api #120

merged 5 commits into from
Dec 3, 2018

Conversation

gfr10598
Copy link
Contributor

@gfr10598 gfr10598 commented Nov 30, 2018

This fixes the encoded date, broken in the last merge to master.
It seems to have a large impact on throughput, so we should try to understand that ASAP, but also should try to get the breakage fixed as soon as we understand.


This change is Reviewable

@coveralls
Copy link

coveralls commented Nov 30, 2018

Coverage Status

Coverage increased (+0.02%) to 44.762% when pulling ec9a006 on sandbox-old-api into f507dee on master.

Copy link
Contributor

@yachang yachang left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 LGTMs obtained


annotator-ss.yaml, line 4 at r2 (raw file):

env: flex
service: annotatorss

Add a note to indicate that we need to do perf tuning for this one when we modify the annotator.yaml

Copy link
Contributor

@yachang yachang left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 LGTMs obtained


handler/handler.go, line 185 at r2 (raw file):

		}
	} else {
		responseMap = make(map[string]*api.GeoData)

if length of input request is 0, we can just return here.

Copy link
Contributor

@yachang yachang left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 LGTMs obtained


handler/handler.go, line 179 at r2 (raw file):

		// For old request format, we use empty date.
		date := time.Time{}
		responseMap, _, err = AnnotateLegacy(date, dataSlice)

It is not necessary to pass date as input param here. If I read the code correctly, it is useless at all.

Copy link
Contributor

@yachang yachang left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 LGTMs obtained


handler/handler.go, line 112 at r2 (raw file):

var ErrNoAnnotator = errors.New("no Annotator found")

// TODO move to annotatormanager package soon.

Add doc for input/output params

Copy link
Contributor

@yachang yachang left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: :shipit: complete! 1 of 1 LGTMs obtained

Copy link
Contributor Author

@gfr10598 gfr10598 left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 4 files at r1, 1 of 2 files at r2, 3 of 3 files at r3.
Reviewable status: :shipit: complete! 1 of 1 LGTMs obtained


annotator-ss.yaml, line 4 at r2 (raw file):

Previously, yachang wrote…

Add a note to indicate that we need to do perf tuning for this one when we modify the annotator.yaml

Done.


handler/handler.go, line 112 at r2 (raw file):

Previously, yachang wrote…

Add doc for input/output params

Done.


handler/handler.go, line 179 at r2 (raw file):

Previously, yachang wrote…

It is not necessary to pass date as input param here. If I read the code correctly, it is useless at all.

Oops. That is remnant of code before I pulled out AnnotateLegacy.


handler/handler.go, line 185 at r2 (raw file):

Previously, yachang wrote…

if length of input request is 0, we can just return here.

We still have to encode the empty response map.

Copy link
Contributor

@yachang yachang left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: :shipit: complete! 1 of 1 LGTMs obtained

@gfr10598 gfr10598 merged commit 13f8b3a into master Dec 3, 2018
@gfr10598 gfr10598 deleted the sandbox-old-api branch December 3, 2018 20:49
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.

None yet

3 participants