WAI
Status Update
Comments
sg...@google.com <sg...@google.com> #2
The most important part is that this metadata should be visible from task list log (ee.data.listOperations) so I could use it for my purposes
ch...@opera.com <ch...@opera.com> #3
Thanks for the suggestion. If the string size limit was relaxed for the description
field would that work for you purpose?
sg...@google.com <sg...@google.com> #4
That's sounds like a great start!
We will need around 300 characters for saving our metadata on the description field:
- full file path in gcp: The destination file path in the gpc appears partially only on success flows, so we need to add it explicitly to the description.
- our own metadata
We will need around 300 characters for saving our metadata on the description field:
- full file path in gcp: The destination file path in the gpc appears partially only on success flows, so we need to add it explicitly to the description.
- our own metadata
ch...@opera.com <ch...@opera.com> #5
It would be helpful to have a parent task/run ID as an operation property, if user-set attributes are not possible. Perhaps inferred by IP address of client combined with the short request interval - i.e. a client submits one task every 2 seconds for 80 seconds, group these as one "run", 4 minutes of inactivity pass and additional tasks are submitted 2 seconds apart for 45 seconds, this becomes a distinct "run" --> return the hash-ID of these runs after a timeout interval. This would allow the user to filter operations based on the instance of their script that is responsible for a set of related pending tasks.
Example Use Case: I divide up all of my spatial reduction operations into batches using the number of individual features from a featureCollection as the numerator. I can assign an arbitrary denominator (batch size) that subsets the featureCollection into smaller tasks to balance computation/memory load and stay within limits while respecting the 3,000-task cap. Then I will monitor running/pending tasks by periodically querying operations, in order to trigger additional downstream work once all computation is complete. If one task fails, my entire run needs to be abandoned and reconfigured around whatever caused the error. Currently I must manually check for failed tasks as I do not want to request all tasks in history, but setting a time boundary is impractical as some runs can take 10 minutes, and others can take many hours, up to a day or more.
Benefit: If this feature was implemented, I could use the parent task/run ID to cancel all related operations. Less tedious that tracking individual task by 'name'
Additional benefit: In this case I am only concerned about the status of tasks in the aggregate - had I the ability I would query periodically the status of the parent task and if ANY child task has failed, terminate all others. If ALL child tasks have succeeded, move on to next step.
Additional benefit: This would allow multiple devs (we pay for 2 seats) to monitor only their own tasks, irrespective of the other's workflow.
I hope what I have described here is clear and I'm happy to discuss further. I did not want to open a new ticket because this issue sounded sufficiently alike - my apologies if this is too distinct from OP's issue.
Example Use Case: I divide up all of my spatial reduction operations into batches using the number of individual features from a featureCollection as the numerator. I can assign an arbitrary denominator (batch size) that subsets the featureCollection into smaller tasks to balance computation/memory load and stay within limits while respecting the 3,000-task cap. Then I will monitor running/pending tasks by periodically querying operations, in order to trigger additional downstream work once all computation is complete. If one task fails, my entire run needs to be abandoned and reconfigured around whatever caused the error. Currently I must manually check for failed tasks as I do not want to request all tasks in history, but setting a time boundary is impractical as some runs can take 10 minutes, and others can take many hours, up to a day or more.
Benefit: If this feature was implemented, I could use the parent task/run ID to cancel all related operations. Less tedious that tracking individual task by 'name'
Additional benefit: In this case I am only concerned about the status of tasks in the aggregate - had I the ability I would query periodically the status of the parent task and if ANY child task has failed, terminate all others. If ALL child tasks have succeeded, move on to next step.
Additional benefit: This would allow multiple devs (we pay for 2 seats) to monitor only their own tasks, irrespective of the other's workflow.
I hope what I have described here is clear and I'm happy to discuss further. I did not want to open a new ticket because this issue sounded sufficiently alike - my apologies if this is too distinct from OP's issue.
ch...@opera.com <ch...@opera.com> #6
Hi, are there any workarounds for this issue?
sg...@google.com <sg...@google.com> #7
If you enable core library desugaring in the feature module as well the issue related to core library desugaring goes away.
diff --git a/features/dynamicfeature/build.gradle.kts b/features/dynamicfeature/build.gradle.kts
index 61d2eb6..774b8b5 100644
--- a/features/dynamicfeature/build.gradle.kts
+++ b/features/dynamicfeature/build.gradle.kts
@@ -21,13 +21,18 @@ android {
}
compileOptions {
+ isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
+ kotlinOptions {
+ jvmTarget = "17"
+ }
}
dependencies {
implementation(project(":app"))
+ coreLibraryDesugaring(libs.android.tools.desugarJdk)
implementation(libs.avro)
With that change the app still crash during startup, but looks as if the avro code is running and hitting an app issue:
1-13 05:06:43.286 901 1168 E ActivityControllerCore: PROCESS CRASHED
11-13 05:06:43.286 901 1168 E ActivityControllerCore: processName: com.example.desugar_issues_sample
11-13 05:06:43.286 901 1168 E ActivityControllerCore: pid: 20502
11-13 05:06:43.286 901 1168 E ActivityControllerCore: shortMsg: org.apache.avro.SchemaParseException
11-13 05:06:43.286 901 1168 E ActivityControllerCore: longMsg: org.apache.avro.SchemaParseException: No name in schema: {"type":"record"}
11-13 05:06:43.286 901 1168 E ActivityControllerCore: timeMillis: 1731503203285
11-13 05:06:43.286 901 1168 E ActivityControllerCore: stackTrace:
11-13 05:06:43.286 901 1168 E ActivityControllerCore: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.desugar_issues_sample/com.example.dynamicfeature.FeatureActivity}: org.apache.avro.SchemaParseException: No name in schema: {"type":"record"}
11-13 05:06:43.286 901 1168 E ActivityControllerCore: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3707)
11-13 05:06:43.286 901 1168 E ActivityControllerCore: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3864)
11-13 05:06:43.286 901 1168 E ActivityControllerCore: at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
11-13 05:06:43.286 901 1168 E ActivityControllerCore: at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
11-13 05:06:43.286 901 1168 E ActivityControllerCore: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
11-13 05:06:43.286 901 1168 E ActivityControllerCore: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2253)
11-13 05:06:43.286 901 1168 E ActivityControllerCore: at android.os.Handler.dispatchMessage(Handler.java:106)
11-13 05:06:43.286 901 1168 E ActivityControllerCore: at android.os.Looper.loopOnce(Looper.java:201)
11-13 05:06:43.286 901 1168 E ActivityControllerCore: at android.os.Looper.loop(Looper.java:288)
11-13 05:06:43.286 901 1168 E ActivityControllerCore: at android.app.ActivityThread.main(ActivityThread.java:7870)
11-13 05:06:43.286 901 1168 E ActivityControllerCore: at java.lang.reflect.Method.invoke(Native Method)
11-13 05:06:43.286 901 1168 E ActivityControllerCore: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
11-13 05:06:43.286 901 1168 E ActivityControllerCore: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
11-13 05:06:43.286 901 1168 E ActivityControllerCore: Caused by: org.apache.avro.SchemaParseException: No name in schema: {"type":"record"}
11-13 05:06:43.286 901 1168 E ActivityControllerCore: at org.apache.avro.Schema.getRequiredText(SourceFile:30)
11-13 05:06:43.286 901 1168 E ActivityControllerCore: at org.apache.avro.Schema.parse(SourceFile:18)
11-13 05:06:43.286 901 1168 E ActivityControllerCore: at org.apache.avro.Schema$Parser.parse(SourceFile:14)
11-13 05:06:43.286 901 1168 E ActivityControllerCore: at org.apache.avro.Schema$Parser.parse(SourceFile:7)
11-13 05:06:43.286 901 1168 E ActivityControllerCore: at com.example.dynamicfeature.FeatureActivity.onCreate(SourceFile:11)
11-13 05:06:43.286 901 1168 E ActivityControllerCore: at android.app.Activity.performCreate(Activity.java:8057)
11-13 05:06:43.286 901 1168 E ActivityControllerCore: at android.app.Activity.performCreate(Activity.java:8037)
11-13 05:06:43.286 901 1168 E ActivityControllerCore: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1341)
11-13 05:06:43.286 901 1168 E ActivityControllerCore: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3688)
11-13 05:06:43.286 901 1168 E ActivityControllerCore: ... 12 more
sg...@google.com <sg...@google.com> #8
Mentioned this to the AGP team, and they will consider a warning or error. The current architecture unfortunately does not support for making it automatic.
ch...@opera.com <ch...@opera.com> #9
Okey, thank you very much for the help!
Description
AndroidRuntime: Caused by: java.lang.LinkageError: Method java.lang.Object org.apache.avro.JsonProperties$2.compute(java.lang.Object, java.util.function.BiFunction) overrides final method in class Lj$/util/concurrent/ConcurrentHashMap; (declaration of 'org.apache.avro.JsonProperties$2' appears in /data/app/~~pzeRFX6sSVQiNh58MIFr-w==/com.opera.android-SUf80u-ovVc5aCzrQuoNTA==/base.apk!classes14.dex)
AndroidRuntime: at org.apache.avro.JsonProperties.<init>(OperaSrc:2)
AndroidRuntime: at org.apache.avro.Schema.<init>(OperaSrc:10)
AndroidRuntime: at org.apache.avro.Schema$NamedSchema.<init>(OperaSrc:1)
AndroidRuntime: at org.apache.avro.Schema$RecordSchema.<init>(OperaSrc:1)
AndroidRuntime: at org.apache.avro.Schema.parse(OperaSrc:51)
AndroidRuntime: at org.apache.avro.Schema$Parser.parse(OperaSrc:14)
AndroidRuntime: at org.apache.avro.Schema$Parser.parse(OperaSrc:7)
AndroidRuntime: at org.apache.avro.Schema$Parser.parse(OperaSrc:6)
The desugared implementation has two issues:
1. JsonProperties$2 implements j$.util.concurrent.ConcurrentMap, however j$.util.concurrent.ConcurrentMap is undefined
2. As the crash stack indicates, it wrongly overrides final methods in j$/util/concurrent/ConcurrentHashMap
Please check the original file and the implementation after being desugared, thanks!
class AnonymousClass2 extends ConcurrentHashMap<String, JsonNode> ======> class AnonymousClass2 extends ConcurrentHashMap<String, JsonNode> implements j$.util.concurrent.ConcurrentMap
AGP version: 8.7.2