-
-
Notifications
You must be signed in to change notification settings - Fork 345
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
[Proposal] Release Date #2916
Comments
Early thoughts... SpecConcur 100%, ISO 8601 UTC is the way to go. In fact, I think that's what KSP-CKAN/NetKAN-Infra#42 did. NetKANI need to think about this idea a bit more. One point is that "the ability for anyone to produce metadata that matches exactly what the bot produces" is already sacrificed if the bot runs with IndexerI'm lukewarm on building this around a special override of Luckily the overall architecture does not depend on that detail and would work just as well with a function like Manual MetadataWhat if we need to change Historical MetadataSounds fine, probably easy enough to adapt KSP-CKAN/NetKAN-Infra#42 to create the script. |
So since NetKAN sets I'm thinking that's not desirable. There is nothing in those changes that would justify to a user why we were now saying that a previously available mod now has a newer release date. I think this was the reason why KSP-CKAN/NetKAN-Infra#42 copies forward the date property when the file already exists. |
We can make this an implicit default, but it would make a smoother transition if it's optional to begin with. Or just write the Indexer side of things first (making the equality check handle the lack of
That's a fair point. However we don't currently use equality in this manner and overriding these methods is common practice (they aren't special, just defaults inherited from class CkanInflated(Ckan):
def __eq__:
fuzzy equality check here I'm not tied to either way, but rather keeping our
That's a good point and entirely undesirable. I was hoping for us to be able to get away with not altering the output of the NetKAN (a lot of effort has gone into making the output consistent, putting it through python's parser introduces variability), but maybe we'll have to. NetKAN should still be the source of truth for this information, so that in future it can pull it from the relevant APIs when available.
We wouldn't be locking it down, but it would be intentional at that point to accept it, rather than accidental. The CI is currently pass/fail, so we don't have much option beyond that. |
Thinking on this a little more, we could add 2 methods to
This shifts most of the burden out of the indexer, into |
Working on #3059 revealed that all but 15 currently indexed modules can get For the 15 mods that won't have We can still do a historical import if we feel like it. I think this should be done after the Inflator is updated and we have the current releases' properties set, so we don't clobber them. |
Problem
Knowing when there are new mod releases has been a long standing request, #1155 was opened in Mid 2015! Historically this has been challenging for two reasons:
ckan
from anetkan
in exactly the same manner as our bots. This had the side effect of it being stateless, which has meant (especially with the old infrastructure) that populating a field with a current time stamp would mean it would always change.Since #2789, we have a number of ways we can tackle this and a solution should be straight forward!
Suggestions
Spec
Add 'release_date' to the schema, that complies with the following:
Example:
NetKAN
It is desirable to keep Netkan as the source of the truth. It persists the ability for anyone to produce metadata that matches exactly what the bot produces.
As a consequence
release_date
field--release-date
flag on Netkan means we can switch this on when we're readyIndexer
Currently the indexer is using an MD5 generated by SQS to compare with the file on disk. @HebaruSan has already put a lot of work into creating a
Ckan
class we can lean on to do an equivalence check. For example, if an existing ckan is found, load it in as aCkan
and compare it to the received inflation. TheCkan
class to have a custom__eq__
method that compares the objects, but ignores therelease_date
.inflated == existing
instead of the MD5srelease_date
flagManual Metadata
We still need to update manual data occasionally, so we should add some tests to our CI to ensure that we don't accidentally overwrite the release data field if it exists or submit metadata without the field if it doesn't.
Historical Metadata
Historical metadata should be treated as a separate exercise. We can dig out reasonable approximations from the git history and populate them in all in one pass (disabling webhooks/canceling the tests as needed). We did something similar when we populated the historical download hashes (#1682 + #1703).
Summary
It would be wonderful to get this long standing request added, so I welcome any critique and suggestions.
The text was updated successfully, but these errors were encountered: