Skip to content

Commit

Permalink
feat: SQDSDKS-5723 - Remove custom attributes limit to MPEvents. (#456)
Browse files Browse the repository at this point in the history
* 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 <v-mvanderouw@mparticle.com>

---------

Signed-off-by: markvdouw <v-mvanderouw@mparticle.com>
  • Loading branch information
markvdouw authored Dec 13, 2023
1 parent 9706ded commit a533731
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 7 deletions.
29 changes: 28 additions & 1 deletion .github/workflows/cross-platform-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,48 @@ jobs:
uses: actions/checkout@v3
with:
repository: mParticle/crossplatform-sdk-tests

- name: "Checkout Android SDK Branch"
uses: actions/checkout@v3
with:
repository: ${{github.event.pull_request.head.repo.full_name}}
ref: ${{github.head_ref}}
path: .sdks/android

- name: Gradle cache
uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a #v2.9.0

- name: AVD cache
uses: actions/cache@v3
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-cache

- name: create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #v2.28.0
with:
api-level: 29
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: echo "Generated AVD snapshot for caching."

- name: "Install JDK 11"
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "11"
- name: "Run Crossplatform Tests"
uses: reactivecircus/android-emulator-runner@b35b1c6e6921ebfd3f980c2236ac298f019df53a #v2.28.0
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #v2.28.0
with:
api-level: 29
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: ./gradlew runAndroid
- name: "Archive Test Results"
if: ${{ always() }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public static void setMaxMessagePerBatch(int max) {
// preferences persistence
public static final String PREFS_FILE = "mParticlePrefs";

public static final int LIMIT_ATTR_COUNT = 100;
public static final int LIMIT_ATTR_KEY = 256;
public static final int LIMIT_ATTR_VALUE = 4096;
public static final int LIMIT_MAX_MESSAGE_SIZE = 100 * 1024;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -719,11 +719,6 @@ public static Boolean setCheckedAttribute(JSONObject attributes, String key, Obj
if (caseInsensitive) {
key = findCaseInsensitiveKey(attributes, key);
}

if (Constants.LIMIT_ATTR_COUNT == attributes.length() && !attributes.has(key)) {
Logger.error("Attribute count exceeds limit. Discarding attribute: " + key);
return false;
}
if (value != null) {
String stringValue = value.toString();
if (stringValue.length() > Constants.LIMIT_ATTR_VALUE) {
Expand Down

0 comments on commit a533731

Please sign in to comment.