Bug description

When modifying a dataset, only changes made in the "SOURCE" or "SETTINGS" screens trigger the update of the "Last modified" field shown in the list of datasets.

Steps to reproduce the bug:

  1. Go to Datasets list.
  2. Edit a Dataset (anything that's not on the "SOURCE" or "SETTINGS" screens).
  3. Save changes.
  4. Check Datasets list's field "Last modified" for that specific dataset. It didn't update.

Screenshots/recordings

No response

Superset version

4.1.1

Python version

3.9

Node version

16

Browser

Chrome

Additional context

Log:

HTTPException
Traceback (most recent call last):
  File "/opt/superset/venv/lib/python3.10/site-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
  File "/opt/superset/venv/lib/python3.10/site-packages/flask/app.py", line 1458, in dispatch_request
    self.raise_routing_exception(req)
  File "/opt/superset/venv/lib/python3.10/site-packages/flask/app.py", line 1440, in raise_routing_exception
    raise request.routing_exception  # type: ignore
  File "/opt/superset/venv/lib/python3.10/site-packages/flask/ctx.py", line 353, in match_request
    result = self.url_adapter.match(return_rule=True)  # type: ignore
  File "/opt/superset/venv/lib/python3.10/site-packages/werkzeug/routing/map.py", line 629, in match
    raise NotFound() from None
werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

Checklist

  • [ ] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [x] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Comment From: dosubot[bot]

The issue you're experiencing, where the "Last modified" field does not update when modifying metrics in a dataset, might be related to how the Superset codebase handles updates to this field. Unfortunately, I couldn't find specific information in the codebase about the mechanism that updates the "Last modified" field or any conditions that determine when it should be updated.

However, changes to metrics are managed by the update_metrics method in the DatasetDAO class, which handles the creation, updating, and deletion of metrics [1]. It's possible that the "Last modified" field is not being updated due to a missing trigger or event listener that should capture these changes.

To address this issue, you might want to investigate whether there are any event listeners or hooks that should trigger an update to the "Last modified" field when metrics are modified. Additionally, reviewing the API endpoints and ensuring they correctly handle updates to this field could be beneficial.

If you have access to the codebase, you could look into the parts of the code that handle dataset updates and see if there's a missing link between metric changes and the "Last modified" field update.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

Comment From: rusackas

Still seems valid, but isn't getting much attention. Any interest in investigating a fix?

Comment From: JZ6

Still seems valid, but isn't getting much attention. Any interest in investigating a fix?

We at Geotab have a fix for this and will submit a pr soon

Comment From: Jockxtar

We at Geotab have a fix for this and will submit a pr soon

Awesome, thanks a lot! Looking forward to the PR.

Comment From: Vitor-Avila

Hey @Jockxtar I believe this is actually already fixed in master with this PR: https://github.com/apache/superset/pull/33626

Are you able to double check?