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

Fix unportable scripts on macOS #201

Merged
merged 1 commit into from
Oct 8, 2023

Conversation

Ray-Eldath
Copy link
Contributor

@Ray-Eldath Ray-Eldath commented Sep 14, 2023

Change logs

Fix unportable scripts on macOS

  1. Regarding greenplum_path.sh: In some platforms (notably macOS), various Python installations may co-exist. When demo_cluster.sh creates segments using ssh, it may not run by the same Python installation as the coordinator because env are not passed through, causing the super weird "Module 'pgdb' not found" error. This PR fix this by probing the path of the Python installation and write it down in greenplum_path.sh.
  2. README.macOS.bash and gp_bash_functions.sh are changed as well to properly create cluster on macOS.

Why are the changes needed?

Important

This PR is a by-product of #198. These two PR are necessary to support CBDB building and running on macOS platform.

Does this PR introduce any user-facing change?

Before this PR, user cannot run make create-demo-cluster on macOS. Now they can.

@Ray-Eldath Ray-Eldath force-pushed the fix-greenplum_path branch 3 times, most recently from ba0d41c to d00051c Compare September 19, 2023 09:06
@Ray-Eldath Ray-Eldath changed the title Fix unportable greenplum_path.sh Fix unportable scripts on macOS Sep 19, 2023
@Ray-Eldath Ray-Eldath force-pushed the fix-greenplum_path branch 3 times, most recently from 6a27543 to 5d5dd4b Compare September 19, 2023 11:00
@Ray-Eldath Ray-Eldath marked this pull request as draft September 20, 2023 07:42
@Ray-Eldath Ray-Eldath force-pushed the fix-greenplum_path branch 3 times, most recently from 75d9a3d to e0ab34e Compare September 21, 2023 08:46
@Ray-Eldath Ray-Eldath marked this pull request as ready for review September 21, 2023 09:11
@Ray-Eldath
Copy link
Contributor Author

Ray-Eldath commented Sep 21, 2023

This PR is ready for review as it has sucessfully build demo cluster on both clean-installed Intel Mac and Apple M1 Mac.

Copy link
Collaborator

@Zhangbaowen-Hashdata Zhangbaowen-Hashdata left a comment

Choose a reason for hiding this comment

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

We reset the system in intel and M1, and it has been verified that cbdb compilation, installation, cluster startup and icw test can be completed

@Ray-Eldath
Copy link
Contributor Author

Ray-Eldath commented Sep 21, 2023

I think I met the same gpstop failure many a lot (>3) times in the past week. I always directly go for a git commit --amend --no-edit; git push -f and it invariably fix the problem. The CI is really unstable these days I suppose.

Copy link
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.

I was able to successfully build CloudberryDB on macOS/m1 using this branch. Thank you for your hard work! @Ray-Eldath 🫶🏻

1. Regarding greenplum_path.sh: In some platforms (notably macOS),
   various Python installations may co-exist. When demo_cluster.sh
   creates segments using ssh, it may not run by the same Python
   installation as the coordinator because env are not passed through,
   causing the super weird "Module 'pgdb' not found" error. This PR fix
   this by probing the path of the Python installation and write it down
   in greenplum_path.sh
2. README.macOS.bash and gp_bash_functions.sh are changed as well to
   properly create cluster on macOS.
@tuhaihe
Copy link
Member

tuhaihe commented Oct 7, 2023

Hi @my-ship-it, could you please help review this pull request? Once it's approved, we can announce the new feature. Thank you!

Copy link
Contributor

@my-ship-it my-ship-it left a comment

Choose a reason for hiding this comment

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

LGTM

@my-ship-it my-ship-it merged commit b966aac into cloudberrydb:main Oct 8, 2023
6 checks passed
baotingfang pushed a commit that referenced this pull request Dec 1, 2023
1. Regarding greenplum_path.sh: In some platforms (notably macOS),
   various Python installations may co-exist. When demo_cluster.sh
   creates segments using ssh, it may not run by the same Python
   installation as the coordinator because env are not passed through,
   causing the super weird "Module 'pgdb' not found" error. This PR fix
   this by probing the path of the Python installation and write it down
   in greenplum_path.sh
2. README.macOS.bash and gp_bash_functions.sh are changed as well to
   properly create cluster on macOS.
@Ray-Eldath Ray-Eldath deleted the fix-greenplum_path branch January 11, 2024 09:37
Ray-Eldath added a commit to Ray-Eldath/cloudberrydb that referenced this pull request Mar 1, 2024
Current greenplum_path.sh is a result of cloudberrydb#201 to make greenplum_path.sh
always using the Python during ./configure. But it inadvertently changes
user's $PATH. This portion of cloudberrydb#201 is reverted, and it should be fine if
user use pip install --user to install dependencies.
@Ray-Eldath Ray-Eldath mentioned this pull request Mar 1, 2024
my-ship-it pushed a commit that referenced this pull request Mar 18, 2024
Current greenplum_path.sh is a result of #201 to make greenplum_path.sh
always using the Python during ./configure. But it inadvertently changes
user's $PATH. This portion of #201 is reverted, and it should be fine if
user use pip install --user to install dependencies.
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.

None yet

4 participants