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

Deprecate "Secondary Ownership" semantics #18737

Merged
merged 3 commits into from
Apr 13, 2023

Conversation

thejcannon
Copy link
Member

Currently only 3 targets have "secondary owners" fields:

  • pex_binary
  • python_awslambda (this assumes the filename is .py Doh!)
  • python_google_cloud_function (this assumes the filename is .py Doh!)

The secondary ownership ability stems from wanting to use a goal by referring to the file (which presumably the "primary" owner doesn't support the goal). E.g. packageing a Python file packages the relevant PEX/Lambda/etc....

However, it is a bit short-sighted:

  • You can run both a pex_binary (secondary) and a python_source (primary). If multiple PEX binaries exist for a single source:
    • Goals like run and paths error on ambiguity and give unhelpful messages (saying that the filename was ambiguous, and then listing the filename as a valid address)
  • There are no secondary owners outside of Python.

So marking for deprecation and removal. Users can find the owners of the files from the specs and pipe that into the relevant goal. (If someone wants, we can add a new goal/flag to aid with this)

Copy link
Member

@kaos kaos left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@stuhood stuhood left a comment

Choose a reason for hiding this comment

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

Nice! Thanks.

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.

Making python_source runnable was a fantastic idea. I agree that thanks to that, secondary ownership is not pulling its weight anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants