Skip to content
This repository has been archived by the owner on Jan 9, 2019. It is now read-only.

Migrations: update id{tool,command}s #65

Merged
merged 3 commits into from
Nov 3, 2017
Merged

Conversation

sevein
Copy link
Member

@sevein sevein commented Oct 28, 2017

This is a sequel of #58. It updates two tools:

  • Update fido to 1.3.7
  • Update siegfried to 1.7.6

Also, two extra commits in order to:

  • Bump __version__ to 1.7.2 (needed for the release)
  • It fixes a bug in pronom_92.json (delete pks)

Before this PR:

> m.IDTool.objects.all().values_list()

[
    (1, u'115bc526-c75b-4d2a-9fb9-090c5b49620f', u'File Extension', u'0.1', True, u'file-extension-01'),
    (2, u'8f04f36d-8d43-43c2-92f9-da64c5530106', u'Fido', u'1', False, u'fido-1'),
    (3, u'ea5274a2-9866-439c-a68c-5c8aadf6d3cd', u'Siegfried', u'1.0.0', False, u'siegfried-100'),
    (4, u'c33c9d4d-121f-4db1-aa31-3d248c705e44', u'Fido', u'1.3.6', True, u'fido-134'),
    (5, u'454df69d-5cc0-49fc-93e4-6fbb6ac659e7', u'Siegfried', u'1.7.3', True, u'siegfried-150')
]

> m.IDCommand.objects.all().values_list('id', 'uuid', 'description', 'tool', 'enabled')

[
    (1, u'41efbe1b-3fc7-4b24-9290-d0fb5d0ea9e9', u'Identify by File Extension', u'115bc526-c75b-4d2a-9fb9-090c5b49620f', True),
    (2, u'1c7dd02f-dfd8-46cb-af68-5b305aea1d6e', u'Identify using Fido', u'8f04f36d-8d43-43c2-92f9-da64c5530106', False),
    (3, u'a8e45bc1-eb35-4545-885c-dd552f1fde9a', u'Identify using Fido', u'8f04f36d-8d43-43c2-92f9-da64c5530106', True),
    (4, u'8cc792b4-362d-4002-8981-a4e808c04b24', u'Identify using Siegfried', u'ea5274a2-9866-439c-a68c-5c8aadf6d3cd', False),
    (5, u'9d2cefc1-2bd2-44e4-8d55-6cf8151eecff', u'Identify using Siegfried', u'454df69d-5cc0-49fc-93e4-6fbb6ac659e7', True)
]

After this PR:

m.IDTool.objects.all().values_list()

[
    (1, u'115bc526-c75b-4d2a-9fb9-090c5b49620f', u'File Extension', u'0.1', True, u'file-extension-01'),
    (2, u'8f04f36d-8d43-43c2-92f9-da64c5530106', u'Fido', u'1', False, u'fido-1'),
    (3, u'ea5274a2-9866-439c-a68c-5c8aadf6d3cd', u'Siegfried', u'1.0.0', False, u'siegfried-100'),
    (4, u'c33c9d4d-121f-4db1-aa31-3d248c705e44', u'Fido', u'1.3.7', True, u'fido-137'),
    (5, u'454df69d-5cc0-49fc-93e4-6fbb6ac659e7', u'Siegfried', u'1.7.6', True, u'siegfried-176')
]

m.IDCommand.objects.all().values_list('id', 'uuid', 'description', 'tool', 'enabled')

[
    (1, u'41efbe1b-3fc7-4b24-9290-d0fb5d0ea9e9', u'Identify by File Extension', u'115bc526-c75b-4d2a-9fb9-090c5b49620f', True),
    (2, u'1c7dd02f-dfd8-46cb-af68-5b305aea1d6e', u'Identify using Fido', u'8f04f36d-8d43-43c2-92f9-da64c5530106', False),
    (3, u'a8e45bc1-eb35-4545-885c-dd552f1fde9a', u'Identify using Fido', u'8f04f36d-8d43-43c2-92f9-da64c5530106', False),
    (6, u'76006ad7-a401-48f6-98f6-2efc01003276', u'Identify using Fido', u'c33c9d4d-121f-4db1-aa31-3d248c705e44', True),
    (4, u'8cc792b4-362d-4002-8981-a4e808c04b24', u'Identify using Siegfried', u'ea5274a2-9866-439c-a68c-5c8aadf6d3cd', False),
    (5, u'9d2cefc1-2bd2-44e4-8d55-6cf8151eecff', u'Identify using Siegfried', u'454df69d-5cc0-49fc-93e4-6fbb6ac659e7', False),
    (7, u'df074736-e2f7-4102-b25d-569c099d410c', u'Identify using Siegfried', u'454df69d-5cc0-49fc-93e4-6fbb6ac659e7', True)
]

