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

Make it possible to get the state of the Rules table at a point in time #977

Merged
merged 14 commits into from Aug 12, 2019

Conversation

bhearsum
Copy link
Contributor

@bhearsum bhearsum commented Aug 7, 2019

Between the unit tests included and my own manual testing this looks like it works as expected. I'm using <= timestamp, because I think that desirable to return Rules up to and including the point in time, rather than just before it. Let me know if that doesn't make sense.

I'm not 100% happy with the state of the parameters to /rules in the current state. If you pass timestamp, product is ignored, and visa versa. In theory we could let getPointInTime restrict by product, but there's no use case for it, so I'm not sure it's worthwhile to implement. Maybe just an error message if both are passed is sufficient? I'm interested in what you think.

If you want to test this with real data, you should be able to run mozilla-releng/balrog-ui#135 locally (make sure to comment out the react UI container from this repo's docker-compose.yml, though) together with this patch.

@bhearsum bhearsum self-assigned this Aug 7, 2019
@bhearsum bhearsum closed this Aug 7, 2019
@bhearsum bhearsum reopened this Aug 7, 2019
Copy link
Contributor

@nthomas-mozilla nthomas-mozilla left a comment

Choose a reason for hiding this comment

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

Pretty cool how little backend code needs to change to support this great new functionality. I don't have any blockers, but would be happy to see a few tweaks for readability. No firm opinion on the alternative parameters for /rules requests.

auslib/db.py Outdated Show resolved Hide resolved
auslib/web/admin/swagger/api.yaml Show resolved Hide resolved
auslib/web/common/rules.py Show resolved Hide resolved
auslib/test/admin/views/test_rules.py Show resolved Hide resolved
auslib/test/admin/views/test_rules.py Show resolved Hide resolved
auslib/test/admin/views/test_rules.py Show resolved Hide resolved
auslib/test/admin/views/base.py Outdated Show resolved Hide resolved
@bhearsum bhearsum merged commit 491736a into mozilla-releng:master Aug 12, 2019
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