Skip to content

Conversation

@jrainville
Copy link
Member

Cherry-pick of #7146

Needed for status-im/status-app#19377

For Android, we are setting the default path to empty string so that the user can know that they need to modify it. Otherwise, the default path was the datadir and users cannot access it.

What this meant is that once the auto-backup was happening, the status-go code worked, but then it failed because of the missing user permission.

To fix it, we just throw an error on empty paths in status-go. That way the backup just doesn't happen until the user selects a path.

@status-im-auto
Copy link
Member

status-im-auto commented Nov 26, 2025

Jenkins Builds

Click to see older builds (36)
Commit #️⃣ Finished (UTC) Duration Platform Result
d741bd5 #1 2025-11-26 20:00:13 ~2 min macos/status-go 📄log
✔️ d741bd5 #1 2025-11-26 20:03:31 ~5 min windows/status-go 📦zip
✔️ d741bd5 #1 2025-11-26 20:15:55 ~18 min linux/status-go 📦zip
✔️ d741bd5 #1 2025-11-26 20:20:47 ~22 min linux/nwaku 📦zip
✔️ d741bd5 #1 2025-11-26 20:30:15 ~32 min tests-rpc 📄log
d741bd5 #2 2025-11-26 20:38:14 ~37 sec macos/status-go 📄log
✖️ d741bd5 #1 2025-11-26 20:41:19 ~43 min tests 📄log
✔️ d741bd5 #2 2025-11-26 21:20:20 ~26 min tests 📄log
✔️ d741bd5 #3 2025-11-26 21:26:04 ~4 min macos/status-go 📦zip
✔️ 13c938a #4 2025-11-27 18:25:51 ~4 min macos/status-go 📦zip
✔️ 13c938a #2 2025-11-27 18:28:27 ~6 min windows/status-go 📦zip
✔️ 13c938a #2 2025-11-27 18:34:46 ~13 min linux/status-go 📦zip
✔️ 13c938a #2 2025-11-27 18:43:21 ~21 min linux/nwaku 📦zip
✖️ 13c938a #2 2025-11-27 18:48:27 ~26 min tests-rpc 📄log
✔️ 13c938a #3 2025-11-27 19:01:44 ~40 min tests 📄log
✔️ 13c938a #3 2025-11-27 19:45:47 ~11 min tests-rpc 📄log
✔️ f2898bc #3 2025-11-27 21:23:48 ~3 min linux/status-go 📦zip
✔️ f2898bc #5 2025-11-27 21:24:07 ~4 min macos/status-go 📦zip
✔️ f2898bc #3 2025-11-27 21:27:18 ~7 min windows/status-go 📦zip
✔️ f2898bc #3 2025-11-27 21:31:31 ~11 min linux/nwaku 📦zip
✔️ f2898bc #4 2025-11-27 21:32:40 ~12 min tests-rpc 📄log
✔️ f2898bc #4 2025-11-27 21:48:24 ~28 min tests 📄log
f2898bc #1 2025-12-01 11:14:52 ~4 min macos/nwaku 📄log
f2898bc #1 2025-12-01 11:28:13 ~2 min windows/nwaku 📄log
✔️ f2898bc #1 2025-12-01 12:43:52 ~30 min tests 📄log
✔️ f2898bc #1 2025-12-01 13:10:11 ~40 min tests-rpc 📄log
✔️ a5028a7 #4 2025-12-03 17:23:46 ~6 min windows/status-go 📦zip
a5028a7 #2 2025-12-03 17:25:50 ~8 min macos/nwaku 📄log
✔️ a5028a7 #6 2025-12-03 17:26:42 ~9 min macos/status-go 📦zip
a5028a7 #2 2025-12-03 17:30:44 ~13 min windows/nwaku 📄log
✔️ a5028a7 #4 2025-12-03 17:31:52 ~15 min linux/status-go 📦zip
✔️ a5028a7 #4 2025-12-03 17:38:23 ~21 min linux/nwaku 📦zip
✖️ a5028a7 #2 2025-12-03 17:55:17 ~38 min tests-rpc 📄log
✖️ a5028a7 #5 2025-12-03 17:57:51 ~40 min tests-rpc 📄log
✔️ a5028a7 #2 2025-12-03 18:03:46 ~46 min tests 📄log
✔️ a5028a7 #5 2025-12-03 18:05:23 ~48 min tests 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✖️ 72fe0ce #3 2025-12-05 12:43:10 ~1 min tests 📄log
72fe0ce #3 2025-12-05 12:45:38 ~3 min macos/nwaku 📄log
✔️ 72fe0ce #5 2025-12-05 12:45:51 ~4 min linux/status-go 📦zip
✔️ 72fe0ce #7 2025-12-05 12:47:08 ~5 min macos/status-go 📦zip
✔️ 72fe0ce #5 2025-12-05 12:48:41 ~6 min windows/status-go 📦zip
✔️ 72fe0ce #5 2025-12-05 12:49:22 ~7 min linux/nwaku 📦zip
72fe0ce #3 2025-12-05 12:55:28 ~13 min windows/nwaku 📄log
✖️ 72fe0ce #6 2025-12-05 13:00:06 ~18 min tests-rpc 📄log
✖️ 72fe0ce #3 2025-12-05 13:01:17 ~19 min tests-rpc 📄log
✔️ 72fe0ce #6 2025-12-05 13:09:25 ~27 min tests 📄log
e285de6 #4 2025-12-05 17:45:00 ~3 min macos/nwaku 📄log
✔️ e285de6 #6 2025-12-05 17:45:21 ~4 min linux/status-go 📦zip
✔️ e285de6 #8 2025-12-05 17:45:26 ~4 min macos/status-go 📦zip
✔️ e285de6 #6 2025-12-05 17:47:39 ~6 min windows/status-go 📦zip
✔️ e285de6 #6 2025-12-05 17:48:55 ~8 min linux/nwaku 📦zip
e285de6 #4 2025-12-05 17:53:00 ~11 min windows/nwaku 📄log
✔️ e285de6 #7 2025-12-05 17:57:13 ~16 min tests-rpc 📄log
✔️ e285de6 #4 2025-12-05 17:57:58 ~16 min tests-rpc 📄log
✔️ e285de6 #7 2025-12-05 18:06:34 ~25 min tests 📄log
✔️ e285de6 #4 2025-12-05 18:09:21 ~28 min tests 📄log

@codecov
Copy link

codecov bot commented Nov 26, 2025

Codecov Report

❌ Patch coverage is 17.85714% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.86%. Comparing base (783cce7) to head (e285de6).
⚠️ Report is 10 commits behind head on develop.

Files with missing lines Patch % Lines
node/get_status_node.go 16.00% 21 Missing ⚠️
node/backup/controller.go 33.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #7155       +/-   ##
============================================
+ Coverage    34.92%   59.86%   +24.93%     
============================================
  Files          798      813       +15     
  Lines       111349   113425     +2076     
============================================
+ Hits         38891    67900    +29009     
+ Misses       67561    38653    -28908     
- Partials      4897     6872     +1975     
Flag Coverage Δ
functional 34.97% <14.28%> (+0.05%) ⬆️
unit 55.46% <17.85%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
node/backup/controller.go 61.61% <33.33%> (+33.33%) ⬆️
node/get_status_node.go 66.55% <16.00%> (+2.00%) ⬆️

... and 514 files with indirect coverage changes

@jrainville jrainville force-pushed the chore/cherry-pick-error-on-empty-path branch from d741bd5 to 13c938a Compare November 27, 2025 18:21
@jrainville jrainville force-pushed the chore/cherry-pick-error-on-empty-path branch from 13c938a to f2898bc Compare November 27, 2025 21:19
@igor-sirotin
Copy link
Collaborator

@jrainville looking at the coverage, filenameGetter doesn't seem to be invoked, could it be? 🤔
https://app.codecov.io/github/status-im/status-go/pull/7155/blob/node/get_status_node.go

@jrainville
Copy link
Member Author

@jrainville looking at the coverage, filenameGetter doesn't seem to be invoked, could it be? 🤔 https://app.codecov.io/github/status-im/status-go/pull/7155/blob/node/get_status_node.go

It's not invoked in integration tests, but it should be in Functional tests, as that is how we get the path to the file. Do you know if the coverage works on funcitonal tests too?

@igor-sirotin
Copy link
Collaborator

It's not invoked in integration tests, but it should be in Functional tests, as that is how we get the path to the file. Do you know if the coverage works on funcitonal tests too?

I checked the report and `` doesn't seem to be invoked in functional tests either 🤷

In CI job artifacts, you can find a coverage report (that is uploaded to Codecov) in HTML format:
tests-functional/coverage/coverage.html

image

@jrainville
Copy link
Member Author

I checked the report and `` doesn't seem to be invoked in functional tests either 🤷

Very weird. I'll double check then, but if that's the case, I don't know where it's getting its file path lol

@jrainville
Copy link
Member Author

Seems like there is a bug with the coverage then, because I know for a fact that it's called, because that code block is the one that throws backup path is not set and I check for that specific error in the functional test.

Could it be that since it's an anonymous function, it kinda gets lost by the coverage? @igor-sirotin
Maybe I could move it to be a named function part of StatusNode and it would work?

@jrainville jrainville force-pushed the chore/cherry-pick-error-on-empty-path branch from f2898bc to a5028a7 Compare December 3, 2025 17:16
@igor-sirotin
Copy link
Collaborator

Seems like there is a bug with the coverage then, because I know for a fact that it's called, because that code block is the one that throws backup path is not set and I check for that specific error in the functional test.

👍

Could it be that since it's an anonymous function, it kinda gets lost by the coverage?

Indeed, seems that it's a coverage bug 👀

Maybe I could move it to be a named function part of StatusNode and it would work?

Seems that it won't help. It's not about the function being anonymous, but the callback being stored as a struct field.

I've reimplemented this as an interface, pushed to this PR: 72fe0ce. No matter if this helps or not, we can merge it.

jrainville and others added 2 commits December 5, 2025 12:40
Needed for status-im/status-app#19377

For Android, we are setting the default path to empty string so that the user can know that they need to modify it. Otherwise, the default path was the datadir and users cannot access it.

What this meant is that once the auto-backup was happening, the status-go code worked, but then it failed because of the missing user permission.

To fix it, we just throw an error on empty paths in status-go. That way the backup just doesn't happen until the user selects a path.
@jrainville jrainville force-pushed the chore/cherry-pick-error-on-empty-path branch from 72fe0ce to e285de6 Compare December 5, 2025 17:40
@jrainville jrainville merged commit b962669 into develop Dec 5, 2025
24 of 27 checks passed
@jrainville jrainville deleted the chore/cherry-pick-error-on-empty-path branch December 5, 2025 19:25
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.

4 participants