Skip to content
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

Changing development branch breaks resource embeds in doc #2387

Open
pushfoo opened this issue Oct 4, 2024 · 3 comments
Open

Changing development branch breaks resource embeds in doc #2387

pushfoo opened this issue Oct 4, 2024 · 3 comments

Comments

@pushfoo
Copy link
Member

pushfoo commented Oct 4, 2024

Bug Report

Actual behavior:

Audio and music resource embeds for the doc are broken for arcade <= 2.6.17 because resource listing embeds always reference the development branch.

Expected behavior:

Resource embeds point to an appropriate release tag URL.

Why this matters

TL;DR: Long-term reliability for Arcade release doc.

This affects:

  1. The current arcade <= 2.6.17 doc (we moved resources for 3.0)
  2. The EOL 2.6.18 release discussed in the comments of Latest arcade 2.6.17 requires pyglet 2.0.dev23 #2358:
    • It exists to help existing 2.6 projects keep working
    • It will have warnings that 3.0 is imminent + links to upgrade URLs
    • It will be superseded by 3.0 shortly after
  3. 3.0+ (once we release new versions)

Steps to reproduce/example code:

  1. Go to https://api.arcade.academy/en/latest/resources.html?highlight=resources#id22
  2. Observe that all the sound and music embeds are broken

Root cause

See the following line:

RESOURCE_URL = "https://github.com/pythonarcade/arcade/blob/development/{}?raw=true"

Proposed Fix

Update our doc build to use the following logic:

  1. Detect our Arcade version
  2. Does a matching git tag exist on GitHub?
    • Yes: Use a tag-based URL (Example: https://github.com/pythonarcade/arcade/blob/2.6.17/arcade/resources/music/funkyrobot.mp3)
    • No: default to development branch
  3. Write base URL to an env variable or temp file to simplify passing data between scripts?
  4. Update create_resources_listing.py to use the selected base URL for embeds
@pushfoo pushfoo changed the title Resource listing page embeds will break when resources are moved or deleted Resource listing page embeds broken by moved or deleted resources in development branch Oct 4, 2024
@pushfoo pushfoo changed the title Resource listing page embeds broken by moved or deleted resources in development branch Changing development branch breaks resource embeds in prior doc versions Oct 4, 2024
@pushfoo
Copy link
Member Author

pushfoo commented Oct 4, 2024

Update:

  1. There's a rough fix for the 2.6-py-312 branch.
  2. Work on the development will come after since:
    • It requires a bit of a different approach
    • I want to validate our changes / prepare 3.0-related doc beforehand

@pushfoo pushfoo changed the title Changing development branch breaks resource embeds in prior doc versions Changing development branch breaks resource embeds in doc Oct 4, 2024
@pushfoo pushfoo added this to the 3.0 mandatory milestone Oct 4, 2024
@pushfoo
Copy link
Member Author

pushfoo commented Oct 16, 2024

There's still some lingering weirdness with this I need to fix.

@pushfoo
Copy link
Member Author

pushfoo commented Oct 16, 2024

Nvm, looks like a caching issue. @ everyone else, pls confirm the page has no broken embeds on your end.

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

No branches or pull requests

1 participant