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

log go request and response #21218

Merged
merged 2 commits into from
Sep 17, 2024
Merged

Conversation

qfrank
Copy link
Contributor

@qfrank qfrank commented Sep 9, 2024

fixes #21176

this PR implemented logging request/response between status-mobile and status-go.

to access requests.log, shake your phone and share the logs.

TBD:

  • adding device id into request to proxy server, we can implement it in a separate PR if needed.
  • not sure if we need logging the request made in the backend that not asked by frontend directly

Testing notes

As the changes on the status-go side involve many existing endpoints exposed before, we need regression tests in all aspects.

Platforms

  • Android
  • iOS

status: ready

image

@qfrank qfrank self-assigned this Sep 9, 2024
@status-im-auto
Copy link
Member

status-im-auto commented Sep 9, 2024

Jenkins Builds

Click to see older builds (36)
Commit #️⃣ Finished (UTC) Duration Platform Result
1c85673 #1 2024-09-09 08:06:48 ~3 min tests 📄log
✔️ 1c85673 #1 2024-09-09 08:09:42 ~6 min android-e2e 🤖apk 📲
✔️ 1c85673 #1 2024-09-09 08:12:20 ~9 min android 🤖apk 📲
✔️ 1c85673 #1 2024-09-09 08:20:13 ~17 min ios 📱ipa 📲
a76bde7 #3 2024-09-09 08:30:50 ~3 min tests 📄log
✔️ a76bde7 #3 2024-09-09 08:34:04 ~6 min android-e2e 🤖apk 📲
✔️ a76bde7 #3 2024-09-09 08:36:24 ~9 min android 🤖apk 📲
✔️ a76bde7 #3 2024-09-09 08:45:16 ~17 min ios 📱ipa 📲
✔️ edf0911 #4 2024-09-09 11:55:12 ~4 min tests 📄log
✔️ edf0911 #4 2024-09-09 11:57:13 ~6 min android-e2e 🤖apk 📲
✔️ edf0911 #4 2024-09-09 11:59:12 ~8 min android 🤖apk 📲
✔️ edf0911 #4 2024-09-09 12:03:03 ~12 min ios 📱ipa 📲
✔️ f28b17d #6 2024-09-10 13:36:11 ~4 min tests 📄log
✔️ f28b17d #6 2024-09-10 13:39:26 ~7 min android-e2e 🤖apk 📲
✔️ f28b17d #6 2024-09-10 13:40:58 ~9 min android 🤖apk 📲
✔️ f28b17d #6 2024-09-10 13:49:37 ~17 min ios 📱ipa 📲
✔️ a63b132 #7 2024-09-11 07:22:02 ~4 min tests 📄log
✔️ a63b132 #7 2024-09-11 07:25:19 ~7 min android-e2e 🤖apk 📲
✔️ a63b132 #7 2024-09-11 07:26:42 ~9 min android 🤖apk 📲
✔️ a63b132 #7 2024-09-11 07:27:38 ~10 min ios 📱ipa 📲
✔️ a4502e4 #8 2024-09-12 01:57:09 ~4 min tests 📄log
✔️ a4502e4 #8 2024-09-12 01:59:14 ~6 min android-e2e 🤖apk 📲
✔️ a4502e4 #8 2024-09-12 02:00:55 ~8 min android 🤖apk 📲
✔️ a4502e4 #8 2024-09-12 02:02:26 ~9 min ios 📱ipa 📲
✔️ 746ba61 #10 2024-09-12 04:36:23 ~4 min tests 📄log
✔️ 746ba61 #10 2024-09-12 04:38:32 ~6 min android-e2e 🤖apk 📲
✔️ 746ba61 #10 2024-09-12 04:39:45 ~7 min android 🤖apk 📲
✔️ 746ba61 #10 2024-09-12 04:40:51 ~8 min ios 📱ipa 📲
ce76178 #11 2024-09-12 13:55:36 ~4 min tests 📄log
✔️ ce76178 #11 2024-09-12 13:58:55 ~7 min android-e2e 🤖apk 📲
✔️ ce76178 #11 2024-09-12 14:00:27 ~9 min android 🤖apk 📲
✔️ ce76178 #11 2024-09-12 14:04:24 ~13 min ios 📱ipa 📲
✔️ cf38339 #12 2024-09-13 02:58:01 ~4 min tests 📄log
✔️ cf38339 #12 2024-09-13 03:02:10 ~8 min android 🤖apk 📲
✔️ cf38339 #12 2024-09-13 03:03:40 ~10 min ios 📱ipa 📲
✔️ cf38339 #12 2024-09-13 03:05:17 ~11 min android-e2e 🤖apk 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ d545ae8 #13 2024-09-13 06:02:30 ~5 min tests 📄log
✔️ d545ae8 #13 2024-09-13 06:03:56 ~6 min android-e2e 🤖apk 📲
✔️ d545ae8 #13 2024-09-13 06:06:38 ~9 min android 🤖apk 📲
✔️ d545ae8 #13 2024-09-13 06:07:43 ~10 min ios 📱ipa 📲
✔️ be86ecd #14 2024-09-17 03:22:38 ~5 min tests 📄log
✔️ be86ecd #14 2024-09-17 03:24:12 ~6 min android-e2e 🤖apk 📲
✔️ be86ecd #14 2024-09-17 03:26:48 ~9 min android 🤖apk 📲
✔️ be86ecd #14 2024-09-17 03:27:32 ~10 min ios 📱ipa 📲

