-
Notifications
You must be signed in to change notification settings - Fork 11
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
"Error" severity for server.xml config element seems too high, especially when the element would be valid if additional features were activated. #259
Comments
@scottkurz At first I thought you were just proposing that we lower the severity from "Error" to "Warning" or even "Info" along with updating the message to make it clear that all may be fine (especially considering the fact we are not looking at other included server xml files for configured features). But your description covers a lot of different scenarios. So can we agree at least that this diagnostic should not be an "Error" and go ahead and make that change, but leave this issue open for further discussion? As for always using the cached XSD, I'm afraid that doesn't make sense for a couple reasons:
|
That sounds good. Yes, this did sprawl into other related issues.
OK, I did have some thoughts here but realize I didn't list them. First, I was assuming that OL's XSD is a subset of WL's XSD and so we can just validate against the broader WL XSD. So we'd have to abandon the idea of an OL-only validation. So it'd be debatable if we want that but that was my thought. As far as 2., I was thinking we'd have to publish the latest XSD and code LCLS to go download the latest. I think we had talked about publishing the latest XSD in the past so that's debatable too. However, there's another "newer runtime" variation that I'd missed or forgotten, which is the use of the beta. E.g. when the EE 10 features were added we could easily incorporate its beta features. It's striking me now as a bridge too far to have a superset XSD that also includes beta, and WL... every feature ever known to IBM. So I think I'm circling back around to not being too crazy about this idea. Thanks for the discussion though. |
@cherylking I just gave this another look after reading through the code to see how we generate the features list, e.g. starting from io.openliberty.tools.langserver.lemminx.services.FeatureService.getFeatures(String, String, int, String). I see we release features.json artifacts for each of OL, WL, for each release version. For beta, we generate a feature list (which we also do for older versions before we released a features.json). While that obviously requires a whole separate release process to generate and release this XSD artifact... I wonder if we could at least stop and decide whether we think that's desirable? It seems to me like it might be the best compromise, taking for granted that releasing a versioned XSD or WL/OL each is feasible. |
There are three cases to consider in this issue:
<dummyValue/>
.<batchPersistence/>
element without one of thebatch*
features configured in server.xml.<batchPersistence/>
element starting from just the kernel artifact without any batch features yet installed.From the runtime perspective, an unknown element will generally be ignored. It's something to be aware of but it seems hard to justify as a true error?
If we wanted to change the severity but otherwise keep our existing approach using the gen'd vs. cached XSD, I think we'd handle each of these like:
Having said all that, it's worth noting this is a place where it can be a bit confusing that the tools produce different diagnostic messages depending on whether you've started dev mode or not (mapping on to whether you're using a generated or cached XSD).
This would become even more noticeable, say, if we can't lower the XSD validation severity in 1. and the same time as in 2.... you could have a situation where the diagnostic appears one way when you first clone, then differently when you first start, then differently again if you did a clean.
It raises the question: should we consider validating against the cached XSD always ?
Though that too has some downsides... what if the cached XSD isn't updated with some new (beta?) features that we could incorporated with the custom-generated XSD approach we used today? (Or with user-developed features).
OK, this is long enough for an initial comment. Will have to discuss more.
The text was updated successfully, but these errors were encountered: