-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[expo-updates] rename Update.metadata -> Update.manifest #12818
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The review previously left here is no longer valid, jump to the latest one 👉 #12818 (review)
It looks like the code that looked for a field named @jkhales Relatedly, was the name |
cdf99b6
to
a78eb4c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The review previously left here is no longer valid, jump to the latest one 👉 #12818 (review)
This is a little bit tangled because in my original database schema design, this column was intended for a field named The bare manifest was the only type of manifest still storing the value of a Reading @ide 's comment, I think there are three separate questions to resolve here:
My current opinions are:
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put up PR to change updateMetadata
-> metadata
OK, sounds like we're on the same page. These answers for (1) and (3) are what this PR implements for bare manifests, so I'll land it once CI finishes. Re: changing And re: making the embedded manifest format closer to a downloaded one -- we could do that, though there are a number of differences that have to be there. For example, |
a78eb4c
to
20821f5
Compare
I think the answer to this would be to support non-HTTP URLs like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi there! 👋 I'm a bot whose goal is to ensure your contributions meet our guidelines.
Looks like I have nothing to complain about 👏 Keep up the good work! 💪
Generated by ExpoBot 🤖 against 20821f5
@@ -19,7 +19,6 @@ class BareManifest private constructor( | |||
private val mScopeKey: String, | |||
private val mCommitTime: Date, | |||
private val mRuntimeVersion: String, | |||
private val mMetadata: JSONObject?, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we do want to copy the metadata over eventually, what do you think about reverting these changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the discussion above, I don't think we ever want to store just the manifest's (theoretical) metadata
field in the database separately from the raw manifest, which is already its own separate field in this class (and constructor). Maybe I'm misunderstanding what you're asking though? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I see. I was thinking we might want BareManifest.metadata
to be defined or for there to be a way to get the metadata directly from an UpdateEntity. But it looks like we don't need either of those.
In order to do that, we need to come up with a URL scheme/protocol for files stored in |
Yup, had already started on it. tbh probably should have waited to finish it before merging the [edit] stacked a PR on top of this one. Will rebase and ask for your review once you merge this one. #12831 |
@@ -19,7 +19,6 @@ class BareManifest private constructor( | |||
private val mScopeKey: String, | |||
private val mCommitTime: Date, | |||
private val mRuntimeVersion: String, | |||
private val mMetadata: JSONObject?, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I see. I was thinking we might want BareManifest.metadata
to be defined or for there to be a way to get the metadata directly from an UpdateEntity. But it looks like we don't need either of those.
Why
Follow-up to #12768 (comment)
How
update.metadata
andmetadata:
withupdate.manifest
andmanifest:
; manually modify a few more places in EXUpdatesUpdate.h/.m. Project-wide search ofmetadata
to ensure no other relevant usages were missed.I also changed the logic for embedded (bare) updates slightly; previously we looked for a field in the manifest called
metadata
and stored that in the db column, but we never actually had that field, so I've just removed that logic entirely.To be clear, this doesn't change anything about current behavior; we store no manifest for embedded updates both before and after this PR. But it does open up the question -- should we be storing the embedded/bare manifest for embedded updates? My thinking is no, because it is so different from the format of both legacy and new updates, that manifest consumers (dev client, any developer using Constants.manifest/Updates.manifest, etc.) are better served handling a null/empty case than explicitly having to handle multiple possible formats. And the manifest for any embedded update is of no use unless it's the update that's embedded in the currently installed build -- in which case the manifest is available on disk. Open to other thoughts though!
Test Plan
All unit tests pass; also ran Expo Go builds on each platform and verified that the versioned Updates module methods work. ✅
Checklist
expo build
(eg: updated@expo/xdl
).expo prebuild
& EAS Build (eg: updated a module plugin).