Skip to content

feat: upload br encoding to asset canister - #3791

Merged
viviveevee merged 4 commits into
masterfrom
SDK-1604-add-brotli-compression-to-asset-sync
Jun 19, 2024
Merged

feat: upload br encoding to asset canister#3791
viviveevee merged 4 commits into
masterfrom
SDK-1604-add-brotli-compression-to-asset-sync

Conversation

@viviveevee

@viviveevee viviveevee commented Jun 13, 2024

Copy link
Copy Markdown
Contributor

Description

Asset synchronization now not only uploads identity and gzip as encodings for MIME types text, js, and html, but also br encoding.

Fixes SDK-1604

How Has This Been Tested?

Added e2e

Checklist:

  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

@viviveevee
viviveevee marked this pull request as ready for review June 13, 2024 13:54
@viviveevee
viviveevee requested a review from a team as a code owner June 13, 2024 13:54
match (media_type.type_(), media_type.subtype()) {
(mime::TEXT, _) | (_, mime::JAVASCRIPT) | (_, mime::HTML) => vec![ContentEncoder::Gzip],
(mime::TEXT, _) | (_, mime::JAVASCRIPT) | (_, mime::HTML) => {
vec![ContentEncoder::Gzip, ContentEncoder::Brotli]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Has this been discussed, as a default behavior, at the product level?

I think it would be better to opt-in, configured in .ic-assets.json

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

sns-controlled asset canisters might impossible to sync unless they can opt-in for a subset of files rather than all at once. This is because a proposal's commit by definition has to be a single call.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will be adjusted once #3792 is merged

@viviveevee
viviveevee merged commit 5ee2a1c into master Jun 19, 2024
@viviveevee
viviveevee deleted the SDK-1604-add-brotli-compression-to-asset-sync branch June 19, 2024 08:16
rikonor pushed a commit that referenced this pull request Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant