Skip to content

Fix gppkg --clean error: 'SyncPackages' object has no attribute 'ret'.#1716

Merged
tuhaihe merged 1 commit into
apache:mainfrom
woblerr:fix_gppkg_clean
May 14, 2026
Merged

Fix gppkg --clean error: 'SyncPackages' object has no attribute 'ret'.#1716
tuhaihe merged 1 commit into
apache:mainfrom
woblerr:fix_gppkg_clean

Conversation

@woblerr
Copy link
Copy Markdown
Contributor

@woblerr woblerr commented May 2, 2026

The command gppkg --clean fails with the following error:

gpadmin@master:~$ gppkg --clean
20260502:20:46:20:008305 gppkg:master:gpadmin-[INFO]:-Starting gppkg with args: --clean
20260502:20:46:20:008305 gppkg:master:gpadmin-[ERROR]:-gppkg error: SyncPackages failed:
'SyncPackages' object has no attribute 'ret'
...

This occurs because operations was being passed positionally during the OperationWorkerPool initialization, which incorrectly bound it to the should_stop argument instead of items in the base WorkerPool class.

The solution is to pass operations as a keyword argument.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Hi, @woblerr welcome!🎊 Thanks for taking the effort to make our project better! 🙌 Keep making such awesome contributions!

@tuhaihe
Copy link
Copy Markdown
Member

tuhaihe commented May 3, 2026

Hi @woblerr Thanks for your fixes!

One more question is that: are you using the .gppkg package for your daily operations? If so, I think we can have a discussion on providing the gppkg for Cloudberry and other components.

@woblerr
Copy link
Copy Markdown
Contributor Author

woblerr commented May 4, 2026

One more question is that: are you using the .gppkg package for your daily operations? If so, I think we can have a discussion on providing the gppkg for Cloudberry and other components.

Not in everyday use. I came across a recommendation when there are problems with extensions synchronization when activating the standby coordinator.

20260502:20:16:32:005759 gpinitstandby:master:gpadmin-[INFO]:-Syncing Apache Cloudberry extensions to standby
20260502:20:16:32:005759 gpinitstandby:master:gpadmin-[WARNING]:-Syncing of Apache Cloudberry extensions has failed.
20260502:20:16:32:005759 gpinitstandby:master:gpadmin-[WARNING]:-Please run gppkg --clean after successful standby initialization.

gpinitstandby#L397-L398 - current implimintation.

@tuhaihe tuhaihe requested review from leborchuk, my-ship-it and reshke May 7, 2026 02:20
Copy link
Copy Markdown
Contributor

@leborchuk leborchuk left a comment

Choose a reason for hiding this comment

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

Sorry, I personally prefer not to use objects in Python, especially when one needs to call parent class constructors.

But since this code exists, let's fix it )

Copy link
Copy Markdown
Member

@tuhaihe tuhaihe left a comment

Choose a reason for hiding this comment

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

All tests passed.

The command `gppkg --clean` fails with the following error: "'SyncPackages' object has no attribute 'ret'".

This occurs because `operations` was being passed positionally during the OperationWorkerPool initialization, which incorrectly bound it to the `should_stop` argument instead of `items` in the base WorkerPool class.

The solution is to  pass `operations` as a keyword argument..
@tuhaihe tuhaihe force-pushed the fix_gppkg_clean branch from 029043d to 4f7aff6 Compare May 14, 2026 03:44
@tuhaihe tuhaihe merged commit cd3c88f into apache:main May 14, 2026
68 of 69 checks passed
@woblerr woblerr deleted the fix_gppkg_clean branch May 14, 2026 08:03
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.

3 participants