Skip to content

Conversation

@kiukchung
Copy link
Contributor

Summary:
Reported on torchx.__version__ since torchx follows PEP-440 standards for the version string, it could be that certain torchx builds (specifically those that are built from source) could have a "local label".

For example: 0.8.0dev0+fb would be a Meta "local build".

Added logic to clean the pod label values to meet k8s specs specified in https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/

Specifically:

Valid label value:

* must be 63 characters or less (can be empty),
unless empty
* must begin and end with an alphanumeric character ([a-z0-9A-Z])
* could contain dashes (-), underscores (_), dots (.), and alphanumerics between.

We first replace any invalid chars with a valid one (".") and finally truncate each pod label value to a MAX length of 63.

Reviewed By: ndacosta, AbishekS

Differential Revision: D85796595

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 30, 2025
@meta-codesync
Copy link

meta-codesync bot commented Oct 30, 2025

@kiukchung has exported this pull request. If you are a Meta employee, you can view the originating Diff in D85796595.

@codecov-commenter
Copy link

codecov-commenter commented Oct 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.62%. Comparing base (7abb9a2) to head (af49af4).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1157   +/-   ##
=======================================
  Coverage   91.61%   91.62%           
=======================================
  Files          84       84           
  Lines        6583     6589    +6     
=======================================
+ Hits         6031     6037    +6     
  Misses        552      552           
Flag Coverage Δ
unittests 91.62% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

kiukchung added a commit that referenced this pull request Oct 30, 2025
Summary:
Pull Request resolved: #1157

Reported on `torchx.__version__` since torchx follows PEP-440 standards for the version string, it could be that certain `torchx` builds (specifically those that are built from source) could have a "local label".

For example: `0.8.0dev0+fb` would be a Meta "local build".

Added logic to clean the pod label values to meet k8s specs specified in https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/

Specifically:

```
Valid label value:

* must be 63 characters or less (can be empty),
unless empty
* must begin and end with an alphanumeric character ([a-z0-9A-Z])
* could contain dashes (-), underscores (_), dots (.), and alphanumerics between.
```

We first replace any invalid chars with a valid one (`"."`) and finally truncate each pod label value to a MAX length of 63.

Reviewed By: ndacosta, AbishekS

Differential Revision: D85796595
@kiukchung kiukchung force-pushed the export-D85796595 branch 2 times, most recently from 6e98b19 to fdd738a Compare October 30, 2025 17:09
kiukchung added a commit that referenced this pull request Oct 30, 2025
Summary:
Pull Request resolved: #1157

Reported on `torchx.__version__` since torchx follows PEP-440 standards for the version string, it could be that certain `torchx` builds (specifically those that are built from source) could have a "local label".

For example: `0.8.0dev0+fb` would be a Meta "local build".

Added logic to clean the pod label values to meet k8s specs specified in https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/

Specifically:

```
Valid label value:

* must be 63 characters or less (can be empty),
unless empty
* must begin and end with an alphanumeric character ([a-z0-9A-Z])
* could contain dashes (-), underscores (_), dots (.), and alphanumerics between.
```

We first replace any invalid chars with a valid one (`"."`) and finally truncate each pod label value to a MAX length of 63.

Reviewed By: ndacosta, AbishekS

Differential Revision: D85796595
kiukchung added a commit that referenced this pull request Oct 30, 2025
Summary:
Pull Request resolved: #1157

Reported on `torchx.__version__` since torchx follows PEP-440 standards for the version string, it could be that certain `torchx` builds (specifically those that are built from source) could have a "local label".

For example: `0.8.0dev0+fb` would be a Meta "local build".

Added logic to clean the pod label values to meet k8s specs specified in https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/

Specifically:

```
Valid label value:

* must be 63 characters or less (can be empty),
unless empty
* must begin and end with an alphanumeric character ([a-z0-9A-Z])
* could contain dashes (-), underscores (_), dots (.), and alphanumerics between.
```

We first replace any invalid chars with a valid one (`"."`) and finally truncate each pod label value to a MAX length of 63.

Reviewed By: ndacosta, AbishekS

Differential Revision: D85796595
Summary:

Reported on `torchx.__version__` since torchx follows PEP-440 standards for the version string, it could be that certain `torchx` builds (specifically those that are built from source) could have a "local label".

For example: `0.8.0dev0+fb` would be a Meta "local build".

Added logic to clean the pod label values to meet k8s specs specified in https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/

Specifically:

```
Valid label value:

* must be 63 characters or less (can be empty),
unless empty
* must begin and end with an alphanumeric character ([a-z0-9A-Z])
* could contain dashes (-), underscores (_), dots (.), and alphanumerics between.
```

We first replace any invalid chars with a valid one (`"."`) and finally truncate each pod label value to a MAX length of 63.

Reviewed By: ndacosta, AbishekS

Differential Revision: D85796595
@meta-codesync meta-codesync bot merged commit 1e0492c into main Oct 31, 2025
19 of 23 checks passed
@meta-codesync meta-codesync bot deleted the export-D85796595 branch October 31, 2025 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants