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

Adds 'snapshot' mode to external attachments #1409

Draft
wants to merge 3 commits into
base: spoffy/external-attachments-transfers
Choose a base branch
from

Conversation

Spoffy
Copy link
Contributor

@Spoffy Spoffy commented Jan 30, 2025

Context

External attachments only support a test mode, since the GRIST_EXTERNAL_ATTACHMENTS_MODE config was added. This prevents Grist being used with MinIO for testing.

Proposed solution

This adds the 'snapshot' option to GRIST_EXTERNAL_ATTACHMENTS_MODE, which makes Grist use the same storage for external attachments that document snapshots use.

Related issues

#1358

Has this been tested?

  • 👍 yes, I added tests to the test suite
  • 💭 no, because this PR is a draft and still needs work
  • 🙅 no, because this is not relevant here
  • 🙋 no, because I need help

@Spoffy Spoffy marked this pull request as draft January 30, 2025 23:01
Copy link
Member

@paulfitz paulfitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks plausible, comments are minor.

Will need CI running on it! Not enjoying having a unlandable base branch that keeps needing more stuff merged into it to test.

@@ -5,6 +5,7 @@ import {ICreateAttachmentStoreOptions} from './ICreate';
import * as fse from 'fs-extra';
import path from 'path';
import * as tmp from 'tmp-promise';
import {create} from 'app/server/lib/create';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alphabetical order please

case "test":
case 'snapshots':
return 'snapshots';
case 'test':
return 'test-filesystem';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there value in mapping test|snapshots to test-filesystem|snapshots? How is this making the world better?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants