Skip to content

Commit 32c788e

Browse files
markvdouweinsteinx2
authored andcommitted
feat: SQDSDKS-5723 - Remove custom attributes limit to MPEvents. (#456)
* Remove custom attributes limit to MPEvents. No need to remove user attribute limit since it wasn't implemented. Other limits (key and value length for user and custom attributes) remaing the same. * Update cross-platform-tests.yml Updaing script Signed-off-by: markvdouw <[email protected]> --------- Signed-off-by: markvdouw <[email protected]>
1 parent f239ba8 commit 32c788e

File tree

3 files changed

+28
-7
lines changed

3 files changed

+28
-7
lines changed

.github/workflows/cross-platform-tests.yml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,48 @@ jobs:
1010
uses: actions/checkout@v3
1111
with:
1212
repository: mParticle/crossplatform-sdk-tests
13+
1314
- name: "Checkout Android SDK Branch"
1415
uses: actions/checkout@v3
1516
with:
1617
repository: ${{github.event.pull_request.head.repo.full_name}}
1718
ref: ${{github.head_ref}}
1819
path: .sdks/android
20+
21+
- name: Gradle cache
22+
uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a #v2.9.0
23+
24+
- name: AVD cache
25+
uses: actions/cache@v3
26+
id: avd-cache
27+
with:
28+
path: |
29+
~/.android/avd/*
30+
~/.android/adb*
31+
key: avd-cache
32+
33+
- name: create AVD and generate snapshot for caching
34+
if: steps.avd-cache.outputs.cache-hit != 'true'
35+
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #v2.28.0
36+
with:
37+
api-level: 29
38+
force-avd-creation: false
39+
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
40+
disable-animations: false
41+
script: echo "Generated AVD snapshot for caching."
42+
1943
- name: "Install JDK 11"
2044
uses: actions/setup-java@v3
2145
with:
2246
distribution: "zulu"
2347
java-version: "11"
2448
- name: "Run Crossplatform Tests"
25-
uses: reactivecircus/android-emulator-runner@b35b1c6e6921ebfd3f980c2236ac298f019df53a #v2.28.0
49+
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #v2.28.0
2650
with:
2751
api-level: 29
52+
force-avd-creation: false
53+
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
54+
disable-animations: true
2855
script: ./gradlew runAndroid
2956
- name: "Archive Test Results"
3057
if: ${{ always() }}

android-core/src/main/java/com/mparticle/internal/Constants.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public static void setMaxMessagePerBatch(int max) {
3636
// preferences persistence
3737
public static final String PREFS_FILE = "mParticlePrefs";
3838

39-
public static final int LIMIT_ATTR_COUNT = 100;
4039
public static final int LIMIT_ATTR_KEY = 256;
4140
public static final int LIMIT_ATTR_VALUE = 4096;
4241
public static final int LIMIT_MAX_MESSAGE_SIZE = 100 * 1024;

android-core/src/main/java/com/mparticle/internal/MPUtility.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -719,11 +719,6 @@ public static Boolean setCheckedAttribute(JSONObject attributes, String key, Obj
719719
if (caseInsensitive) {
720720
key = findCaseInsensitiveKey(attributes, key);
721721
}
722-
723-
if (Constants.LIMIT_ATTR_COUNT == attributes.length() && !attributes.has(key)) {
724-
Logger.error("Attribute count exceeds limit. Discarding attribute: " + key);
725-
return false;
726-
}
727722
if (value != null) {
728723
String stringValue = value.toString();
729724
if (stringValue.length() > Constants.LIMIT_ATTR_VALUE) {

0 commit comments

Comments
 (0)