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

Wing console should not stop working when operations are not supported #7130

Closed
boyney123 opened this issue Sep 16, 2024 · 2 comments · Fixed by #7132
Closed

Wing console should not stop working when operations are not supported #7130

boyney123 opened this issue Sep 16, 2024 · 2 comments · Fixed by #7132
Labels
🛫 console Console ✨ enhancement New feature or request needs-discussion Further discussion is needed prior to impl 🎨 sdk SDK

Comments

@boyney123
Copy link
Contributor

Use Case

I'm building a Wing application and have been using the Wing console to interact with my API, DynamoDB table and Vite user interface.

I want to create presigned urls for my application, but I run into this error (see link below).

Error: Resource root/Default/UploadBucket does not support inflight operation signedUrl. It might not be implemented yet.

Presigned urls are not yet supported in the console (which we are working on), but IMO the console should still work and not break. My developer experience and flow is completely broken now, the only way I can think of is to remove the presigned stuff in my code or write a hack to ignore in SIM.

See the issue

Proposed Solution

Show some warnings in the console. Don't let the console just break, let me carry on using it without the support for missing operations.

Implementation Notes

No response

Component

No response

Community Notes

  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.
  • If this issue is labeled needs-discussion, it means the spec has not been finalized yet. Please reach out on the #dev channel in the Wing Discord.
@boyney123 boyney123 added ✨ enhancement New feature or request 🛫 console Console needs-discussion Further discussion is needed prior to impl labels Sep 16, 2024
@monadabot monadabot added this to Wing Sep 16, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New - not properly defined in Wing Sep 16, 2024
@Chriscbr Chriscbr added the 🎨 sdk SDK label Sep 16, 2024
@Chriscbr
Copy link
Contributor

The error here is a result of the Wing compiler realizing you are trying to use an inflight method that isn't supported for the specific platform the app is being built for - in this case, the simulator.

When you're compiling to cloud targets, like AWS, Azure, or GCP, I think the current behavior makes sense -- we raise an error at compile time so that you don't have to wait until your app is deployed to find out that e.g. there's no implementation today for signedUrl on GCP. But if you're trying to run an app on the simulator, I can see how this feels wrong -- it totally breaks the development flow, and in large apps, many parts of your code may still work despite the one operation not working.

It should be straightforward to change this in the SDK so that inflight methods are always valid for the "sim" implementations of resources, and raise a runtime exception in these cases instead.

@github-project-automation github-project-automation bot moved this from 🆕 New - not properly defined to ✅ Done in Wing Sep 16, 2024
@monadabot
Copy link
Contributor

Congrats! 🚀 This was released in Wing 0.85.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🛫 console Console ✨ enhancement New feature or request needs-discussion Further discussion is needed prior to impl 🎨 sdk SDK
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants