Skip to content

Conversation

@anon-pradip
Copy link
Contributor

@anon-pradip anon-pradip commented Nov 17, 2025

Description

This PR enables Unicode text preview support for the thumbnails service in Kubernetes, ensures consistent thumbnail generation between test builds and production images, and fixes a flaky TUS upload test.

Problem

  1. K8s deployments: Thumbnails service couldn't render Unicode characters (e.g., Devanagari script) due to missing fonts
  2. Inconsistent test builds: Test builds used standard Go image/jpeg encoder while production Docker images (built with ENABLE_VIPS=true) use libvips encoder, causing different JPEG output and test failures
  3. Flaky TUS test: coreApiWebdavUploadTUS/lowLevelUpload.feature: send last chunk twice was failing in Drone CI K8s with 409 but passing locally with 404

Changes

1. K8s Font Support

  • Added ConfigMaps for NotoSans font and font configuration
  • Mounted fonts into thumbnails deployment for Unicode text rendering

2. Consistent Test Builds

  • Added ENABLE_VIPS=true to test builds to match production images (which already have VIPS enabled)
  • Updated 5 preview fixtures to match VIPS output (JPEG with EXIF metadata):
    • unicode-fixture.png: 620 → 739 bytes
    • fit.png: 713 → 885 bytes
    • fill.png: 874 → 1029 bytes
    • resize.png: 829 → 984 bytes
    • thumbnail.png: 874 → 1029 bytes

3. TUS Upload Test Fix

  • Updated test expectation from 404 to 404 or 409 for "send last chunk twice" scenario

Passing CIs:

Related Issue

Motivation and Context

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@anon-pradip anon-pradip self-assigned this Nov 17, 2025
@anon-pradip anon-pradip force-pushed the test/include-coreApi8-suite-in-k8s branch 9 times, most recently from 6358a8d to 53fb068 Compare November 24, 2025 06:48
@anon-pradip anon-pradip force-pushed the test/include-coreApi8-suite-in-k8s branch from 1c60d50 to 7a49c3f Compare November 26, 2025 12:06
@anon-pradip anon-pradip marked this pull request as ready for review November 27, 2025 03:54
@anon-pradip anon-pradip requested review from Ashim-Stha, nirajacharya2 and saw-jan and removed request for individual-it, kobergj and phil-davis November 27, 2025 03:55
And user "Alice" sends a chunk to the last created TUS Location with offset "3" and data "4567890" using the WebDAV API
And user "Alice" sends a chunk to the last created TUS Location with offset "3" and data "0000000" using the WebDAV API
Then the HTTP status code should be "404"
Then the HTTP status code should be "404" or "409"
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we get 409 now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here is the confirmation issue: #11854 (comment)

Copy link
Member

Choose a reason for hiding this comment

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

@anon-pradip anon-pradip force-pushed the test/include-coreApi8-suite-in-k8s branch 6 times, most recently from c2a11d8 to e33e63e Compare December 3, 2025 08:26
@anon-pradip anon-pradip force-pushed the test/include-coreApi8-suite-in-k8s branch 4 times, most recently from 6b50513 to 5b338e7 Compare December 4, 2025 06:01
@anon-pradip anon-pradip force-pushed the test/include-coreApi8-suite-in-k8s branch 2 times, most recently from eca5419 to bab8034 Compare December 10, 2025 11:58
@anon-pradip anon-pradip force-pushed the test/include-coreApi8-suite-in-k8s branch 5 times, most recently from 4c9ad18 to 5ef4f75 Compare December 12, 2025 06:29
@anon-pradip anon-pradip force-pushed the test/include-coreApi8-suite-in-k8s branch from 5ef4f75 to b9b0e2f Compare December 15, 2025 04:23
@sonarqubecloud
Copy link

| 1024 | 1024 | 640 | 640 | spaces |
| 1 | 1024 | 16 | 16 | spaces |
| 1024 | 1 | 640 | 480 | spaces |
| 1024 | 1 | 640 | 640 | spaces |
Copy link
Member

Choose a reason for hiding this comment

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

by default vips is not enabled, we need to think of running test locally with vips disabled.
May be we should check using either .. or ..

Suggested change
| 1024 | 1 | 640 | 640 | spaces |
| 1024 | 1 | 640 | 480,640 | spaces |

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants