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

flutter-symbols upload doesn't support glob patterns for android-mapping-location #1413

Open
feinstein opened this issue Aug 8, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@feinstein
Copy link

Bug description

If I try to run

datadog-ci flutter-symbols upload \
  --service-name my_service \
  --android-mapping \
  --dart-symbols-location "$OBFUSCATION_OUTPUT_DIR" \
  --android-mapping-location build/**/outputs/**/mapping.txt \
  --version "$APP_VERSION+$APP_BUILD_NUMBER"

I get this error:

❌ Error: Could not locate Android Mapping file at build//outputs//mapping.txt.

But if I specify the full path for the mapping.txt it works fine.

I think the bug is in here: https:/DataDog/datadog-ci/blob/master/src/commands/flutter-symbols/upload.ts#L512, and this code already imports glob, so it should be an easy fix.

Describe what you expected

I expected to be able to provide globs in the android mapping location, as it can change depending on the flavor or artifact type (apk or appbundle) we are building.

Steps to reproduce the issue

No response

Additional context

No response

Command

flutter-symbols

@feinstein feinstein added the bug Something isn't working label Aug 8, 2024
@fuzzybinary
Copy link
Contributor

Hi @feinstein

The reason this is not supported is because it could result in resolving to multiple mapping files, which would not be valid. We could perform the glob lookup and warn you if you resolve to multiple mapping files, but that would be a feature request, not a bug.

Additionally, if you are uploading mapping files for different flavors under the same version, you must specify the flavor both to datadog-ci and during setup of Datadog in your Flutter app. Otherwise deobfuscation will not be able to determine the proper mapping file to use (and the second upload would be ignored).

Let me know if that makes sense and if you want to request that we still support globs in this way.

@fuzzybinary fuzzybinary added enhancement New feature or request and removed bug Something isn't working labels Aug 8, 2024
@feinstein
Copy link
Author

Hi @fuzzybinary, yes I think it makes sense.

I think I declared the flavor in the app, but how do I do it in the CI?

@fuzzybinary
Copy link
Contributor

For datadog-ci there's a parameter --flavor, which would be the same parameter you're specifying to flutter build (if that's how you're specifying flavor in the application at build time).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants