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

Include a client_id in the results from ProfileFetcher #66

Merged
merged 6 commits into from
Mar 1, 2018

Conversation

crankycoder
Copy link
Contributor

Logging useful information from the ProfileFetcher was unnecessarily difficult because we were missing a client_id in the result output.

This patch adds the client_id attribute into the dictionary result from ProfileFetcher::get(client_id), and updates the related testcase.

I've thrown in an update to the README.md which also closes off #29.

@coveralls
Copy link

coveralls commented Feb 28, 2018

Coverage Status

Coverage increased (+3.8%) to 90.661% when pulling f5d5a0d on crankycoder:features/issue-65 into dfc333a on mozilla:master.

@crankycoder
Copy link
Contributor Author

@mlopatka @birdsarah r? Coveralls hates my logging.

@crankycoder
Copy link
Contributor Author

Crap. I need to add microbenchmarks and some instructions on running the test_integration script.

return rm


@pytest.mark.skip("This is an integration test")
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you explain your thinking here around writing a new test but skipping it.

If we don't want to run it on CI, we can skip it there.

If we don't want to run it by default we can add a pytest mark and update setup.cfg to exclude that mark by default.

I'm concerned that this test will never be run and will bitrot.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The function here is mostly a smoke test. We've had problems where we missed something that unit tests could not adequately capture. To run an end-to-end test, a person needs to have proper S3 credentials to read the JSON blobs from the dev environment.

bitrot is a real concern - we can have ops provision a special CI access key for us to read the JSON blobs for each of the recommenders when we run under test.

@mlopatka - i don't imagine there's a privacy concern here, but is that ok?

Basically - anyone who uses our CI access key would have read permission on each of the JSON blobs for the recommenders.

Copy link
Contributor

Choose a reason for hiding this comment

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

okay. lets open an issue. there should be a way to make this work. i've worked with similar problems before - e.g. you only want certain committers to be able to upload to your s3 bucket.

Copy link
Contributor

@birdsarah birdsarah left a comment

Choose a reason for hiding this comment

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

Reserve the right to follow-up on test stuff.

@crankycoder crankycoder merged commit 58e8208 into mozilla:master Mar 1, 2018
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