Skip to content
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

Model architecture: Share & story migration #3654

Closed
10 of 12 tasks
soyarsauce opened this issue Aug 20, 2019 · 23 comments
Closed
10 of 12 tasks

Model architecture: Share & story migration #3654

soyarsauce opened this issue Aug 20, 2019 · 23 comments
Assignees

Comments

@soyarsauce
Copy link
Contributor

soyarsauce commented Aug 20, 2019

As a map owner
I want my v8 map to load old v7 generated share links
So that I don't break old links

Other notes:

  • terriajs-server is already being used when loading share links, so it makes most sense to do this at the terriajs server.
  • dragging catalogs into browser
  • non-server-side-share-links (JSON in URL - this is unofficially supported, so do we officially support this? NO)
  • properties that v8 doesn't understand
  • catalog types that v8 doesn't understand
  • any viewstate-ey things that aren't implemented
  • any other config
  • (what other warnings we don't even need to throw warnings about?)
  • v7 shares with init sources shared

DoD:

  • Unit test written (if applicable)
  • Works on mobile (or deliberately disabled for mobile)
  • Code/peer reviewed (if didn't pair)
  • Relevant docs are updated
  • Previewable/deployed to dev (see separation of deployments)
  • Previewable/deployed to test (see separation of deployments)
  • (If a map-specific ticket) Issue linked to a release ticket

Acceptance Criteria:

  • Loading old share links (~0.0.05) into a v8 map works
  • Server passes some message to client so that the payload has a "this used to be v7"
  • A UI warning to show that we've detected a v7 link was loaded in and that it may not work as intended
  • v7 share data is applied at user strata level

As a second pass

  • v7 share links containing stories will turn into working v8 stories

Background context

We've versioned mobx branch shares to 8.0.0, while non-mobx is on 0.0.05 - we should use this information to transform and preserve functionality of old share links as much as possible

Wing Ho [2:41 PM]
so something that came up on gitter - is mobx going to break
`0.0.05` share links? i haven't looked at how `8.0.0` (mobx versioned constant)
differs but i imagine we do some transformation from 0.0.05->8.0.0 within
terriajs, before putting it through the mobx logic?

Stephen Davies [3:29 PM]
@soyarsauce I’m not sure we’ve really thought it out,
but I think the result will be no; all share links will be broken (edited) 


Wing Ho [3:31 PM]
yeah that's what i mean, we put the payload through some sort
of migration when we see 0.0.05 to transform it into mobx-eatable-format?

Stephen Davies [3:32 PM]
Possibly for buckets we control we could convert all
the share data to mobx-compatible while converting the catalog of an instance
But a lot of our share data is mixed Maybe IDs will save a lot of it and we can
preserve what items are enabled, the camera angle and the time

Wing Ho [3:34 PM]
i wouldn't want to change the content in buckets themselves -
they should remain immutable, and we bundle the transformer for 0.0.05->8.0.0
either in terriajs-server or in terriajs itself

Stephen Davies [3:38 PM]
Yeash, I guess a simple transformer that would work is
iterate through all the items, guess ids for shared items without ids, apply a
transformation specific to the item’s type that tries to preserve as much of the
state about the catalog item while outputting new share attributes

Wing Ho [3:44 PM]
:+1:  sounds like a post-DT-pre-bigbangmerge piece of work
@soyarsauce
Copy link
Contributor Author

Also needs to work for story

@soyarsauce soyarsauce changed the title Model architecture: Share migration Model architecture: Share & story migration Aug 17, 2020
@nf-s
Copy link
Contributor

nf-s commented Sep 9, 2020

Update!

I have basic share-conversion working with enabled csv catalog items + common properties which haven't changes (camera position...)

PRs

@nf-s
Copy link
Contributor

nf-s commented Sep 11, 2020

Update 2!

It is a bit ugly, but a start!

image

@nf-s
Copy link
Contributor

nf-s commented Sep 11, 2020

TODO:

  • Test more examples of catalogs (test stories)
  • Write unit tests
  • Support client-side?
  • Handle URL initSources?

@nf-s
Copy link
Contributor

nf-s commented Sep 13, 2020

Added story support!

@nf-s
Copy link
Contributor

nf-s commented Sep 14, 2020

Order of things todo:

Related issues

@nf-s
Copy link
Contributor

nf-s commented Sep 17, 2020

For my assumptions on share/catalog structure - see TerriaJS/catalog-converter#11 (comment)

@nf-s
Copy link
Contributor

nf-s commented Sep 17, 2020

Update!

Works with user added data (in or not in workbench) - but it doesn't work with nested user added groups (eg WMS-group).
To fix this I need to go through and convert IDs

@soyarsauce
Copy link
Contributor Author

To assist with the ID problem perhaps we need to think about allowing for "previous known IDs or names" when we are migrating catalogs - just a fleeting thought

@soyarsauce
Copy link
Contributor Author

See: #4774

@na9da
Copy link
Collaborator

na9da commented Sep 24, 2020

Missing properties for Pacific Map (spc.json)

      # These ones are deprecated and can be written instead using `filterQuery`. 
      # Probably not worth converting as the item gets used only in a few places (Rowan)
      1 allowEntireWmsServers (CKAN)
      1 filterByWmsGetCapabilities (CKAN)
      1 includeCsv (CKAN, deprecated)
      1 includeEsriFeatureServer (CKAN, deprecated)
      1 includeEsriMapServer (CKAN, deprecated)
      1 includeGeoJson (CKAN, deprecated)
      1 includeKml (CKAN, deprecated)
      1 includeWfs (CKAN, deprecated)
      1 includeWms (CKAN, deprecated)


      7 isCsvForCharting (CSV, not ported)
      1 minimumMaxScaleDenominator (CKAN, not ported)

Missing properties for DE Africa (africa.json)

      5 featureInfoTemplate.formats
     17 ignoreUnknownTileErrors
     12 preserveOrder
     17 tileErrorThresholdBeforeDisabling

DE Aus (dea-maps.json)

      3 chartDisclaimer (add support in catalog-converter)
     18 featureInfoTemplate.formats
      3 id
     58 ignoreUnknownTileErrors
     53 leafletUpdateInterval (catalog-converter#9)
      3 legendUrl
      2 legendUrls
     29 preserveOrder
      3 shortReport
      1 template
      1 zoomOnEnable

DE Aus (terria-cube.json)

      1 custodian
      2 tryToLoadObservationData

@na9da
Copy link
Collaborator

na9da commented Sep 24, 2020

ignoreUnknownTileErrors & tileErrorThresholdBeforeDisabling will be fixed by - #4730

@nf-s
Copy link
Contributor

nf-s commented Sep 24, 2020

V7 catalog item properties missing from catalog-converter

(or missing entirely from V8)

Looks good!

We can ignore Pacific Map CSV errors - those layers are replaced by SDMX

Catalog Member

  • id ?
  • shortReport

WMS

Group

  • custodian
  • preserveOrder

SOS

  • tryToLoadObservationData (not ported)

CKAN

  • includeCsv
  • includeGeoJson
  • includeKml
  • includeWms
  • includeWfs
  • includeEsriMapServer
  • includeEsriFeatureServer
  • filterByWmsGetCapabilities
  • minimumMaxScaleDenominator
  • allowEntireWmsServers

@nf-s
Copy link
Contributor

nf-s commented Sep 24, 2020

@na9da :

So except for the CKAN & pacific map CSV and a few that I have marked - all the others need porting.

@soyarsauce
Copy link
Contributor Author

soyarsauce commented Sep 24, 2020

id ?

Will likely be incorporated in some way via #4774

@nf-s
Copy link
Contributor

nf-s commented Sep 24, 2020

I have written a big list of properties needed for WMS conversion - TerriaJS/catalog-converter#12

@nf-s
Copy link
Contributor

nf-s commented Sep 25, 2020

Other catalog types needed for pacific map (through CKAN)

  • CSV
  • GeoJSON

CKAN issues

  • Nested groups
  • WMS groups...

@nf-s
Copy link
Contributor

nf-s commented Sep 29, 2020

New notification

@nf-s
Copy link
Contributor

nf-s commented Oct 12, 2020

Change "Warning" to "Notice"
Change "Warnings" to "Technical details"

See Share migration - warning text update issue

@soyarsauce
Copy link
Contributor Author

(for @steve9164)
3 ways for share fixes in saas

  • v7-v8 catalog conversion. as long as you never want to change. no catalog editor.
  • fix share keys, with alias IDs.
  • actually fixed being able to move things. "full instant v8 catalog". or the magda-terria-api

@nf-s
Copy link
Contributor

nf-s commented Oct 22, 2020

Note initializationUrls aren't dealt with at the moment. They are passed from v7-v8 shares, but v8 terriajs can't do anything with a v7 initializationUrl

@nf-s
Copy link
Contributor

nf-s commented Oct 22, 2020

I'm going to close this, and turn all remaining tasks into separate issues.
This is closed by TerriaJS/catalog-converter#11

@nf-s nf-s closed this as completed Oct 22, 2020
@nf-s
Copy link
Contributor

nf-s commented Oct 22, 2020

Id issue temporarily solved by #4887

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants