Skip to content

client: show "install Podman" messages only in certain cases#7171

Open
davidpanderson wants to merge 5 commits into
masterfrom
dpa_docker34
Open

client: show "install Podman" messages only in certain cases#7171
davidpanderson wants to merge 5 commits into
masterfrom
dpa_docker34

Conversation

@davidpanderson

@davidpanderson davidpanderson commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Namely:

  • the client is attached to a project that has Podman apps
  • the client is using Science United

Also: we had two separate chunks of code for parsing all_projects_list.xml. Combine these into one (in lib/util)


Summary by cubic

Show “Install Podman” only when it’s relevant, and consolidate all_projects_list.xml parsing into lib/util to remove duplicate code and simplify lookups. Includes a small macOS build fix.

  • New Features

    • Only show the install message if:
      • Using Science United (dynamic AM), or
      • Attached to a project that lists the docker platform.
    • Respect dont_use_docker and, on Windows, dont_use_wsl; skip notices on unsupported Windows.
    • Keep WSL/runner notices on Windows when Docker/Podman is present.
  • Refactors

    • Moved all_projects_list.xml parsing to lib/util as ALL_PROJECTS_LIST with parse(), read_file(), alpha_sort(), and lookup_id(); unified entries via PROJECT_LIST_ENTRY with id and is_account_manager.
    • Removed duplicate structs/parsers from lib/gui_rpc_client*; get_all_projects_list now uses ALL_PROJECTS_LIST::parse(). Updated account attach to use lookup_id() and url. Dropped project_list.cpp and the old PROJECT_LIST member.
    • macOS: include util.h in clientgui/mac/SetupSecurity.cpp and rename the duplicate dtime() to dtime2 to fix the build.

Written for commit 15b583c. Summary will update on new commits.

Review in cubic

Namely:
- the client is attached to a project that has Docker apps
- the client is using Science United

Also: we had two separate chunks of code for parsing all_projects_list.xml.
Combine these into one (in lib/util)

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

2 issues found across 9 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="lib/util.cpp">

<violation number="1" location="lib/util.cpp:1003">
P2: Each project-list read leaks every `PROJECT_LIST_ENTRY` when its `ALL_PROJECTS_LIST` is destroyed. Add a destructor that calls `clear()` (or use owning pointers) so the temporary project lists release their entries.</violation>
</file>

<file name="lib/gui_rpc_client_ops.cpp">

<violation number="1" location="lib/gui_rpc_client_ops.cpp:1555">
P3: The `if (retval) return retval;` check after `pl.parse(rpc.xp)` is dead code because `ALL_PROJECTS_LIST::parse()` unconditionally returns 0. While harmless, this is a minor cleanup opportunity — the check can be removed to make the code clearer.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread client/client_state.cpp Outdated
Comment thread lib/util.cpp
retval = entry->parse(xp);
if (!retval) {
entry->is_account_manager = false;
projects.push_back(entry);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2: Each project-list read leaks every PROJECT_LIST_ENTRY when its ALL_PROJECTS_LIST is destroyed. Add a destructor that calls clear() (or use owning pointers) so the temporary project lists release their entries.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At lib/util.cpp, line 1003:

<comment>Each project-list read leaks every `PROJECT_LIST_ENTRY` when its `ALL_PROJECTS_LIST` is destroyed. Add a destructor that calls `clear()` (or use owning pointers) so the temporary project lists release their entries.</comment>

<file context>
@@ -902,4 +905,130 @@ string docker_container_name(
+            retval = entry->parse(xp);
+            if (!retval) {
+                entry->is_account_manager = false;
+                projects.push_back(entry);
+            } else {
+                delete entry;
</file context>

Comment thread lib/util.cpp Outdated
continue;
}
}
retval = pl.parse(rpc.xp);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P3: The if (retval) return retval; check after pl.parse(rpc.xp) is dead code because ALL_PROJECTS_LIST::parse() unconditionally returns 0. While harmless, this is a minor cleanup opportunity — the check can be removed to make the code clearer.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At lib/gui_rpc_client_ops.cpp, line 1555:

<comment>The `if (retval) return retval;` check after `pl.parse(rpc.xp)` is dead code because `ALL_PROJECTS_LIST::parse()` unconditionally returns 0. While harmless, this is a minor cleanup opportunity — the check can be removed to make the code clearer.</comment>

<file context>
@@ -1655,37 +1547,13 @@ int RPC_CLIENT::get_project_status(PROJECTS& p) {
-            continue;
-        }
-    }
+    retval = pl.parse(rpc.xp);
+    if (retval) return retval;
 
</file context>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 3 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread lib/util.h
@AenBleidd

Copy link
Copy Markdown
Member

@davidpanderson, it looks like that the changed 'util.cpp' file now breaks the compilation of the 'PostInstall' project on Mac. Maybe some file is missed?

Also, in the 'clint/client_state.cpp' file we still have a link to install 'Docker'.
This should be changed to the wiki page about Podman since we want to recommend it.

@davidpanderson

Copy link
Copy Markdown
Contributor Author

I can't figure out why the Mac build failed. Is there a more detailed error message?

I'll fix the startup messages in a later PR.

@AenBleidd

Copy link
Copy Markdown
Member

@davidpanderson, from the build log file:

    /Applications/Xcode_26.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -ivfsstatcache /var/folders/8j/sfr9qqcj73j4p6nhwcfpr0th0000gn/C/com.apple.DeveloperTools/26.0.1-17A400/Xcode/SDKStatCaches.noindex/macosx26.0-25A352-3885c01c3e6b6a337905948deab2002e1df1e60cb082dd0af9d75e5767cc3840.sdkstatcache -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -fno-color-diagnostics -Wno-trigraphs -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-format -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wno-shorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -Wno-implicit-fallthrough -fstrict-aliasing -Wno-deprecated-declarations -Winvalid-offsetof -Wno-sign-conversion -Wno-infinite-recursion -Wno-move -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-range-loop-analysis -Wno-semicolon-before-method-body -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -Wno-write-strings -include ../clientgui/mac/config.h @/Users/runner/work/boinc/boinc/mac_build/build/boinc.build/Deployment/PostInstall.build/Objects-normal/x86_64/82b82416624d2658e5098eb0a28c15c5-common-args.resp -MMD -MT dependencies -MF /Users/runner/work/boinc/boinc/mac_build/build/boinc.build/Deployment/PostInstall.build/Objects-normal/x86_64/SetupSecurity.d --serialize-diagnostics /Users/runner/work/boinc/boinc/mac_build/build/boinc.build/Deployment/PostInstall.build/Objects-normal/x86_64/SetupSecurity.dia -c /Users/runner/work/boinc/boinc/clientgui/mac/SetupSecurity.cpp -o /Users/runner/work/boinc/boinc/mac_build/build/boinc.build/Deployment/PostInstall.build/Objects-normal/x86_64/SetupSecurity.o
/Users/runner/work/boinc/boinc/clientgui/mac/SetupSecurity.cpp:47:15: error: static declaration of 'dtime' follows non-static declaration
   47 | static double dtime(void);
      |               ^
In file included from /Users/runner/work/boinc/boinc/clientgui/mac/SetupSecurity.cpp:31:
In file included from /Users/runner/work/boinc/boinc/client/file_names.h:21:
In file included from /Users/runner/work/boinc/boinc/client/client_types.h:47:
In file included from /Users/runner/work/boinc/boinc/client/cs_notice.h:60:
In file included from /Users/runner/work/boinc/boinc/client/gui_rpc_server.h:22:
In file included from /Users/runner/work/boinc/boinc/client/acct_setup.h:22:
/Users/runner/work/boinc/boinc/lib/util.h:33:15: note: previous declaration is here
   33 | extern double dtime();
      |               ^
/Users/runner/work/boinc/boinc/clientgui/mac/SetupSecurity.cpp:1214:15: error: static declaration of 'dtime' follows non-static declaration
 1214 | static double dtime(void) {
      |               ^
In file included from /Users/runner/work/boinc/boinc/clientgui/mac/SetupSecurity.cpp:31:
In file included from /Users/runner/work/boinc/boinc/client/file_names.h:21:
In file included from /Users/runner/work/boinc/boinc/client/client_types.h:47:
In file included from /Users/runner/work/boinc/boinc/client/cs_notice.h:60:
In file included from /Users/runner/work/boinc/boinc/client/gui_rpc_server.h:22:
In file included from /Users/runner/work/boinc/boinc/client/acct_setup.h:22:
/Users/runner/work/boinc/boinc/lib/util.h:33:15: note: previous declaration is here
   33 | extern double dtime();
      |               ^
2 errors generated.

@AenBleidd

Copy link
Copy Markdown
Member

@davidpanderson, the same issue in 'Uninstaller':

    /Applications/Xcode_26.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -ivfsstatcache /var/folders/8j/sfr9qqcj73j4p6nhwcfpr0th0000gn/C/com.apple.DeveloperTools/26.0.1-17A400/Xcode/SDKStatCaches.noindex/macosx26.0-25A352-3885c01c3e6b6a337905948deab2002e1df1e60cb082dd0af9d75e5767cc3840.sdkstatcache -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -fno-color-diagnostics -Wno-trigraphs -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-format -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wno-shorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -Wno-implicit-fallthrough -fstrict-aliasing -Wno-deprecated-declarations -Winvalid-offsetof -Wno-sign-conversion -Wno-infinite-recursion -Wno-move -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-range-loop-analysis -Wno-semicolon-before-method-body -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -Wno-write-strings -include ../clientgui/mac/config.h @/Users/runner/work/boinc/boinc/mac_build/build/boinc.build/Deployment/Uninstaller.build/Objects-normal/x86_64/82b82416624d2658e5098eb0a28c15c5-common-args.resp -MMD -MT dependencies -MF /Users/runner/work/boinc/boinc/mac_build/build/boinc.build/Deployment/Uninstaller.build/Objects-normal/x86_64/uninstall.d --serialize-diagnostics /Users/runner/work/boinc/boinc/mac_build/build/boinc.build/Deployment/Uninstaller.build/Objects-normal/x86_64/uninstall.dia -c /Users/runner/work/boinc/boinc/mac_installer/uninstall.cpp -o /Users/runner/work/boinc/boinc/mac_build/build/boinc.build/Deployment/Uninstaller.build/Objects-normal/x86_64/uninstall.o
/Users/runner/work/boinc/boinc/mac_installer/uninstall.cpp:74:15: error: static declaration of 'dtime' follows non-static declaration
   74 | static double dtime(void);
      |               ^
In file included from /Users/runner/work/boinc/boinc/mac_installer/uninstall.cpp:56:
In file included from /Users/runner/work/boinc/boinc/client/file_names.h:21:
In file included from /Users/runner/work/boinc/boinc/client/client_types.h:47:
In file included from /Users/runner/work/boinc/boinc/client/cs_notice.h:60:
In file included from /Users/runner/work/boinc/boinc/client/gui_rpc_server.h:22:
In file included from /Users/runner/work/boinc/boinc/client/acct_setup.h:22:
/Users/runner/work/boinc/boinc/lib/util.h:33:15: note: previous declaration is here
   33 | extern double dtime();
      |               ^
/Users/runner/work/boinc/boinc/mac_installer/uninstall.cpp:1536:15: error: static declaration of 'dtime' follows non-static declaration
 1536 | static double dtime(void) {
      |               ^
In file included from /Users/runner/work/boinc/boinc/mac_installer/uninstall.cpp:56:
In file included from /Users/runner/work/boinc/boinc/client/file_names.h:21:
In file included from /Users/runner/work/boinc/boinc/client/client_types.h:47:
In file included from /Users/runner/work/boinc/boinc/client/cs_notice.h:60:
In file included from /Users/runner/work/boinc/boinc/client/gui_rpc_server.h:22:
In file included from /Users/runner/work/boinc/boinc/client/acct_setup.h:22:
/Users/runner/work/boinc/boinc/lib/util.h:33:15: note: previous declaration is here
   33 | extern double dtime();
      |               ^
2 errors generated.

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

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

2 participants