-
Notifications
You must be signed in to change notification settings - Fork 75
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
Makes changes to dataset-related logging in audit log #664
Comments
This issue is kind of related to this one about listing dataset audit logs via the api: #795 |
@sadiqkhoja, now that |
@getodk/testers this is ready for testing in staging Expected behaviour
|
@sadiqkhoja Should change in the Datasets -> Entity name -> Settings -> Entity Workflow |
yes |
If I move a field in a form (I don't add anything) should there be Dataset update event in audit logs? |
no |
Tested with Success! |
1 similar comment
Tested with Success! |
…#931) * Enhances getodk#664: add logs only when changes are published * updated API doc * updated comments
For after v2022.3 — moving from #649 (comment):
Backend logs
dataset.create
anddataset.update
in the audit log. However, I think that there are a couple of possibilities for confusion there:More specifically:
dataset.create
is immediately logged, even if the form draft is ultimately abandoned and the dataset never becomes visible on the project.dataset.update
is immediately logged, even if the form draft is ultimately abandoned and the property never becomes visible on the dataset. (Maybe related to Tracking progress of Datasets & Entities #649 (comment)?)dataset.update
is logged even when there are no new properties. It is logged when a form definition is uploaded that would create entities for an existing dataset, not when that form definition would add a property to the dataset.I'd expect
dataset.create
anddataset.update
to be logged only when the form draft is published. I know that creating a draft can have an immediate effect on thedatasets
table, and I think it makes sense that it works that way under the hood. But I think we're exposing those mechanics over the audit log in a way that could be surprising and that ultimately makes the audit log less actionable. It also results in a mismatch between what's in the audit log and what's returned by …/datasets and …/dataset-diff.How about we don't set
.audit
onDatasets.createOrMerge
, but instead wait until publishing the form to logdataset.create
ordataset.update
? Maybe we could query the dataset diff then to determine whether and what to log.@sadiqkhoja has made the point that it could be helpful for debugging to log events earlier / more frequently. One idea is that we could add more dataset actions, distinguishing between draft changes to a dataset and published changes to a dataset. It's not clear whether we'd return all those actions over the API or keep some just internal.
The text was updated successfully, but these errors were encountered: