Skip to content

use images from integration docs package instead of github#6435

Merged
Alek99 merged 2 commits intomainfrom
carlos/integrations-images-update
May 1, 2026
Merged

use images from integration docs package instead of github#6435
Alek99 merged 2 commits intomainfrom
carlos/integrations-images-update

Conversation

@carlosabadia
Copy link
Copy Markdown
Contributor

No description provided.

@carlosabadia carlosabadia added the documentation Improvements or additions to documentation label May 1, 2026
@carlosabadia carlosabadia requested review from a team and Alek99 as code owners May 1, 2026 08:06
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 1, 2026

Greptile Summary

This PR replaces the INTEGRATIONS_IMAGES_URL GitHub raw-content constant with a new integrations.py helper that symlinks the locally-installed reflex-integrations-docs package's logo directory into the Reflex assets tree at startup, removing the hard dependency on GitHub CDN availability.

  • _integrations_logos_url() calls dst.unlink() when the destination already exists, but Path.unlink() raises IsADirectoryError on a plain directory (not a symlink). A leftover directory from a failed deploy would crash app startup.

Confidence Score: 3/5

Safe conceptually but the directory-vs-symlink unlink edge case can crash app startup and should be addressed before merging.

One P1 finding: Path.unlink() on a regular directory raises IsADirectoryError, which would surface as an unhandled exception during app initialization if a directory exists at the symlink target path. All callsite changes are straightforward and correct.

packages/reflex-site-shared/src/reflex_site_shared/integrations.py — specifically the dst.unlink() call inside _integrations_logos_url()

Important Files Changed

Filename Overview
packages/reflex-site-shared/src/reflex_site_shared/integrations.py New module that symlinks integrations_docs logos into the assets tree at startup; dst.unlink() will raise IsADirectoryError if a plain directory exists at the target path
packages/reflex-site-shared/src/reflex_site_shared/constants.py Removes INTEGRATIONS_IMAGES_URL GitHub raw URL constant; duplicate GITHUB_URL definition is pre-existing
packages/reflex-site-shared/pyproject.toml Adds reflex-integrations-docs as a runtime dependency (editable monorepo package)
packages/reflex-site-shared/src/reflex_site_shared/gallery/common.py Replaces inline f-string URL construction with get_integration_logo_url(); straightforward callsite update
docs/app/reflex_docs/pages/docs_landing/views/ai_builder.py Removes inline name normalization and delegates to get_integration_logo_url(); clean callsite update

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[get_integration_logo_url called] --> B{_integrations_logos_url cached?}
    B -- Yes --> G[return cached URL prefix]
    B -- No --> C[locate integrations_docs logos dir]
    C --> D{src dir exists?}
    D -- No --> E[raise RuntimeError]
    D -- Yes --> F{REFLEX_BACKEND_ONLY?}
    F -- Yes --> G2[skip symlink, return URL]
    F -- No --> H{dst is correct symlink?}
    H -- Yes --> G3[return URL prefix]
    H -- No --> I{dst is symlink or exists?}
    I -- Yes --> J["dst.unlink() - fails if plain dir"]
    I -- No --> K[dst.symlink_to src]
    J --> K
    K --> G3
Loading

Reviews (1): Last reviewed commit: "use images from integration docs package..." | Re-trigger Greptile

Comment thread packages/reflex-site-shared/src/reflex_site_shared/integrations.py
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 1, 2026

Merging this PR will not alter performance

✅ 17 untouched benchmarks
⏩ 2 skipped benchmarks1


Comparing carlos/integrations-images-update (a7ca4e7) with main (76ff38c)

Open in CodSpeed

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@Alek99 Alek99 merged commit b438de1 into main May 1, 2026
69 checks passed
@Alek99 Alek99 deleted the carlos/integrations-images-update branch May 1, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants