fix: change manifest priority for uv workflow #820
+36
−87
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes
There are 2 changes in this PR that I thought were small enough to be fit in one:
pyproject.tomlfile.a. Previously, we had two separate flows for exporting from
uv.lockto a temporaryrequirements.txt, now we use the one flow after callinguv lockwhen it doesn't already exist.requirements.txtis the default manifest that we look for.a. This is because of the scenario outlined below and in feat: Python UV workflow #756 (comment). This change should fix that because we will read the requirements.txt no matter what if it exists. It doesn't make a ton of sense to have both but the deps are in
pyproject.tomlso I'm making the choice that ignore that case.Also of note is that I added a python version to the
uv exportcall because in testing I noticed that sometimes it would not be using the same as the runtime of the functionDescription of how you validated changes
Ran and updated unit tests to confirm this change did as expected. I also used SAM CLI with a test project that had both
requirements.txtandpyproject.tomlto confirm that it chose requirements as the manifest to read. This required a change in SAM CLI (pending in aws/aws-sam-cli#8549) that allows manifests to be passed asNone. Right now this only applies to UV, which could operate with multiple manifests.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.