Skip to content

fix(build): Add --copies flag to Python venv creation for better compatibility #14120

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pedro93
Copy link
Collaborator

@pedro93 pedro93 commented Jul 17, 2025

This change adds the --copies flag to the Python virtual environment creation command in the metadata-ingestion build.gradle file.

What changed:

  • Modified the environmentSetup task to use python -m venv --copies ${venv_name} instead of python -m venv ${venv_name}
    Why this matters:
    The --copies flag ensures that Python files are copied into the virtual environment rather than symlinked. This can resolve issues with:
  • File system compatibility (especially on Windows or network drives)
  • Container environments where symlinks might not work correctly
  • Build reproducibility across different environments
  • Scenarios where the python executable is immutable (Nix environments)

This is a low-risk change that improves compatibility without affecting functionality.

This change adds the --copies flag to the Python virtual environment creation command in the metadata-ingestion build.gradle file.

  What changed:
  - Modified the environmentSetup task to use python -m venv --copies ${venv_name} instead of python -m venv ${venv_name}

  Why this matters:
  The --copies flag ensures that Python files are copied into the virtual environment rather than symlinked. This can resolve issues with:
  - File system compatibility (especially on Windows or network drives)
  - Container environments where symlinks might not work correctly
  - Build reproducibility across different environments
  - Scenarios where the python executable is immutable (Nix environments)

  This is a low-risk change that improves compatibility without affecting functionality.
@github-actions github-actions bot added the ingestion PR or Issue related to the ingestion of metadata label Jul 17, 2025
@datahub-cyborg datahub-cyborg bot added the needs-review Label for PRs that need review from a maintainer. label Jul 17, 2025
Copy link

codecov bot commented Jul 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

❌ Unsupported file format

Upload processing failed due to unsupported file format. Please review the parser error message:
Error parsing JUnit XML in /home/runner/work/datahub/datahub/metadata-io/build/test-results/test/TEST-com.linkedin.metadata.graph.search.opensearch.SearchGraphServiceOpenSearchTest.xml at 668:1052

Caused by:
RuntimeError: Error converting computed name to ValidatedString

Caused by:
    string is too long</code></pre>

For more help, visit our troubleshooting guide.

:loudspeaker: Thoughts on this report? Let us know!

Copy link
Collaborator

@anshbansal anshbansal left a comment

Choose a reason for hiding this comment

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

@pedro93 This can cause an issue where if you are doing local development then you have to re-run the environment setup every time. This will cause local dev to be painful. Please make this an optional argument

@datahub-cyborg datahub-cyborg bot added pending-submitter-response Issue/request has been reviewed but requires a response from the submitter and removed needs-review Label for PRs that need review from a maintainer. labels Jul 17, 2025
@anshbansal anshbansal dismissed their stale review July 17, 2025 14:04

I may have misunderstood

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ingestion PR or Issue related to the ingestion of metadata pending-submitter-response Issue/request has been reviewed but requires a response from the submitter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants