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

Re-write proxy server to use per-revision config #285

Closed
eseidel opened this issue Apr 13, 2023 · 3 comments · Fixed by #340
Closed

Re-write proxy server to use per-revision config #285

eseidel opened this issue Apr 13, 2023 · 3 comments · Fixed by #340
Assignees

Comments

@eseidel
Copy link
Contributor

eseidel commented Apr 13, 2023

We could delete the central config for the proxy server and instead make it per-revision config.

This would just mean we upload download.shorebird.dev/$revision/engine.version or similar that gives us an id that we're mapping back to.

The proxy server would then cache these mappings in memory.

@eseidel
Copy link
Contributor Author

eseidel commented Apr 17, 2023

Proposal:

// Keeps a (fixed size) LRU cache of recently requested shorebird versions.
// First time it sees a new engine version it makes a request to storage
// for $shorebird/manifest.yaml.
// If that fails, it records and entry in the cache noting that's an invalid
// version.
// If it succeeds it records the version in the cache and returns it.

manifest.yaml:

shorebird_engine_revision: e6a2a5a43973430d9f038cd81cb1779b6b404909
flutter_engine_revision: ec975089acb540fc60752606a3d3ba809dd1528b
artifact_overrides:
  # artifacts.zip
  - flutter_infra_release/flutter/$engine/android-arm-64-release/artifacts.zip
  - flutter_infra_release/flutter/$engine/android-arm-release/artifacts.zip
  - flutter_infra_release/flutter/$engine/android-x64-release/artifacts.zip
  # embedding release
  - download.flutter.io/io/flutter/flutter_embedding_release/1.0.0-$engine/flutter_embedding_release-1.0.0-$engine.pom
  - download.flutter.io/io/flutter/flutter_embedding_release/1.0.0-$engine/flutter_embedding_release-1.0.0-$engine.jar
  # arm64_v8a release
  - download.flutter.io/io/flutter/arm64_v8a_release/1.0.0-$engine/arm64_v8a_release-1.0.0-$engine.pom
  - download.flutter.io/io/flutter/arm64_v8a_release/1.0.0-$engine/arm64_v8a_release-1.0.0-$engine.jar
  # armeabi_v7a release
  - download.flutter.io/io/flutter/armeabi_v7a_release/1.0.0-$engine/armeabi_v7a_release-1.0.0-$engine.pom
  - download.flutter.io/io/flutter/armeabi_v7a_release/1.0.0-$engine/armeabi_v7a_release-1.0.0-$engine.jar
  # x86_64 release
  - download.flutter.io/io/flutter/x86_64_release/1.0.0-$engine/x86_64_release-1.0.0-$engine.pom
  - download.flutter.io/io/flutter/x86_64_release/1.0.0-$engine/x86_64_release-1.0.0-$engine.jar

Thoughts?

@eseidel
Copy link
Contributor Author

eseidel commented Apr 17, 2023

One problem with this plan is that we need to know what the urls look like to be able to find ones with engine versions in them. So we'll need some regexps. :(

@eseidel
Copy link
Contributor Author

eseidel commented Apr 17, 2023

Which again gets back to we may need to know what all urls from flutter_tools look like. If we did we could then 404 on urls we don't expect which might help catching missed redirects later (or underlying tool changes causing it to not fetch the urls we expect it to).

@felangel felangel self-assigned this Apr 19, 2023
@felangel felangel moved this from Todo to In Progress in 0.0.8: adding more TTs Apr 19, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in 0.0.8: adding more TTs Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants