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

Post import status message #4397

Open
wants to merge 6 commits into
base: 2.x
Choose a base branch
from
Open

Conversation

kaise-lafrai
Copy link
Contributor

@kaise-lafrai kaise-lafrai commented Jan 30, 2025

Fixes [#4384 ]

Improvements to post import job status

QA Steps

Test 2.x branch to build an existing set of post import status rows in the dkan_post_import_job_status table.

  • Checkout 2.x
  • run ddev dkan-site-install
  • run ddev dkan-sample-content
  • run ddev drush uli
  • navigate to Datastore Import Status dashboard /admin/dkan/datastore/status
  • run ddev drush dkan:datastore:import 3a187a87dc6cd47c48b6b4c4785224b7
  • run ddev drush queue:run post_import
  • Confirm Dataset cedcd327-4e5d-43f9-8eb1-c11850fa7c55 has a Post Import message: N/A Data-Dictionary Disabled
  • Navigate here /admin/dkan/data-dictionary/settings and switch Dictionary Mode to "Distribution Reference"
  • Create a DD /node/add/data?schema=data-dictionary following this Schema:
{
  "data": {
    "title": "OBJECTID",
    "fields": [
      {
        "name": "OBJECTID",
        "title": "OBJECTID",
        "type": "integer",
        "format": "default",
        "description": "OBJECTID"
      }
    ],
    "indexes": []
  }
}
  • Navigate to Florida Bike Lanes /node/8/edit?destination=/admin/content
  • In the Distribution section enter the following:
  • Data Dictionary: this should be the url to the data dictionary made above.
  • Data Dictionary Type: application/vnd.tableschema+json
  • Save the dataset
  • run ddev drush dkan:datastore:reimport cedcd327-4e5d-43f9-8eb1-c11850fa7c55
  • run ddev drush queue:run post_import
  • navigate to Datastore Import Status dashboard /admin/dkan/datastore/status
  • Confirm Dataset cedcd327-4e5d-43f9-8eb1-c11850fa7c55 STILL has a Post Import message: N/A Data-Dictionary Disabled

Test Post-Import-Status-Message to confirm a reimport and post import update the Datastore Import Status dashboard

  • Checkout Post-Import-Status-Message
  • run ddev drush updatedb
  • run ddev drush uli
  • navigate to Datastore Import Status dashboard /admin/dkan/datastore/status
  • run ddev drush dkan:datastore:reimport cedcd327-4e5d-43f9-8eb1-c11850fa7c55
  • run ddev drush queue:run post_import
  • navigate to Datastore Import Status dashboard /admin/dkan/datastore/status
  • Confirm Dataset cedcd327-4e5d-43f9-8eb1-c11850fa7c55 has a Post Import message: done

Checklist before requesting review

If any of these are left unchecked, please provide an explanation

  • I have updated or added tests to cover my code
  • I have updated or added documentation

@kaise-lafrai kaise-lafrai self-assigned this Jan 30, 2025
@kaise-lafrai kaise-lafrai requested a review from dafeder January 30, 2025 22:09
@kaise-lafrai kaise-lafrai marked this pull request as ready for review January 31, 2025 18:03
modules/common/src/DataResource.php Outdated Show resolved Hide resolved
modules/datastore/datastore.install Outdated Show resolved Hide resolved
modules/datastore/datastore.install Outdated Show resolved Hide resolved
@dafeder dafeder linked an issue Feb 3, 2025 that may be closed by this pull request
…improved handing of post import when reimporting existing datasets, improved tests
…time when instantiatiating PostImportResult, improved PostImportResultTest
@kaise-lafrai kaise-lafrai force-pushed the Post-Import-Status-Message branch from 2d7fc7f to aff6791 Compare February 4, 2025 20:27
@kaise-lafrai kaise-lafrai requested a review from dafeder February 5, 2025 18:58
@kaise-lafrai kaise-lafrai assigned dafeder and unassigned kaise-lafrai Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Post import status message
2 participants