Skip to content

Store last_synced_at on licenses table

Tyler Amos requested to merge 333871-fix-last-sync-in-subcription-details into master

What does this MR do?

Related to #333871

As described in #333871, we want to show an accurate value for when the last sync occurred for a cloud license. This MR modifies the value used for last_sync in the CurrentLicenseType GraphQL type. For cloud licenses, this value will be pulled from a new datetime attribute last_synced_at introduced to the license object. For non-cloud licenses, the value will be nil. This MR also updates the activate service and the seat link sync service to set last_synced_at on new cloud license records.

Migration logs

Up
== 20210624180613 AddLastSyncedAtToLicenses: migrating ========================
-- add_column(:licenses, :last_synced_at, :datetime_with_timezone)
   -> 0.0039s
== 20210624180613 AddLastSyncedAtToLicenses: migrated (0.0040s) ===============
Down
== 20210624180613 AddLastSyncedAtToLicenses: reverting ========================
-- remove_column(:licenses, :last_synced_at, :datetime_with_timezone)
   -> 0.0092s
== 20210624180613 AddLastSyncedAtToLicenses: reverted (0.0114s) ===============

Screenshots (strongly suggested)

Cloud License example Screen_Shot_2021-06-22_at_3.47.54_PM

Non-cloud license example Screen_Shot_2021-06-22_at_3.46.19_PM

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Tyler Amos

Merge request reports