-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
index.html (welcome page) now dynamic #37680
Conversation
dc0b245
to
e919139
Compare
Wdym about the codestart info? It's added in readme and index.html - now jt will just be in the readme or is it something different you refer to? |
I like the idea but what happen in test and prod mode? |
This comment has been minimized.
This comment has been minimized.
@maxandersen Yes, that is what I mean, it is not in the index.html anymore. I could probably still get it with some effort. (this is where I need @ia3andy to comment)
@cescoffier in test and prod the route that serve the index.html will not be created. This (I think) is more correct. At the moment the generated index.html will be served (in prod !) and it's highly unlikely that this is what the user want. The user can create their own index.html and then that will be served in dev, test and prod. However, we should probably guide the user to the UI options in Quarkus (Quinoa, Web Bundler, Renade etc) and a plain static file in META-INF resources has it's limits. Maybe we need a guide that starts with plain static resource, then Renade, then Web bundler then Quinoa ? |
e919139
to
1aaef9b
Compare
@phillip-kruger ok, that's what I got. It is a change in behavior that I would consider to be a breaking change (aka need to be documented). |
Why is this build failing :( |
This comment has been minimized.
This comment has been minimized.
1a00876
to
676a0f0
Compare
@maxandersen @cescoffier I fixed the issues in the CI Build, please can you have a look. If you are happy as is we can maybe merge and then improve going forward ? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
We have a chicken egg problem here... I need to spend some more time on this. Please ignore PR for now, I'll ping you when ready |
The message should be something like Also when it's available we should point to the new guide (still not available yet) about creating Web apps with Quarkus: #37097 (comment) |
For the data I get from the codestarts, now that this has moved, we should move this info to the extension descriptors and provide a way for the dev-ui to access it: @phillip-kruger do you already have access to this descriptor data from the dev ui? |
Yes I have, but I don't think all extensions is up to date w.r.t those entries. |
6af9a0d
to
685623a
Compare
I don't think it makes sense to have this info in the extension descriptor available at runtime. |
I am not sure what you mean/imply? |
@ia3andy we shouldn't add wall of text into extensions.yaml that is part of runtime artifact that is only relevent for codestarts/dev page. |
The Big Rename for REST is already in. |
Yes, I rebased this pr on that, had a few conflicts to resolve. |
Signed-off-by: Phillip Kruger <[email protected]>
66be0c3
to
5219229
Compare
This comment has been minimized.
This comment has been minimized.
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.
Let's get this one in, we can always improve later.
Thanks everyone :) |
good stuff @phillip-kruger was about to comment same as clement: get it in an iterate. what will be important is that we document how this works/breaks(?) when trying to add/update content. One thing - i didn't check - does codestart generate with or without index.html in place? |
It should now generate without the index.html |
cool - and it still puts index.html when generating for 3.8 and older? |
Yes |
The welcome page
The static index.html page that get generated with a quarkus app, is now replace with a dynamic page from Dev UI. This page will render on the naked domain if the user does not provide their own index.html (and only in Dev mode)
The not found page
This PR also moves the Not Found page (that renders in Dev Mode) to Vertx-http, removing it from resteasy-reactive, resteasy-classic, spring-web, reactive-routes. Also, undertow should also now display this not found page.
The handler for Not found is last in the queue, so any user, or extension, can override this behavior, by adding their own handler for Not Found.
@ia3andy ResumeOn404BuildItem should not be needed anymore. Please can you confirm (I might be wrong) and if so we can remove ResumeOn404BuildItem on another PR
The management interface is now also working. The links (for management interfaces) was omitted in the NotFoundPage (in the current version). I have now added them, and also added a Not Found Page for the management interface. So now if you enable management, and go to 0.0.0.0:9000/non-existing-resource, that will show the Not Found page, with the links correctly added
Breaking change (with a workaround if needed)
In the current version, if you have a JAX-RS Filter, that filter will run, even in the case that the requested resource was not a REST resource (in my opinion, that is wrong). This will not happen anymore. Filters for JAX-RS will now only run on JAX-RS resources. In the case that you want your Filters to also run on non JAX-RS resource, you need to add your own ExceptionMapper:
Now, JAX-RS becomes responsible for the Not Found resources, and the Filter will run. In the current version where this always happens, it makes it impossible for other extensions to handle Not Found.
The routes page
This PR also includes a new tab in the Endpoints menu in Dev UI, that display the routes and their order. It's not perfect, but something we can build on, and it does help with debugging.
This also: