Community
Participate
Working Groups
The publishers are traditionally very lenient about error conditions. This was in particularly necessary when p2 was introduced, and hence people needed to generate p2 metadata for artifacts they had not produced themselves. If however the publishers are called directly after an artifact has been built, one does not want to tolerate any errors, but rather fail the build immediately. This is currently not possible (without text matching) with most publishers. The requirements are as follows: - The callers of the publishers need to be able to choose which error conditions are fatal and which aren't. - The errors/warnings should be have a severity that may be used as default severity by the callers. Together with the first requirements, the callers would be able to specify "fail for all errors and warning xyz". - The current behaviour of the publishers shall remain available. My idea for implementing this is to - return all errors & warnings in the MultiStatus returned by the publishers, - identify errors/warnings with a type and error code, - provide methods that answer the question whether a MultiStatus used to be fatal in Indigo.
These bugs propose introducing new warnings/errors in the publishers: bug 342198, bug 331683, bug 325611 Once we have agreed on a concept (in this bug), they should be easy to fix.
Given that the IPublisherAction#perform returns an IStatus, your suggested implementation makes sense. The only thing I'm not sure about is whether we really want to preserve the old behaviour. After all people use to get bad metadata without noticing and we are now making them a favour in telling them earlier. What could be interesting is adding a verbose mode to the various publisher apps so one could see the non fatal errors like warnings / infos.
(In reply to comment #0) > My idea for implementing this is to > - return all errors & warnings in the MultiStatus returned by the publishers, > - identify errors/warnings with a type and error code, I like them. > - provide methods that answer the question whether a MultiStatus used to be > fatal in Indigo. It might be a bit complicated. Publisher mostly is used as a standalone application. It should return error code to caller if something wrong happened in publishing process. The caller script or application can know whether it's indeed failed or not.
(In reply to comment #2) > The only thing I'm not sure about is whether we really want to preserve the old > behaviour. After all people use to get bad metadata without noticing and we are > now making them a favour in telling them earlier. This makes sense. We really shouldn't be ignoring things which are really errors. And as long as we don't have a concrete case where the definition of what is an error differs for different users, we don't need to implement the compatibility layer proposed here.