-
-
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
Generate release_date property in netkan #3059
Generate release_date property in netkan #3059
Conversation
You are referencing the release date of "the mod" in the spec and schema, but isn't it more like the release date of "the mod version"/"the mod release"? |
Whoa, the schema says this: Line 90 in c451a20
"Drop the leading v" is not something we've ever done. I'll go ahead and remove that now... |
Most of the existing text uses the same phrasing, but |
f5d5188
to
075abf2
Compare
I'm very much in favour of this implementation, keeps our source of truth consistent and means we get our date/times from upstream. |
Planning to improve on #3031 so PRs like KSP-CKAN/CKAN-meta#1940 don't get submitted... |
OK, I think that's done in the latest commit. |
68e7042
to
bbc8222
Compare
bbc8222
to
1dbd34d
Compare
KSP-SpaceDock/SpaceDock#265 is in production! SpaceDock's timestamps have time zones! |
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 go!
Motivation
A longstanding request is to display when a mod was released, see #1155 and #2916.
This PR begins the process by capturing these values in current metadata where possible.
Changes
release_date
property in ISO 8601 formatrelease_date
property generated automatically based on API dataCkanModule
now has arelease_date
property that future changes can use to display the value to the userGitHubApi
was attempting to parse the date properties returned by the GitHub API. However the JSON parsing library already parsed them into dates! TheToString
call produced an intermediate format without timezone (rather than the original raw string as expected), so the TZ was lost. Now we use the date as provided by the parser.StagingTransformer
will no longer stage modules whereksp_version_min
is set to some prior version andksp_version_max
isn't set at all. This should help with the server IO load (staging is costly), as well as reduce the maintenance burden for mass metadata sweeps like this (lots of PRs to review).I plan to work on the UI side after this is merged (which will re-index almost all mods in a big sweep), so I can have plenty of test data.
Notes
x_netkan_asset_updated
and therefore stripped out byStripNetkanMetadataTransformer
. Now thatrelease_date
is in the schema, we populate it instead and don't strip it.UnixDateTimeConverter
only supports seconds, so we have to roll our own converter.RelationshipDescriptor
andResourcesDescriptor
are split out into their own files to reduce clutter inCkanModule.cs