ripe-gigabyte-88964
10/02/2023, 4:15 PMMultipleSourcesField where I just provide the default field. However, in pants peek no sources are listed, I just see sources_raw. Do I need to write custom code to hydrate the sources?curved-television-6568
10/02/2023, 4:20 PMripe-gigabyte-88964
10/02/2023, 4:24 PM"sources_raw": [
"Chart.yaml",
"Chart.yml",
"values.yaml",
"values.yml",
"values.*.yaml",
"values.*.yml",
"templates/*.yaml",
"templates/*.yml",
"ci-state.yaml",
"ci-state.yml",
"ci-state.*.yaml",
"ci-state.*.yml"
]
and this is the field
class CustomHelmSourcesField(MultipleSourcesField):
default = tuple(
itertools.chain(
*([f"{filename}.yaml", f"{filename}.yml"] for filename in ["Chart", "values", "values.*", "templates/*", "ci-state", "ci-state.*"])
)
)
expected_file_extensions = (".yaml", ".yml", ".tpl")curved-television-6568
10/02/2023, 4:32 PMtuple(itertools.chain.from_iterable(["name1", "name2"] for filename in [...]))curved-television-6568
10/02/2023, 4:36 PMcurved-television-6568
10/02/2023, 4:37 PMripe-gigabyte-88964
10/02/2023, 5:13 PMCustomHelmSourcesField there's the common target fields, Dependencies , and a few more custom StringField types.curved-television-6568
10/02/2023, 5:21 PMripe-gigabyte-88964
10/02/2023, 5:21 PMChart.yaml, values.yaml, and values.dev.yamlcurved-television-6568
10/02/2023, 5:22 PMripe-gigabyte-88964
10/02/2023, 5:22 PMBUILDripe-gigabyte-88964
10/02/2023, 5:23 PMcurved-television-6568
10/02/2023, 5:25 PMcurved-television-6568
10/02/2023, 5:26 PMripe-gigabyte-88964
10/02/2023, 5:27 PMripe-gigabyte-88964
10/02/2023, 5:27 PMripe-gigabyte-88964
10/02/2023, 5:28 PMcurved-television-6568
10/02/2023, 5:28 PMcurved-television-6568
10/02/2023, 5:29 PMcurved-television-6568
10/02/2023, 5:29 PMripe-gigabyte-88964
10/02/2023, 5:32 PMcurved-television-6568
10/02/2023, 5:39 PMcurved-television-6568
10/02/2023, 5:41 PMripe-gigabyte-88964
10/02/2023, 5:42 PMcurved-television-6568
10/02/2023, 5:42 PMcurved-television-6568
10/02/2023, 5:43 PMcurved-television-6568
10/02/2023, 5:44 PMinstructions field for the docker_image target can act as a source field replacement.curved-television-6568
10/02/2023, 5:45 PMdocker_image the instructions rules creates a Dockerfile out of the field value, but could just as well pick up files from disk etc.ripe-gigabyte-88964
10/02/2023, 5:45 PMhelm_chart target does have multiple source fields. https://github.com/pantsbuild/pants/blob/7fb39c28ec9a289c35ff289eff95925ec19c574d/src/python/pants/backend/helm/target_types.py#L199-L200curved-television-6568
10/02/2023, 5:46 PMcurved-television-6568
10/02/2023, 5:46 PMcurved-television-6568
10/02/2023, 5:47 PMpeek etc.. not sure if that’s been looked atripe-gigabyte-88964
10/02/2023, 5:47 PMcurved-television-6568
10/02/2023, 5:47 PMripe-gigabyte-88964
10/02/2023, 5:51 PMsources": [
"buildbarn/Chart.yaml"
],
"sources_fingerprint": "f1ef2543a76d156d9b705ba40578031e44d580f715b703e1cdaccd47d729195f",
"sources_raw": [
"values.yaml",
"values.yml",
"templates/*.yaml",
"templates/*.yml",
"templates/*.tpl",
"crds/*.yaml",
"crds/*.yml"
],witty-family-13337
10/02/2023, 5:57 PMpeek in the Helm backend so I guess this can be considered an issue. I've been considering refactoring the Helm chart target into smaller targets, both of which with a single sources field, but for a different reason. This could be yet another reason to do soripe-gigabyte-88964
10/02/2023, 5:57 PM--changed-since flag to work correctly.witty-family-13337
10/02/2023, 5:58 PMwitty-family-13337
10/02/2023, 5:59 PMripe-gigabyte-88964
10/02/2023, 6:02 PMwitty-family-13337
10/02/2023, 6:08 PMwitty-family-13337
10/02/2023, 6:10 PM