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

api: On reaction events, stop assuming old user object is present #5912

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

chrisbobbe
Copy link
Contributor

Tested on an iPhone simulator, connected to CZO. Before this change, I saw the message list not updating on reaction events (as Greg highlighted in the chat thread). After this change, I saw the message list updating as expected when I added/removed reactions.

Fixes: #5911

@chrisbobbe
Copy link
Contributor Author

Hmm, CI failure:

Run android-actions/setup-android@v2
/usr/local/lib/android/sdk/cmdline-tools/latest/bin/sdkmanager cmdline-tools;7.0
Error: LinkageError occurred while loading main class com.android.sdklib.tool.sdkmanager.SdkManagerCli
	java.lang.UnsupportedClassVersionError: com/android/sdklib/tool/sdkmanager/SdkManagerCli has been compiled by a more recent version of the Java Runtime (class file version [6](https://github.com/chrisbobbe/zulip-mobile/actions/runs/12719855432/job/35460696276#step:4:7)1.0), this version of the Java Runtime only recognizes class file versions up to 55.0
/home/runner/work/_actions/android-actions/setup-android/v2/dist/index.js:2348
                error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);
                        ^

Error: The process '/usr/local/lib/android/sdk/cmdline-tools/latest/bin/sdkmanager' failed with exit code 1
    at ExecState._setResult (/home/runner/work/_actions/android-actions/setup-android/v2/dist/index.js:2348:25)
    at ExecState.CheckComplete (/home/runner/work/_actions/android-actions/setup-android/v2/dist/index.js:2331:18)
    at ChildProcess.<anonymous> (/home/runner/work/_actions/android-actions/setup-android/v2/dist/index.js:2225:2[7](https://github.com/chrisbobbe/zulip-mobile/actions/runs/12719855432/job/35460696276#step:4:8))
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)

Node.js v20.1[8](https://github.com/chrisbobbe/zulip-mobile/actions/runs/12719855432/job/35460696276#step:4:9).0

@gnprice
Copy link
Member

gnprice commented Jan 13, 2025

Thanks!

The commit looks good. I'll look into fixing that CI issue.

@chrisbobbe
Copy link
Contributor Author

Thanks! Yeah, I've looked at it a bit but not been able to diagnose yet; thanks for investigating.

The `user_id` field has been present in reaction events since Zulip
3.0 (FL 2), which is below our kMinAllowedServerVersion (4.0). See
API docs:
  https://zulip.com/api/get-events#reaction-add
  https://zulip.com/api/get-events#reaction-remove

Fixes: zulip#5911
@gnprice gnprice force-pushed the pr-reaction-events-user branch from f24cc47 to 7519372 Compare January 13, 2025 21:20
@gnprice
Copy link
Member

gnprice commented Jan 13, 2025

Rebased atop the merged #5914 to fix CI.

@chrisbobbe
Copy link
Contributor Author

Hmm another failure:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:packageDebug'.
> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
   > java.lang.OutOfMemoryError (no error message)

I'll try rerunning once before investigating. 🤷‍♂️

@gnprice
Copy link
Member

gnprice commented Jan 13, 2025

Looks like the rerun fixed it — mergng.

@gnprice
Copy link
Member

gnprice commented Jan 13, 2025

… Or I will when GitHub is working for me again:

$ git push
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I get the same error with a fetch, and in other repos, and from a different machine using a different SSH key.

@gnprice
Copy link
Member

gnprice commented Jan 13, 2025

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:packageDebug'.
> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
   > java.lang.OutOfMemoryError (no error message)

FTR if this recurs: the fix is to edit android/gradle.properties to allow using more memory. See 382e31f and 3677788.

The existing limit is 2 GiB, and if the build needs even more than that then that's kind of ridiculous… but 🤷.

@chrisbobbe
Copy link
Contributor Author

… Or I will when GitHub is working for me again:

Odd! Is it working now?

@gnprice
Copy link
Member

gnprice commented Jan 15, 2025

Ah, yep — it was down for most of an hour:
https://www.githubstatus.com/incidents/qd96yfgvmcf9
and I switched to other tasks in the meantime and forgot to follow up. Merging now, thanks.

@gnprice gnprice merged commit 7519372 into zulip:main Jan 15, 2025
1 check passed
@chrisbobbe chrisbobbe deleted the pr-reaction-events-user branch January 17, 2025 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

On reaction events use user_id, instead of old user object
2 participants