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

chore: Allow dependency rustworkx 0.14.x #6045

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

harryzcy
Copy link

@harryzcy harryzcy commented Feb 25, 2024

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Description

Allow using rustworkx 0.13.x and 0.14.x.

rustworkx 0.13.0 doesn't provide a arm64 linux support with musl (musllinux2014_aarch64). Thus, installing requires a Rust compiler. rustworkx 0.14.x solves this (see Qiskit/rustworkx#1115).

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my feature, policy, or fix is effective and works
  • New and existing tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@IvanIsCoding
Copy link

Hi folks, just to give a little bit more of context to Chongyi's PR. From what I understood, many users use checkov in Docker containers with Alpine Linux, hence they need musl wheels. After checkov added a dependency for rustworkx, we got a couple requests and added musl x86 for our 0.13.x releases which covered most of the downloads.

However, one item we missed were musl aarch64 wheels. Althought not as common in production, this is a common scenario in development for Mac users with M series chips that use Alpine inside Docker. We started supporting this use with Qiskit/rustworkx#1008, which was only released in the 0.14.x wheels.

The diff of the PR is small but the consequence is that many Mac users will now be able to run Alpine-based Docker containers checkov.

@harryzcy
Copy link
Author

harryzcy commented Feb 25, 2024

Thanks for the comment @IvanIsCoding

super-linter which includes checkov is preparing for arm64/aarch64 support super-linter/super-linter#5070, thus would really appreciate the support for rustworkx's musl aarch64 wheels

@gruebel
Copy link
Contributor

gruebel commented Feb 25, 2024

You also need to adjust the setup.py otherwise it won't work, because the Pipfile is for local development and running the UTs, but has no consequences on published package.

As mentioned in other issues and also in the docs, checkov is not supported on Alpine and it is highly not recommended to run bigger Python projects on Alpine, because of the possible incompatibility of C extensions and the increased buildtime.

@harryzcy
Copy link
Author

You also need to adjust the setup.py otherwise it won't work, because the Pipfile is for local development and running the UTs, but has no consequences on published package.

It's updated.

@harryzcy
Copy link
Author

harryzcy commented Mar 3, 2024

@gruebel Can you help to review this again? Thanks

@harryzcy
Copy link
Author

harryzcy commented Mar 26, 2024

@gruebel Is there anything blocking that I need to help with? Can you allow the workflows to run so that I would know if there's any issues? Thanks

This PR will reduce build time on arm64 by a lot and is needed downstream.

maxamel and others added 5 commits March 26, 2024 10:46
bump manully bc-detect-secrets

Co-authored-by: Max Amelchenko <[email protected]>
bump manully bc-detect-secrets

Co-authored-by: Max Amelchenko <[email protected]>
add fix for when tf_def is a string

Co-authored-by: Max Amelchenko <[email protected]>
add fix for when tf_def is a string

Co-authored-by: Max Amelchenko <[email protected]>
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