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

Update Demo Scripts (make demo) for Apple Silicon (M4) Compatibility and Python 3 #94

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

kahirokunn
Copy link
Member

@kahirokunn kahirokunn commented Dec 27, 2024

This pull request updates the “make demo” workflow to ensure that it runs properly on Apple Silicon (M4) machines.

• Switched from Python to Python 3 in the demo script (edit-meta).
• Used absolute paths to address environment-related issues in demo.sh.
• Added architecture detection in scripts/up.sh for a multi-arch CoreDNS build.
• Replaced the tar-based CoreDNS download with an equivalent git clone step to support “make” on M4.

All of these modifications aim to maintain backward compatibility while extending usability to Apple Silicon (M4) hardware. Testing locally shows that “make demo” now works as expected on M4 MacBooks. Please review and let me know if further changes are required. Thank you!

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 27, 2024
@k8s-ci-robot
Copy link
Contributor

Welcome @kahirokunn!

It looks like this is your first PR to kubernetes-sigs/mcs-api 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/mcs-api has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Dec 27, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @kahirokunn. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 27, 2024
@kahirokunn kahirokunn changed the title Enhance Existing make demo Script for M4 MacBook Compatibility Update Demo Scripts (make demo) for Apple Silicon (M4) Compatibility and Python 3 Dec 27, 2024
Copy link
Member

@MrFreezeex MrFreezeex left a comment

Choose a reason for hiding this comment

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

Hi! Welcome and thanks for the contribution! I left a couple of comments, most of them are style/nits except the one about downloading the coredns binary instead of building it which I am concerned about but apart from that this looks great thanks again!

/ok-to-test

demo/demo.sh Outdated Show resolved Hide resolved
demo/demo.sh Outdated Show resolved Hide resolved
demo/demo.sh Outdated Show resolved Hide resolved
demo/demo.sh Outdated Show resolved Hide resolved
scripts/up.sh Outdated Show resolved Hide resolved
scripts/up.sh Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 6, 2025
@kahirokunn kahirokunn force-pushed the make-demo-multi-arch branch from 4ed8934 to 977e345 Compare January 6, 2025 19:40
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 6, 2025
@kahirokunn kahirokunn force-pushed the make-demo-multi-arch branch 4 times, most recently from e2920a9 to 360da88 Compare January 6, 2025 19:55
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 6, 2025
@kahirokunn
Copy link
Member Author

/retest-required

@kahirokunn
Copy link
Member Author

I am currently re-testing the functionality. I will provide an update once it is completed.

@kahirokunn kahirokunn force-pushed the make-demo-multi-arch branch from b6d9ddc to f7f55b1 Compare January 9, 2025 04:24
@kahirokunn
Copy link
Member Author

I've tested this and confirmed it works once this PR is merged.
#97

CleanShot 2025-01-09 at 13 54 50@2x

kahirokunn and others added 3 commits January 10, 2025 16:22
- Resolve absolute script paths to ensure consistency.
- Introduce platform detection for multi-arch coredns binary download.
- Replace tar download with git clone for coredns due to 'make' dependency.

Signed-off-by: kahirokunn <[email protected]>
Co-authored-by: Arthur Outhenin-Chalandre <[email protected]>
@kahirokunn kahirokunn force-pushed the make-demo-multi-arch branch 2 times, most recently from db6d9d1 to 79b4cf3 Compare January 10, 2025 07:23
@kahirokunn
Copy link
Member Author

Testing has been completed successfully. 👍

@kahirokunn
Copy link
Member Author

@MrFreezeex I think I'm falling down with an error in an unrelated area, what do you think I should do?

scripts/up.sh Outdated Show resolved Hide resolved
- Switch to using a Docker container for consistent coreDNS build across platforms.
- Avoid manual architecture detection and platform-specific binary handling.

Signed-off-by: kahirokunn <[email protected]>
@kahirokunn kahirokunn force-pushed the make-demo-multi-arch branch from 79b4cf3 to d439c09 Compare January 10, 2025 12:10
@kahirokunn
Copy link
Member Author

It's all been passed!
It's ready to merge. 🙏

Copy link
Member

@MrFreezeex MrFreezeex left a comment

Choose a reason for hiding this comment

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

Thanks again!
/lgtm

cc @skitt for approval 🙏

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 10, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kahirokunn, MrFreezeex
Once this PR has been reviewed and has the lgtm label, please assign skitt for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@dfarrell07
Copy link

Thanks again! /lgtm

cc @skitt for approval 🙏

/cc @skitt

@k8s-ci-robot k8s-ci-robot requested a review from skitt January 28, 2025 19:57
Copy link
Member

@skitt skitt left a comment

Choose a reason for hiding this comment

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

Thanks for taking care of this! I have a few suggestions for improvements, if you don’t mind.

demo/demo.sh Outdated Show resolved Hide resolved
demo/demo.sh Outdated Show resolved Hide resolved
demo/demo.sh Outdated Show resolved Hide resolved
scripts/up.sh Outdated Show resolved Hide resolved
@skitt
Copy link
Member

skitt commented Jan 29, 2025

Also, could you rebase your commits to avoid having separate “Apply suggestions from review” commits?

@k8s-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 1, 2025
- Switch to using `realpath` for resolving script paths
- Use more concise variable definitions for paths
@kahirokunn kahirokunn force-pushed the make-demo-multi-arch branch from 7def7f2 to 120ae9d Compare February 1, 2025 13:41
@kahirokunn
Copy link
Member Author

@skitt
Thank you for the review feedback. I have completed rebasing and squashed the separate review suggestion commits. Please review when you have a chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants