Repository navigation
feat: attach exported files to scheduled report emails with export.attach - #10031
Merged
Merged
Conversation
- Add an opt-in `export.attach` report property (`export_attach` on `ReportSpec` and `ReportOptions`) and an "Attach file to emails" option in the explore report form. - Only supported for query-based reports run as the creator; the admin API and the parser reject it for recipient mode, canvas PDF and AI reports. - The report reconciler exports the data once with the report owner's attributes and attaches it to every email; Slack notifications keep the download link. - Exports larger than 10 MB are not attached; the email says so and keeps the download link, and the run records a warning. - Extract `queries.ProtoToExportQuery` from the download handler, so attachments and download links build the same query. - The SMTP sender only composes a multipart message when there is an attachment. - Add `testruntime.InstanceOptions.AdminService`, so runtime tests can deliver reports.
AdityaHegde
self-requested a review
October 20, 2026 05:41
AdityaHegde
requested changes
Oct 20, 2026
|
|
||
| type Sender interface { | ||
| Send(toEmail, toName, subject, body string) error | ||
| Send(toEmail, toName, subject, body string, attachments ...Attachment) error |
Collaborator
There was a problem hiding this comment.
Any specific reason to use rest param instead of array? Will be easier to add new params in the future?
Collaborator
Author
There was a problem hiding this comment.
Switched to []Attachment; the other callers pass nil. (83f67a8)
| </Tooltip> | ||
| </div> | ||
| <Checkbox | ||
| checked={$data["exportAttach"] && canAttach} |
Collaborator
There was a problem hiding this comment.
nit: adding canAttach to check feels weird. We should either reset exportAttach when we cannot attach or still show the selected state but disabled.
Collaborator
Author
There was a problem hiding this comment.
Went with the reset: exportAttach is cleared when Run as is not Creator, so the checkbox binds it directly. (83f67a8)
…ption outside creator mode, align the metadata info icon
…attachments # Conflicts: # proto/gen/rill/admin/v1/api.pb.go # proto/gen/rill/runtime/v1/resources.pb.go
nishantmonu51
force-pushed
the
nishant/report-email-attachments
branch
from
October 21, 2026 06:24
d6e7c09 to
31c2ca0
Compare
Collaborator
Author
|
Info icons: Include metadata now uses the checkbox |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Adds an opt-in option to attach a scheduled report's export file to its emails.
export_attachonReportOptionsandReportSpecandexport.attachin report YAML. Off by default, so existing reports are unchanged.queries.ProtoToExportQueryis extracted from the download handler, so attachments and download links build the same query.testruntime.InstanceOptions.AdminServicelets runtime tests deliver reports (the no-op admin skips them); the new reconciler tests use it.admin_owner_user_id) skip the attachment with a warning, since their download links are issued per recipient.Checklist: