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

Trend viz might not appear correctly on alerts #39854

Closed
zbodi74 opened this issue Mar 8, 2024 · 0 comments · Fixed by #40464
Closed

Trend viz might not appear correctly on alerts #39854

zbodi74 opened this issue Mar 8, 2024 · 0 comments · Fixed by #40464
Assignees
Labels
Priority:P2 Average run of the mill bug Reporting/Alerts .Team/DashViz Dashboard and Viz team Type:Bug Product defects Visualization/
Milestone

Comments

@zbodi74
Copy link

zbodi74 commented Mar 8, 2024

Describe the bug

In some cases, trend visualization do not display correctly on alerts.

To Reproduce

  1. create a GUI question: Sample Database, Products
  • filter by: Created at, previous 2 months, including current one
  • summarize: Count
  • group by: Created at: month
  1. Set visualization to Trend. The visualization works:
image
  1. Save it, and set up an alert

  2. (!) The received alert does not display

image

Expected behavior

The alert should display the viz the same way.

Logs

n/a

Information about your Metabase installation

{
  "browser-info": {
    "language": "en-GB",
    "platform": "MacIntel",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36",
    "vendor": "Google Inc."
  },
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.22+7",
    "java.vendor": "Eclipse Adoptium",
    "java.vendor.url": "https://adoptium.net/",
    "java.version": "11.0.22",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.22+7",
    "os.name": "Linux",
    "os.version": "6.1.30-0-virt",
    "user.language": "en",
    "user.timezone": "Etc/UTC"
  },
  "metabase-info": {
    "databases": [
      "h2",
      "postgres"
    ],
    "hosting-env": "unknown",
    "application-database": "postgres",
    "application-database-details": {
      "database": {
        "name": "PostgreSQL",
        "version": "11.22 (Debian 11.22-1.pgdg110+1)"
      },
      "jdbc-driver": {
        "name": "PostgreSQL JDBC Driver",
        "version": "42.6.0"
      }
    },
    "run-mode": "prod",
    "version": {
      "date": "2024-02-22",
      "tag": "v1.48.7",
      "hash": "c192db1"
    },
    "settings": {
      "report-timezone": null
    }
  }
}

Severity

P2 - reported by a customer

Additional context

Also tested this on stats, a different error is displayed there:

image
@zbodi74 zbodi74 added Type:Bug Product defects Priority:P2 Average run of the mill bug Visualization/ Reporting/Alerts .Needs Triage .Team/DashViz Dashboard and Viz team labels Mar 8, 2024
@adam-james-v adam-james-v self-assigned this Mar 12, 2024
adam-james-v added a commit that referenced this issue Mar 21, 2024
WIP

Fixes: #39854

The trend chart follows a code path shared with multi-series static-viz. This means there was an implicit expectation
that a dashcard is associated with the card at all times. This isn't true for alerts, so the code is fixed to remove
the failure.
adam-james-v added a commit that referenced this issue Mar 22, 2024
* Trend Chart Viz Should Use Proper Card execute in Rendering

WIP

Fixes: #39854

The trend chart follows a code path shared with multi-series static-viz. This means there was an implicit expectation
that a dashcard is associated with the card at all times. This isn't true for alerts, so the code is fixed to remove
the failure.

* Add a test

* add missed :breakout that actually made the test work

oops

* Adding comments to try clarify what's going on
adam-james-v added a commit that referenced this issue Mar 22, 2024
* Trend Chart Viz Should Use Proper Card execute in Rendering

WIP

Fixes: #39854

The trend chart follows a code path shared with multi-series static-viz. This means there was an implicit expectation
that a dashcard is associated with the card at all times. This isn't true for alerts, so the code is fixed to remove
the failure.

* Add a test

* add missed :breakout that actually made the test work

oops

* Adding comments to try clarify what's going on
adam-james-v added a commit that referenced this issue Mar 22, 2024
…ring" (#40524)

* Trend Chart Viz Should Use Proper Card execute in Rendering (#40464)

* Trend Chart Viz Should Use Proper Card execute in Rendering

WIP

Fixes: #39854

The trend chart follows a code path shared with multi-series static-viz. This means there was an implicit expectation
that a dashcard is associated with the card at all times. This isn't true for alerts, so the code is fixed to remove
the failure.

* Add a test

* add missed :breakout that actually made the test work

oops

* Adding comments to try clarify what's going on

* indentation

---------

Co-authored-by: Adam James <adam.vermeer2@gmail.com>
Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
@adam-james-v adam-james-v added this to the 0.49.2 milestone Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:P2 Average run of the mill bug Reporting/Alerts .Team/DashViz Dashboard and Viz team Type:Bug Product defects Visualization/
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants