Skip to content

Conversation

@relaxolotl
Copy link
Contributor

We've started getting some info on apps that have multiple build bundles, and it looks like one way this can happen is when an app has app clips. Build bundles for app clips don't really contain any useful info (ie a majority of their attributes are empty) which makes sense; they're just a fancy link to the application and shouldn't contain any real logic. This filters the build bundles for app clips out.

@relaxolotl relaxolotl requested review from a team and flub November 1, 2021 22:15
Copy link
Contributor

@Swatinem Swatinem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch!

if safe.get_path(app_bundle, "attributes", "bundleType", default="APP") != "APP_CLIP"
]

if len(bundles) == 0:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if len(bundles) == 0:
if len(app_bundles) == 0:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You folks really need to get used to the python notation of

Suggested change
if len(bundles) == 0:
if not app_bundles:

In python using len() is not more explicit in this case.

Copy link
Contributor

@flub flub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC app clips are part of the app itself, so they get compiled. I've not found any information on whether they should ever have any dSYMs so am a bit uncomfortable for now assuming they don't. The example we have so far is exclusively for a single project, that's not much sample size.

Given we only query VALID builds currently (and not PENDING) I'm more tempted to instead accept a clip as 2nd buildBundle, see if it has a dSYM URL and download it as well if so.

I'd still keep the strategy of learning more about how this works by creating sentry errors for things we don't know. So I'd like to keep getting sentry errors for:

  • multiple buildBundles where it is not one app and one app clip
  • an APP_CLIP buildBundle which has a dSYM URL (even though we'd already download it)

if safe.get_path(app_bundle, "attributes", "bundleType", default="APP") != "APP_CLIP"
]

if len(bundles) == 0:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You folks really need to get used to the python notation of

Suggested change
if len(bundles) == 0:
if not app_bundles:

In python using len() is not more explicit in this case.

@relaxolotl
Copy link
Contributor Author

@flub I think that's fair - I also think that we should probably talk to the mobile team about getting app clips set up for our test data so we can play with these a little.

I'm still a little skeptical about app clips having their own dSYMs, or at least we should really investigate this because it's unclear to me how we would associate those dSYMs with their respective app clips, much less the app's dSYMs with the app clip if that's necessary.

Given that app clips don't seem to exist in isolation separate from apps seeing as builds (not bundles) don't have an attribute to differentiate between app clips and apps, what does it mean for them to crash or throw errors? Are they essentially their own applications with their own dSYMs as far as we're concerned? Does this remotely match the way they're presented in Apple's schema?

Regardless, I'm fine with keeping the things the way they are for now and just observing whatever it is that rolls in. I do think we should be setting up our own testing for this stuff if it isn't too much work, though.

@relaxolotl relaxolotl marked this pull request as draft November 2, 2021 23:04
@flub
Copy link
Contributor

flub commented Nov 3, 2021

@relaxolotl I've created NATIVE-362 to track this

@flub
Copy link
Contributor

flub commented Nov 5, 2021

So for now handling multiple dSYM URLs is still a pain. I've instead added an assertion to be notified if your suspicion that app clips do not have dSYMs proves to be wrong. I think that's reasonable.

@relaxolotl
Copy link
Contributor Author

gotta patch up a typing thing from the lambda and i'll merge this friend

@relaxolotl relaxolotl deleted the appconnect/filter-out-clips branch November 5, 2021 18:13
@github-actions github-actions bot locked and limited conversation to collaborators Nov 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants