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
Add a mode to allow absent "date" for future releases #398
Comments
appstreamcli on CI fails with error: > E: org.gimp.GIMP:394: release-time-missing date I didn't have such error on my local build, because it is a new check only recently added. The CI appstreamcli errored-out this way. It forces us to add a bogus release date since we don't know it yet. I chose May 29, because we usually release on Sundays, and it might soon be time to make a dev release (so who knows, we might get lucky and it might happen this day), though it should not be taken as a promise or a real plan just now. I just needed to fill something in, in order to fix the CI. I opened a report to ask that appstreamcli proposes a relaxed check mode where we can test on the <release> tag before knowing the future date: ximion/appstream#398
|
I'm not a fan of relaxed checks in general - either a file is valid or it isn't. Usually there's a smarter way to solve these issues, and Here, I think the best solution would be to simply relax this check for |
Sure I agree. And the fact is that our AppStream file is not valid at this point, but unless we invent time travel, we can't do anything about it. We still want to be able to translate the content as early as possible, and we also want to catch other types of bugs in this file as soon as we create them (but this specific bug, the missing date, is just a circumstantial bug which can't be fixed, at least not in our current very bazaar-style organization which comes with the fact everything is volunteer-managed). So basically there are times where we want to accept a partial-invalidity while catching others.
Here with I'd prefer the tool to acknowledge the fact that projects don't necessarily know their release date in advance.
It is not related to Maybe you got confused by the odd/even versionning scheme since I was saying an odd micro version is for dev code. It's not "dev code" in the same meaning as Anyway it's all not so relevant here. All this to say, what I am asking has nothing to do with the release
So no, this doesn't work, regarding the This being said, it doesn't have to be a generic relaxed check. I don't mind if we have a flag to only relax a specific check. It's cool with me. Like |
|
Looks like you'll need to wait a bit for the tag override system to be implemented. This isn't the first thing on my todo list, but it's actually quite high up there, so might even be part of the next release. |
|
Awesome. By the way, I would suggest to revert the last commit (db2f51d) for the time being. As said previously, I don't see why |
Just to add to that, I think that's a terrible idea in any form, and the output format of |
I do agree.
Right now, I don't use my grep hack, this was mostly to demonstrate how bad it was right now to handle this case (which is a normal case of software development, it's not like our situation of not knowing our release date is a really exceptional case!). For the time being, I just used a random date, though I consider this "hack" just as bad, maybe even worse than the grep hack (because in worst case scenario, since it hides the issue, it might be possible that we forget to fix the date at release-time, hence we release with wrong metadata). So now that you tell me about this |
|
Try |
Since commit c13a605,
appstreamcliis complaining on an absent date which makes complete sense for the finale file validation. Nevertheless we usually create the<release>tag as early as possible in advance. One of the reasons is that the<description>can be (and should be!) localized so we need to leave time to translators by filling the release text as soon as we know it.At this point, we might not know the release date yet. Even if we had a global timeframe, it will likely shift as we discover last-minute issues. We could just set a random date, but it means that (1) we need to edit it again, possibly several times, as we get closer to the release, making useless commits and (2) the worst case is that if we forget to edit the date (because the
appstreamclitest didn't return any error), we might release with wrong release date in metadata.On the other end, if we were allowed to ignore the date with a specific relaxed check, then when we are preparing our actual release, the test would use the stricter check requiring a date. This way, we can prepare the
<release>tag without knowing the date even long in advance, and still get the date validation upon release. This is possible in GIMP (my use case) since we use even micro version for release versions and odd micro versions for dev code.So for instance, most of the time, our build would test our XML, ignoring the release date, with:
And when we bump the micro version, preparing for the release, it would test with:
Hence allowing us to spot the missing date (much better than having a random date we set long ago which would not trigger any kind of warning).
For the record,
appstream-utilhad thevalidate-relaxmode which was doing just that (among other differences), i.e. ignoring the<release>date.Thanks!
The text was updated successfully, but these errors were encountered: