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 etag with rest of bundle metadata #4544

Closed
tsandall opened this issue Apr 4, 2022 · 0 comments · Fixed by #4578
Closed

Include etag with rest of bundle metadata #4544

tsandall opened this issue Apr 4, 2022 · 0 comments · Fixed by #4578
Assignees
Labels
distribution Issues related to the bundle plugin

Comments

@tsandall
Copy link
Member

tsandall commented Apr 4, 2022

Currently the etag from the HTTP response of activated bundles is not retained once the bundle activates. As a result, when the disk-store is used, OPA will re-download and activate a bundle following a process restart, even if the store contents are up-to-date. We could avoid this potentially expensive operation by including the etag in the persisted bundle metadata and initializing the downloader accordingly on startup.

@tsandall tsandall added the distribution Issues related to the bundle plugin label Apr 4, 2022
@tsandall tsandall added this to Backlog in Open Policy Agent via automation Apr 4, 2022
@ashutosh-narkar ashutosh-narkar self-assigned this Apr 7, 2022
@ashutosh-narkar ashutosh-narkar moved this from Backlog to In Progress in Open Policy Agent Apr 7, 2022
ashutosh-narkar added a commit to ashutosh-narkar/opa that referenced this issue Apr 13, 2022
Currently etag from the HTTP response of activated bundles is not
persisted to store. Hence if OPA restarts and an activated bundle
loaded from the disk store is up-to-date, OPA may still download
the same version of the bundle and activate it. With this change,
OPA should include the right etag in the bundle download request
thereby avoiding unnecessary bundle download and activation.

Fixes: open-policy-agent#4544

Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
Open Policy Agent automation moved this from In Progress to Done Apr 13, 2022
ashutosh-narkar added a commit that referenced this issue Apr 13, 2022
Currently etag from the HTTP response of activated bundles is not
persisted to store. Hence if OPA restarts and an activated bundle
loaded from the disk store is up-to-date, OPA may still download
the same version of the bundle and activate it. With this change,
OPA should include the right etag in the bundle download request
thereby avoiding unnecessary bundle download and activation.

Fixes: #4544

Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
rokkiter pushed a commit to rokkiter/opa that referenced this issue Apr 18, 2022
Currently etag from the HTTP response of activated bundles is not
persisted to store. Hence if OPA restarts and an activated bundle
loaded from the disk store is up-to-date, OPA may still download
the same version of the bundle and activate it. With this change,
OPA should include the right etag in the bundle download request
thereby avoiding unnecessary bundle download and activation.

Fixes: open-policy-agent#4544

Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distribution Issues related to the bundle plugin
Projects
Development

Successfully merging a pull request may close this issue.

2 participants