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

plugins/bundle: Include last successful request timestamp in status #2076

Merged
merged 1 commit into from
Feb 7, 2020

Conversation

tsandall
Copy link
Member

@tsandall tsandall commented Feb 7, 2020

This commit updates the bundle plugin to record the last successful
download attempt timestamp in the bundle status. This way Status API
implementations can easily check whether the OPA has been able to
recently check-in for bundle updates.

Fixes #2009

Signed-off-by: Torin Sandall torinsandall@gmail.com

@tsandall tsandall requested a review from patrick-east February 7, 2020 15:11
ashutosh-narkar
ashutosh-narkar previously approved these changes Feb 7, 2020
Copy link
Member

@ashutosh-narkar ashutosh-narkar left a comment

Choose a reason for hiding this comment

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

lgtm

patrick-east
patrick-east previously approved these changes Feb 7, 2020
Copy link
Contributor

@patrick-east patrick-east left a comment

Choose a reason for hiding this comment

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

LGTM.

I wonder a little bit if it makes sense to just have the last request time (success or error). As-is if its sitting there in an error state there is also no way to easily tell if/when it has re-tried, right?

@tsandall
Copy link
Member Author

tsandall commented Feb 7, 2020

@patrick-east that's true, adding a "last request" timestamp wouldn't hurt and could be nice. I'll update the PR with that and then merge.

This commit updates the bundle plugin to record the last successful
download _attempt_ timestamp in the bundle status. This way Status API
implementations can easily check whether the OPA has been able to
recently check-in for bundle updates.

Fixes open-policy-agent#2009

Signed-off-by: Torin Sandall <torinsandall@gmail.com>
@tsandall tsandall merged commit 985b854 into open-policy-agent:master Feb 7, 2020
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.

Status API should report last time that OPA received a successful/non-download bundle response
3 participants