👨🔬️ Remote js-bundle downloading and refreshing#3595
Conversation
| </Text> | ||
|
|
||
| {loading ? ( | ||
| <Button disabled={true} title="Checking for artifacts…" /> |
There was a problem hiding this comment.
I used too many Button elements but I think we can simplify this and come up with another way to say what disabled, title, and onPress should be.
| <PushButtonCell onPress={this.onDebugButton} title="Debug" /> | ||
| <> | ||
| <PushButtonCell onPress={this.onDebugButton} title="Debug" /> | ||
| <PushButtonCell |
There was a problem hiding this comment.
Once the other "Debug Section" for settings is merged in, this will move into that file.
|
The Xcode project file changed. Maintainers, double-check the changes! This PR modified important files but does not have any changes to the CHANGELOG.
New dependencies added: react-native-dynamic-bundleAuthor: Maurits Dijkstra Description: Control which bundle is loaded from the Javascript side of your React Native app. Homepage: https://github.com/mauritsd/react-native-dynamic-bundle
|
| Created | almost 4 years ago |
| Last Updated | 3 months ago |
| License | MIT |
| Maintainers | 3 |
| Releases | 57 |
| Direct Dependencies | base-64 and utf8 |
| Keywords | react-component, react-native, ios, android, fs, filesystem, download, upload and file-transfer |
Big PR! We like to try and keep PRs under 400 lines, and this one was 687 lines.
|
TL;DR: This needs TLC and help. The core logic centers around fetching open GitHub pull requests and CircleCI artifacts. If we see an open GitHub PR, we look to fetch the output of those builds from CircleCI so that we may run them locally on-device. First, ideally, the heavy lifting of this core logic (checking and parsing of the APIs) would happen via ccc-server. As of now, this logic happens on the client app so that needs to be changed. Next, I'm unsure if the current logic is functioning properly. I am pretty sure it is broken on Android (it errors out), and is most likely broken on iOS. This will most likely sit in limbo for the time being. |
rye
left a comment
There was a problem hiding this comment.
@drewvolz, I think this PR will require a bit more backend work before we can get this ready for acceptance.
Do I have it right that this PR works for fetching, downloading, and inserting bundles? If not—can you just get it to that point? I want to be able to give it a URL (with the assumption that it is a valid bundle) and have it load the bundle.
The goal with CCC is to add a painless abstraction such that AAO and CARLS can all talk to the same endpoint, instead of making their requests directly to the various destinations, which shrinks the bundle down quite significantly and makes updating that logic less of a nightmare. CCC can thus be the source of bundle download lookups and such; we could add an endpoint to serve up a list of bundle URLs, or we could proxy the bundle downloads themselves.
GitHub Actions has an "artifacts" thing somewhat similar to Circle's, which we might be able to eventually use for our storage.
|
@rye I agree with you. This will require quite a bit more work. It’s not in a good state and needs a refactoring. |
Co-Authored-By: Kristofer Rye <kristofer.rye@gmail.com>
Co-Authored-By: Kristofer Rye <kristofer.rye@gmail.com>
This PR aims to grant us the ability to seamlessly switch between remote JS bundles built and hosted on CircleCI as artifacts.
The flow:
react-native-fsand save it to diskreact-native-dynamic-bundleResolves #3593
📸 Screenshots
Notes:
anytypes until I work up the courage to type out GitHub and CircleCI typesrestart()call is necessaryonReactContextInitialized)I really have only seen it work so far after switching the physical
AppDelegate.mandAppDelegate.hcode back to loading the other bridge... so this could be not working from what I can tell 🤷♀️