This was done before in the following migrations but only IDTools were updated.

I see three options:

  1. Do the same as 0005 and 0010 - just update the IDTools.
  2. Update tools, add new commands - that's what this PR does atm.
  3. Replace both tools and commands - seems ideal.

Once this is merged we need to make sure that:

  • archivematica-fpr-admin 1.7.2 is released
  • fido: archivematica to bundle fido 1.3.7 (Update fido to v1.3.7 archivematica#765)
  • archivematica 1.7 (dashboard, mcpclient) adds archivematica-fpr-admin 1.7.2 to requirements
  • siegfried: compose/ansible/pkgs(trusty,xenial,centos7) to bundle siegfried 1.7.6 (not fixed atm but reported)

@sevein sevein added this to the 1.7.2 milestone Oct 28, 2017
@sevein sevein self-assigned this Oct 28, 2017
@sevein sevein requested a review from jhsimpson October 28, 2017 18:29
@sevein
Copy link
Member Author

sevein commented Oct 28, 2017

@jhsimpson can you make sure that the migration is doing the right thing? I've created new commands but I'm not sure if I'm also supposed to create new tools or repurpose the existing ones.

If you want to see it in action there is no need to involve AM at all, just build the testproject/ locally following these instructions: https://github.com/artefactual/archivematica-fpr-admin/blob/qa/1.x/DEVELOPMENT.md.

@qubot qubot force-pushed the update_fido_tool_version branch from 48e74cb to 915641b Compare October 28, 2017 18:49
@sevein sevein requested a review from jrwdunham October 28, 2017 18:55
@qubot qubot force-pushed the update_fido_tool_version branch from 915641b to 814f58a Compare October 28, 2017 21:54
@jrwdunham
Copy link
Contributor

Looks like the following two objects need to be removed from migrations/pronom_92.json because these formats are already in the db from initial_data.json:

{
    "fields": {
        "slug": "wordperfect-graphics-metafile",
        "group": "fdf9e267-a18c-46a4-a162-b81bcba6322f",
        "uuid": "9b3f9406-a375-4b66-9081-61a317e68cbf",
        "description": "WordPerfect Graphics Metafile"
    },
    "model": "fpr.format"
},
{
    "fields": {
        "slug": "verity-collection-stop-list",
        "group": "57361413-1c3b-405d-a9c0-7d3ea381090e",
        "uuid": "d4bfbd9b-15fc-4992-98cb-7cea13879307",
        "description": "Verity Collection Stop List"
    },
    "model": "fpr.format"
}

If the above need to be changed, I think that that needs to happen in migrations/0015_pronom_92.py.

@sevein
Copy link
Member Author

sevein commented Oct 31, 2017

Good catch, @jrwdunham. For some reason I ran into a bunch of extra items that already existed.
Here's the list of elements that I had to delete from the fixture and manage as a Python migration: https://gist.github.com/sevein/03f229fd76fb7af08b8b6c6926320e87. Thank you!

@qubot qubot force-pushed the update_fido_tool_version branch 2 times, most recently from 139c226 to 928cd43 Compare October 31, 2017 01:24
@qubot qubot force-pushed the update_fido_tool_version branch from 928cd43 to e803a88 Compare October 31, 2017 02:51
Copy link
Contributor

@jrwdunham jrwdunham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to successfully follow the instructions at https://github.com/artefactual/archivematica-fpr-admin/blob/qa/1.x/DEVELOPMENT.md and explore the FPR GUI and see the expected changes.

@sevein
Copy link
Member Author

sevein commented Nov 3, 2017

Thank you! Let's hope that d32bf02 doesn't break user upgrades. I'm assuming if that's the case it should be detected during QA.

@qubot qubot merged commit e803a88 into qa/1.x Nov 3, 2017
@qubot qubot deleted the update_fido_tool_version branch November 3, 2017 18:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants