-
Notifications
You must be signed in to change notification settings - Fork 293
Overwrite existing requirements.txt file when generating from poetry #402
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
Overwrite existing requirements.txt file when generating from poetry #402
Conversation
I also just realized one of the log messages from #390 that I submitted is really misleading. It removes |
@dschep Any thoughts on merging this? |
@dschep Please help review and merge this fix. Without it, deploying function only ( |
@dschep welcome back, I see you're active again. 😉 Any new chance of shipping this? Or are there any another maintainers who might be able to give it a review? |
@bsamuel-ui I see you going through cleaning up old issues. Can this be merged as a follow up item from #390 ? That PR doesn't currently fix the issue for me without these changes. |
I can confirm that this is still a problem with 5.1 version. I have to add 'rm -f .serverless/requirements.txt' to run before function packaging using serverless-scriptable-plugins. To reproduce, first make a normal deploy. See that the .serverless folder is there. Then do a single function deploy, at which it will fail because current code aren't allowed to overwrite file. |
I haven't tested, but I can also confirm just by looking at the latest release that the issue isn't resolved yet. The overwrite I've added here is necessary as @lephuongbg has said. |
Thanks! this was the reproducing steps I needed. Things I've learned:
After further digging, I've found this to be true - that there's These can be seen with
vs
We can see that the That lifecycle event is where the core AWS plugin is removing the So to recap, here's what the problem is:
So there's a few of paths forward here that I can see:
I'm leaning towards the first, and adding a backlog issue to do the second later. Curious to know what @bsamuel-ui and @AndrewFarley might think about this, as well as any other ideas. |
Upon further testing, I tried adding the suggested override and it still fails - largely due to the input of a function not having a package artifact.
|
@miketheman This PR doesn't look like it would break anything, so I would give it a thumbs-up as a possible preventative measure just for the sake of consistency. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
based on the current behaviors, I'm approving this. @tpansino can you please rebase against current master
branch to run it against the most recent test suite?
@miketheman That was another bug: serverless/serverless#6752. You could add an empty |
@miketheman Sorry, I somehow didn't get notified of your approval. I merged |
Thanks for submitting this @tpansino ! @miketheman can this get included into next release? |
Fixes #393 (I think)