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
refactor(server): decouple generated images from image formats #8246
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seem to be a lot of mess ups where GENERATE_JPEG_THUMBNAIL
becomes GENERATE_THUMBNAIL
and vice versa (I stopped looking for them when I hit media.service.spec) . I assume those aren't intentional changes?
Also, this is a breaking change, correct? The mobile app will break completely?
How is the current version on the app store of the mobile app behave with these changes? |
I'm not sure. I haven't tested mobile, but there didn't seem to be anything that relies specifically on the name of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine changing the internal usage, but the API changes are breaking changes and I had planned on moving these API calls to a media controller, so it would be a bit annoying to break it twice.
The app seems to work fine for me with this PR. |
Coming back to this PR, is the concern here that it'll break third-party code? I suppose I could revert the DB / config file changes, leaving the renamed job names, enum names and adding |
I am fine with everything, including configuration changes, with the exception of the public facing server API changes. And only because I would love to migrate to a media controller with endpoints like /media/* and suggest that we implement the breaking API changes as new endpoints rather than updating the current ones. What do you think? |
I think the only API-facing change is renaming the DB columns. I think we could have the DTOs continue accepting the old names (marked deprecated) and map them internally, keeping the PR the same otherwise. |
If there are no (breaking) changes to the open API spec file then I would say it is fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Quite hard to not mix it up all the time - both when reviewing and especially when migrating it I'd imagine 😅
d062024
to
cf0b00e
Compare
171bf29
to
84d6497
Compare
…ouple-image-format
Description
The codebase currently hardcodes the formats of preview and thumbnail images, down to the thumbnail path being
webpPath
in the DB. This PR does two things:asset-id-preview.jpeg
andasset-id-thumbnail.jpeg
These changes unblock future PRs to configure the target image format and support additional formats.
How Has This Been Tested?
Tested browsing, generating thumbnails, changing image resolution, running the migration job for the new image paths and installing and using a fresh app from the app store.