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

Bump Android SDK target to 33 #2246

Merged
merged 1 commit into from
Nov 1, 2022
Merged

Bump Android SDK target to 33 #2246

merged 1 commit into from
Nov 1, 2022

Conversation

rvandermeulen
Copy link
Contributor

No description provided.

@rvandermeulen rvandermeulen force-pushed the api_33 branch 2 times, most recently from d8a5e2b to b90643d Compare October 28, 2022 01:02
@rvandermeulen
Copy link
Contributor Author

The robolectric bump is needed for API 33 support. Looks like there's a few test failures still:

Data recorded before Glean inits must not get into overdue pings

java.lang.AssertionError: A scheduled mozac_service_glean_ping_upload_worker must exist
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at mozilla.telemetry.glean.TestUtilKt.triggerWorkManager(TestUtil.kt:209)
	at mozilla.telemetry.glean.scheduler.MetricsPingSchedulerTest.Data recorded before Glean inits must not get into overdue pings(MetricsPingSchedulerTest.kt:765)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.robolectric.RobolectricTestRunner$HelperTestRunner$1.evaluate(RobolectricTestRunner.java:580)
	at org.robolectric.internal.SandboxTestRunner$2.lambda$evaluate$2(SandboxTestRunner.java:287)
	at org.robolectric.internal.bytecode.Sandbox.lambda$runOnMainThread$0(Sandbox.java:99)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
	Suppressed: org.robolectric.android.internal.AndroidTestEnvironment$UnExecutedRunnablesException: Main looper has queued unexecuted runnables. This might be the cause of the test failure. You might need a shadowOf(Looper.getMainLooper()).idle() call.

Glean must preserve lifetime application metrics across runs

java.lang.AssertionError: A scheduled mozac_service_glean_ping_upload_worker must exist
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at mozilla.telemetry.glean.TestUtilKt.triggerWorkManager(TestUtil.kt:209)
	at mozilla.telemetry.glean.scheduler.MetricsPingSchedulerTest.Glean must preserve lifetime application metrics across runs(MetricsPingSchedulerTest.kt:844)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.robolectric.RobolectricTestRunner$HelperTestRunner$1.evaluate(RobolectricTestRunner.java:580)
	at org.robolectric.internal.SandboxTestRunner$2.lambda$evaluate$2(SandboxTestRunner.java:287)
	at org.robolectric.internal.bytecode.Sandbox.lambda$runOnMainThread$0(Sandbox.java:99)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
	Suppressed: org.robolectric.android.internal.AndroidTestEnvironment$UnExecutedRunnablesException: Main looper has queued unexecuted runnables. This might be the cause of the test failure. You might need a shadowOf(Looper.getMainLooper()).idle() call.

collectMetricsPing must correctly trigger the collection of the metrics ping

java.lang.AssertionError: A scheduled mozac_service_glean_ping_upload_worker must exist
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at mozilla.telemetry.glean.TestUtilKt.triggerWorkManager(TestUtil.kt:209)
	at mozilla.telemetry.glean.scheduler.MetricsPingSchedulerTest.collectMetricsPing must correctly trigger the collection of the metrics ping(MetricsPingSchedulerTest.kt:281)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.robolectric.RobolectricTestRunner$HelperTestRunner$1.evaluate(RobolectricTestRunner.java:580)
	at org.robolectric.internal.SandboxTestRunner$2.lambda$evaluate$2(SandboxTestRunner.java:287)
	at org.robolectric.internal.bytecode.Sandbox.lambda$runOnMainThread$0(Sandbox.java:99)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
	Suppressed: org.robolectric.android.internal.AndroidTestEnvironment$UnExecutedRunnablesException: Main looper has queued unexecuted runnables. This might be the cause of the test failure. You might need a shadowOf(Looper.getMainLooper()).idle() call.

@rvandermeulen
Copy link
Contributor Author

IIUC, this is dying in code that was effectively a workaround for old WorkManager bugs? Is it possible we can just try removing the workaround?

@badboy
Copy link
Member

badboy commented Oct 31, 2022

It doesn't fail for me locally, so this might warrant a closer look again on what's actually going on.

@badboy
Copy link
Member

badboy commented Oct 31, 2022

see. Second run of it on CircleCI went fine :D -- now I'm even more confused, but I'd be okay with merging and handling upcoming failures as followups.

@rvandermeulen
Copy link
Contributor Author

rvandermeulen commented Nov 1, 2022

Weird, looks like android-build-pr is green now too. The rust-beta-tests failure looks unrelated to this change, but I don't have scopes to rerun the failed job to prove it.

@rvandermeulen rvandermeulen marked this pull request as ready for review November 1, 2022 13:54
@rvandermeulen rvandermeulen requested a review from a team as a code owner November 1, 2022 13:54
@rvandermeulen rvandermeulen requested review from rosahbruno and removed request for a team November 1, 2022 13:54
@badboy
Copy link
Member

badboy commented Nov 1, 2022

Weird, looks like android-build-pr is green now too. The rust-beta-tests failure looks unrelated to this change, but I don't have scopes to rerun the failed job to prove it.

yeah, the beta test is unrelated (and not required, I'm fixing it over in #2250 )

@badboy badboy merged commit f2fa3ff into mozilla:main Nov 1, 2022
@rvandermeulen rvandermeulen deleted the api_33 branch December 15, 2022 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants