Skip to content
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

🐛 Bug Report: Use Default Build Commands #6428

Open
2 tasks done
ItzNotABug opened this issue Oct 2, 2023 · 4 comments
Open
2 tasks done

🐛 Bug Report: Use Default Build Commands #6428

ItzNotABug opened this issue Oct 2, 2023 · 4 comments
Assignees
Labels
bug Something isn't working product / functions Fixes and upgrades for the Appwrite Functions.

Comments

@ItzNotABug
Copy link
Contributor

ItzNotABug commented Oct 2, 2023

👟 Reproduction steps

If there are no build commands passed, e.g. npm install, the build will succeed but the execution will fail because the dependencies are not loaded.

See -

  1. Successful Build (check the build size, no dependencies are loaded)-
Screenshot 2023-10-02 at 1 43 13 PM
  1. Execution Failed -
Screenshot 2023-10-02 at 1 45 25 PM

This makes the optional command, not so optional as we must pass a build command.

👍 Expected behavior

Runtime should check & handle this behaviour and simply call a relevant build command if one doesn't exist for the function.

👎 Actual Behavior

Execution fails.

🎲 Appwrite version

Version 1.4.x

💻 Operating system

Linux

🧱 Your Environment

No response

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@ItzNotABug ItzNotABug added the bug Something isn't working label Oct 2, 2023
@sarojregmi200
Copy link

Hello maintainers,
I want to work on this issue.
Can I be assigned to this Issue?

@stnguyen90 stnguyen90 added the product / functions Fixes and upgrades for the Appwrite Functions. label Oct 3, 2023
@stnguyen90 stnguyen90 changed the title 🐛 Bug Report: [Functions] Use Default Build Commands 🐛 Bug Report: Use Default Build Commands Oct 3, 2023
@stnguyen90 stnguyen90 self-assigned this Oct 3, 2023
@stnguyen90
Copy link
Contributor

@ItzNotABug, thanks for raising this! Let me bring it up with the team.

@gewenyu99
Copy link

Why would you not pass in a build command 🤔 This doesn't feel like a bug. It's expected that if you don't build, you can't run a function 😅

@ItzNotABug
Copy link
Contributor Author

ItzNotABug commented Oct 4, 2023

@gewenyu99 The build commands are marked optional, if I remember correctly.
This doesn't really make sense as on one side it's optional but on the other hand, the function wouldn't just work if it has dependencies.

My suggestion was to check if there's a command passed. If yes then process that, if not then it wouldn't hurt to use a default command.

Its pretty comman where someone would just forget adding the commands when creating a function. This would save a trip to add the commands again and redeployment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working product / functions Fixes and upgrades for the Appwrite Functions.
Projects
None yet
Development

No branches or pull requests

4 participants