@qfrank qfrank force-pushed the feat/logging_rpc_request_response branch 2 times, most recently from ecdeec6 to a76bde7 Compare September 9, 2024 08:27
@qfrank qfrank force-pushed the feat/logging_rpc_request_response branch from a76bde7 to edf0911 Compare September 9, 2024 11:50
@churik churik self-assigned this Sep 10, 2024
@qfrank qfrank marked this pull request as ready for review September 10, 2024 13:20
@qfrank qfrank requested a review from jakubgs as a code owner September 10, 2024 13:20
@qfrank qfrank force-pushed the feat/logging_rpc_request_response branch 2 times, most recently from f28b17d to a63b132 Compare September 11, 2024 07:17
.env Outdated Show resolved Hide resolved
@qfrank qfrank force-pushed the feat/logging_rpc_request_response branch 2 times, most recently from a4502e4 to e0ec6d2 Compare September 12, 2024 04:29
@qfrank qfrank changed the title log RPC request and response log go request and response Sep 12, 2024
@status-im-auto
Copy link
Member

71% of end-end tests have passed

Total executed tests: 7
Failed tests: 2
Expected to fail tests: 0
Passed tests: 5
IDs of failed tests: 703133,727229 

Failed tests (2)

Click to expand
  • Rerun failed tests

  • Class TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133

    Device 1: Find `Button` by `accessibility id`: `show-profiles`
    Device 1: Tap on found: Button

    critical/chats/test_public_chat_browsing.py:243: in test_restore_multiaccount_with_waku_backup_remove_switch
        self.errors.verify_no_errors()
    base_test_case.py:191: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     zQ3...dWXh5 was not restored as a contact from waku backup!
    E    zQ3...Vacac was not restored as a contact from waku backup!
    E    admin_open was not restored from waku-backup!!
    E    member_open was not restored from waku-backup!!
    E    admin_closed was not restored from waku-backup!!
    E    member_closed was not restored from waku-backup!!
    



    Device sessions

    Class TestWalletMultipleDevice:

    1. test_wallet_send_eth, id: 727229

    Device 2: Find Text by xpath: //android.view.ViewGroup[@content-desc='container']/android.widget.TextView[@text='Ether']/../android.widget.TextView[3]
    Device 2: Text is 0.05519 ETH

    critical/test_wallet.py:159: in test_wallet_send_eth
        self.errors.verify_no_errors()
    base_test_case.py:191: in verify_no_errors
        pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
     Sender balance is not updated on Etherscan, it is 0.43 but expected to be 0.4302
    E    Receiver balance is not updated on Etherscan, it is 0.0552 but expected to be 0.0551
    



    Passed tests (5)

    Click to expand

    Class TestCommunityOneDeviceMerged:

    1. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    Class TestWalletOneDevice:

    1. test_wallet_add_remove_regular_account, id: 727231
    Device sessions

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_message_edit, id: 702843
    Device sessions

    Class TestWalletMultipleDevice:

    1. test_wallet_send_asset_from_drawer, id: 727230

    @churik
    Copy link
    Member

    churik commented Sep 12, 2024

    @qfrank
    🥇

    Thank you for this AMAZING work! DMd you for a very small fix, after that you can merge it. I checked that it is not logging requests in release / nightly, works as a charm

    @qfrank qfrank force-pushed the feat/logging_rpc_request_response branch 2 times, most recently from ce76178 to cf38339 Compare September 13, 2024 02:53
    @qfrank qfrank requested a review from siddarthkay September 16, 2024 11:56
    @qfrank qfrank force-pushed the feat/logging_rpc_request_response branch from d545ae8 to be86ecd Compare September 17, 2024 03:17
    @siddarthkay siddarthkay merged commit 699986c into develop Sep 17, 2024
    6 checks passed
    @siddarthkay siddarthkay deleted the feat/logging_rpc_request_response branch September 17, 2024 03:28
    "version": "v0.186.0",
    "commit-sha1": "b866640dc56471846f530e907d50a1df6df13ae0",
    "src-sha256": "0sw8z4f4f87k01qnpp8sk7sam4bkk77nn7pd5iggqchbmpzr6638"
    "version": "f859b58c3896523b2fb9a09b3e5c1cedb04f959b",
    Copy link
    Contributor

    @mohsen-ghafouri mohsen-ghafouri Sep 17, 2024

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    @qfrank just was checking around, shouldn't we have a tag for it?

    Copy link
    Member

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Yes, you should be using tags.

    Copy link
    Contributor

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    we merged because of bug in the tag script, I'll fix that script soon and update the v1 tag

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    Archived in project
    Development

    Successfully merging this pull request may close these issues.

    Implement Request Logging in status-go
    8 participants