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 constraints resolves to pass additional args. #12076

Merged
merged 3 commits into from
May 14, 2021

Conversation

jsirois
Copy link
Contributor

@jsirois jsirois commented May 13, 2021

This was missed when landing subset resolves and affects proper handling
of Python awslambda resolves for one.

Fixes #12075

[ci skip-rust]
[ci skip-build-wheels]

This was missed when landing subset resolves and affects proper handling
of Python awslambda resolves for one.

Fixes pantsbuild#12075

[ci skip-rust]
[ci skip-build-wheels]
@jsirois jsirois requested review from Eric-Arellano and benjyw May 13, 2021 23:45
Copy link
Contributor

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

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

Thanks!

jsirois added 2 commits May 13, 2021 18:05
# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
@jsirois jsirois merged commit 722cd8a into pantsbuild:main May 14, 2021
@jsirois jsirois deleted the issues/12075 branch May 14, 2021 01:41
jsirois added a commit to jsirois/pants that referenced this pull request May 14, 2021
This was missed when landing subset resolves and affects proper handling
of Python awslambda resolves for one.

Fixes pantsbuild#12075

(cherry picked from commit 722cd8a)

# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
jsirois added a commit that referenced this pull request May 14, 2021
This was missed when landing subset resolves and affects proper handling
of Python awslambda resolves for one.

Fixes #12075

(cherry picked from commit 722cd8a)
Eric-Arellano added a commit that referenced this pull request Sep 9, 2021
…le or lockfile (#12807)

Improves upon the solution from #12076. There are some args like `--manylinux` that we need to use both with the lockfile.pex and the final `PexFromTargets`. But many others like `--strip-pex-env` are irrelevant for the lockfile.pex, and we only need to set on the final PEX.

WIth this diff:

```diff
diff --git a/build-support/bin/BUILD b/build-support/bin/BUILD
index d9751179b..2a6e76478 100644
--- a/build-support/bin/BUILD
+++ b/build-support/bin/BUILD
@@ -17,4 +17,4 @@ pex_binary(name="generate_docs", entry_point="generate_docs.py", dependencies=["
 pex_binary(name="generate_github_workflows", entry_point="generate_github_workflows.py")
 pex_binary(name="generate_user_list", entry_point="generate_user_list.py", dependencies=[":user_list_templates"])
 pex_binary(name="release_helper", entry_point="_release_helper.py")
-pex_binary(name="reversion", entry_point="reversion.py")
+pex_binary(name="reversion", entry_point="reversion.py", always_write_cache=True)
```

Before:

```
❯ ./pants --no-process-execution-local-cache --no-remote-cache-read --no-pantsd package build-support/bin:
...
23:50:18.32 [INFO] Completed: Installing 3rdparty/python/lockfiles/user_reqs.txt
23:50:18.32 [INFO] Completed: Installing 3rdparty/python/lockfiles/user_reqs.txt
```

After:

```
❯ ./pants --no-process-execution-local-cache --no-remote-cache-read --no-pantsd package build-support/bin:
...
23:49:14.07 [INFO] Completed: Installing 3rdparty/python/lockfiles/user_reqs.txt
...
```

[ci skip-rust]
[ci skip-build-wheels]
Eric-Arellano added a commit to Eric-Arellano/pants that referenced this pull request Sep 9, 2021
…le or lockfile (pantsbuild#12807)

Improves upon the solution from pantsbuild#12076. There are some args like `--manylinux` that we need to use both with the lockfile.pex and the final `PexFromTargets`. But many others like `--strip-pex-env` are irrelevant for the lockfile.pex, and we only need to set on the final PEX.

WIth this diff:

```diff
diff --git a/build-support/bin/BUILD b/build-support/bin/BUILD
index d9751179b..2a6e76478 100644
--- a/build-support/bin/BUILD
+++ b/build-support/bin/BUILD
@@ -17,4 +17,4 @@ pex_binary(name="generate_docs", entry_point="generate_docs.py", dependencies=["
 pex_binary(name="generate_github_workflows", entry_point="generate_github_workflows.py")
 pex_binary(name="generate_user_list", entry_point="generate_user_list.py", dependencies=[":user_list_templates"])
 pex_binary(name="release_helper", entry_point="_release_helper.py")
-pex_binary(name="reversion", entry_point="reversion.py")
+pex_binary(name="reversion", entry_point="reversion.py", always_write_cache=True)
```

Before:

```
❯ ./pants --no-process-execution-local-cache --no-remote-cache-read --no-pantsd package build-support/bin:
...
23:50:18.32 [INFO] Completed: Installing 3rdparty/python/lockfiles/user_reqs.txt
23:50:18.32 [INFO] Completed: Installing 3rdparty/python/lockfiles/user_reqs.txt
```

After:

```
❯ ./pants --no-process-execution-local-cache --no-remote-cache-read --no-pantsd package build-support/bin:
...
23:49:14.07 [INFO] Completed: Installing 3rdparty/python/lockfiles/user_reqs.txt
...
```

[ci skip-rust]
[ci skip-build-wheels]
Eric-Arellano added a commit that referenced this pull request Sep 10, 2021
…le or lockfile (#12807) (#12836)

Improves upon the solution from #12076. There are some args like `--manylinux` that we need to use both with the lockfile.pex and the final `PexFromTargets`. But many others like `--strip-pex-env` are irrelevant for the lockfile.pex, and we only need to set on the final PEX.

WIth this diff:

```diff
diff --git a/build-support/bin/BUILD b/build-support/bin/BUILD
index d9751179b..2a6e76478 100644
--- a/build-support/bin/BUILD
+++ b/build-support/bin/BUILD
@@ -17,4 +17,4 @@ pex_binary(name="generate_docs", entry_point="generate_docs.py", dependencies=["
 pex_binary(name="generate_github_workflows", entry_point="generate_github_workflows.py")
 pex_binary(name="generate_user_list", entry_point="generate_user_list.py", dependencies=[":user_list_templates"])
 pex_binary(name="release_helper", entry_point="_release_helper.py")
-pex_binary(name="reversion", entry_point="reversion.py")
+pex_binary(name="reversion", entry_point="reversion.py", always_write_cache=True)
```

Before:

```
❯ ./pants --no-process-execution-local-cache --no-remote-cache-read --no-pantsd package build-support/bin:
...
23:50:18.32 [INFO] Completed: Installing 3rdparty/python/lockfiles/user_reqs.txt
23:50:18.32 [INFO] Completed: Installing 3rdparty/python/lockfiles/user_reqs.txt
```

After:

```
❯ ./pants --no-process-execution-local-cache --no-remote-cache-read --no-pantsd package build-support/bin:
...
23:49:14.07 [INFO] Completed: Installing 3rdparty/python/lockfiles/user_reqs.txt
...
```

[ci skip-rust]
[ci skip-build-wheels]
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.

Constraints resolves fail to pass along additional resolves.
3 participants