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

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.

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown

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

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
ContributorAuthor

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.

@leborchukleborchuk 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.

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 )

@tuhaihetuhaihe left a comment

Copy link
Copy Markdown
Member

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 merged commit cd3c88f into apache:mainMay 14, 2026
68 of 69 checks passed
@woblerr
woblerr deleted the fix_gppkg_clean branch May 14, 2026 08:03
Sign up for freeto 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

@woblerr@tuhaihe@leborchuk