Conversation
👷 Deploy Preview for chef-server processing.
|
| ChecksumsToCommit = [ C || {C, false} <- Checksums ], | ||
| chef_db:mark_checksums_as_uploaded(Ctx, OrgId, ChecksumsToCommit), | ||
| chef_db:commit_sandbox(Ctx, Sandbox). | ||
| chef_db:commit_sandbox(Ctx, Sandbox), |
There was a problem hiding this comment.
Can we move this logic -- including the call to chef_db:commit_sandbox `` into chef_object_db:delete? It is sort of the centralized place for deleting top-level objects including the database entry, any indexing, and authz entry.
So the mark_checksums, the commit_sandbox, and the oc_chef_authz:delete_resource call.
| chef_db_context = DbContext, | ||
| resource_state = #sandbox_state{chef_sandbox = Sandbox}} = State) -> | ||
| requestor_id = RequestorId, | ||
| resource_state = #sandbox_state{chef_sandbox = Sandbox, sandbox_authz_id = SBAuthz}} = State) -> |
There was a problem hiding this comment.
It seems odd to me that we don't have the authz id in the #sandbox{} record itself, like we do for other objects -- even though we include it in the data we write to the DB. Have you been able to confirm that the authz id is available in the #sandbox_state{} record at this point in time?
lbakerchef
left a comment
There was a problem hiding this comment.
I know it's still a WIP. Any test results yet to show this working? In addition to standard umbrella, I'm thinking some kind of log dump or screen shot showing that the db doesn't grow when subjected to the same steps to reproduce the issue.
08e7190 to
d69763b
Compare
|
Yet to be tested on the hosted data |
d69763b to
512785a
Compare
512785a to
a1d601a
Compare
a1d601a to
c7b947e
Compare
Signed-off-by: Vinay Satish <[email protected]>
Signed-off-by: Vinay Satish <[email protected]>
c7b947e to
e345898
Compare
|
Kudos, SonarCloud Quality Gate passed!
|








Signed-off-by: Vinay Satish [email protected]
Description
The bifrost DB is growing due to a bug in the sandbox APIs. We use sandboxes APIs while uploading the cookbooks to bookshelf to make sure that partial cookbook content isn't served up.
When creating the sandbox, we also generate the authz_id for that sandbox. In the second half of the sandbox process, after we upload the cookbooks, we use an API to verify the checksum and delete the sandbox. In this API we are not deleting the authz_id of the sandbox. Because of this the data is growing in the bifrost database.
Issues Resolved
https://chefio.atlassian.net/browse/INFS-138
Issues Related
https://github.com/chef/umbrella/pull/253
Check List