Skip to content

Integrate crates_io_og_image into the application #11481

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Jul 1, 2025

This pull request integrates the crates_io_og_image crate (introduced in #11436) into the main crates.io application to enable automated OpenGraph image generation for crates. The integration includes adding the OG image generator to the worker environment, implementing background job processing for image generation, and extending storage functionality to handle OG image uploads. Images are automatically generated when crates are published or default versions are updated, with admin commands available for backfilling existing crates.

@Turbo87 Turbo87 added C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works A-backend ⚙️ labels Jul 1, 2025
@Turbo87 Turbo87 force-pushed the og-image-integration branch 3 times, most recently from bd41b5e to 1b00eba Compare July 1, 2025 12:45
@Turbo87 Turbo87 force-pushed the og-image-integration branch from 1b00eba to c6b4e1c Compare July 1, 2025 13:43
@Turbo87 Turbo87 force-pushed the og-image-integration branch from c6b4e1c to b09a09e Compare July 1, 2025 14:16
@Turbo87 Turbo87 requested a review from a team July 1, 2025 14:19
@@ -306,6 +307,8 @@ impl TestAppBuilder {
credentials: Credentials::Missing,
};

let og_image_generator = Arc::new(OgImageGenerator::from_environment().unwrap());
Copy link
Member Author

Choose a reason for hiding this comment

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

This change basically requires everyone to have Typst and oxipng installed to run the tests since all publishing tests are now creating og-images. I'm wondering whether we should make this generator optional and default it to None in the test suite. That would also reduce the overhead of the image creation for most of the tests. 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend ⚙️ C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant