Skip to content

feat(gazelle): allow passing multiple files to the manifest generator#1235

Closed
aignas wants to merge 1 commit intobazel-contrib:mainfrom
aignas:feat/gazelle/support-multiple-requirements
Closed

feat(gazelle): allow passing multiple files to the manifest generator#1235
aignas wants to merge 1 commit intobazel-contrib:mainfrom
aignas:feat/gazelle/support-multiple-requirements

Conversation

@aignas
Copy link
Copy Markdown
Collaborator

@aignas aignas commented May 18, 2023

For certain workflows it is useful to calculate the integrity hash of
the manifest file based on a number of requirements files. The
requirements locking is usually done by executing a script on each
platform and having gazelle manifest generator be aware that more than
one requirements file may affect the outcome (e.g. the wheels that get
passed to modules map may come from multi_pip_parse rule) is generally
useful.

This change modifies the generator to support multiple
--requirements flag specification and uses all files that got passed
to generate the final integrity hash.

NOTE: This may require users to regenerate the gazelle_python.yaml files due
to a change in integrity, otherwise this is a backwards compatible change.

For certain workflows it is useful to calculate the integrity hash of
the manifest file based on a number of requirements files. The
requirements locking is usually done by executing a script on each
platform and having gazelle manifest generator be aware that more than
one requirements file may affect the outcome (e.g. the wheels that get
passed to modules map may come from `multi_pip_parse` rule) is generally
useful.

This change modifies the `generator` to support multiple
`--requirements` flag specification and uses all files that got passed
to generate the final integrity hash.
@aignas
Copy link
Copy Markdown
Collaborator Author

aignas commented Jul 10, 2023

This is probably not the best way, because we can use multiple requirements file and a genrule to generate a single requirements file that can be used in this function. That way the hash will change whenever any of the input requirements files changes, but we will be still correct. We can also strip away the comments for them to not affect the hash value.

@aignas aignas closed this Jul 10, 2023
@aignas aignas deleted the feat/gazelle/support-multiple-requirements branch July 10, 2023 01:28
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.

1 participant