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

SGID Index Validation #2692

Merged
merged 5 commits into from
Mar 25, 2024
Merged

SGID Index Validation #2692

merged 5 commits into from
Mar 25, 2024

Conversation

stdavis
Copy link
Member

@stdavis stdavis commented Mar 22, 2024

This PR adds a script for validating the SGID Index Spreadsheet and an associated scheduled action.

The validation script does the following checks:

  • validates the value of the openSgidTableName field against the OpenSGID database
  • validates the productPage value to make sure that it's a valid internal path or external URL (including verifying that a hub link is actually finding the item)
  • fills in any empty id guids
  • uses the itemId to update the following columns: hubName, hubOrganization, serverHost, serverServiceName
  • it checks for duplicate values between rows for the following columns: openSgidTableName, itemId, id, displayName
  • It validates that the following values in the index match the values found in src/data/downloadMetadata.ts:
	// sgid index field, metadata field
    ['itemId', 'itemId'],
    ['hubName', 'name'],
    ['serverServiceName', 'featureServiceId'],
    ['openSgidTableName', 'openSgid'],
    ['serverLayerId', 'layerId'],

If the script finds any errors, the workflow opens a new issue. Here's an example: #2694

Some questions:

  • Do we need the productPageValidation column anymore?
  • Should the value in the displayName column be updated to match hubName if it exists?
  • Are there other columns that we should be checking for duplicates?

TODO:

  • Add issue_comment event that looks for slash commands to allow users to rerun the validation
  • remove the push event from the new workflow once this is ready for merge.
  • update https://gis-utah.netlify.app for productPagePage validation
  • remove push trigger

FYIs:

  • I added a warning to the header row and id column warning the user if they try to edit them.
  • I granted write access to the sgid index service account.

Closes #2688

@stdavis stdavis changed the title feat: sgid index validation SGID Index Validation Mar 22, 2024
Copy link

netlify bot commented Mar 22, 2024

Deploy Preview for gis-utah ready!

Name Link
🔨 Latest commit 6c7e9b6
🔍 Latest deploy log https://app.netlify.com/sites/gis-utah/deploys/6601ece62ddc830008283596
😎 Deploy Preview https://deploy-preview-2692--gis-utah.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 98 (🟢 up 1 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 93 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@stdavis stdavis force-pushed the feat/sgid-index-validation branch 2 times, most recently from c44c6ef to 443d382 Compare March 22, 2024 22:27
@agrc agrc deleted a comment from request-info bot Mar 22, 2024
@stdavis stdavis force-pushed the feat/sgid-index-validation branch from 67212dc to 0461026 Compare March 22, 2024 22:44
@steveoh
Copy link
Member

steveoh commented Mar 23, 2024

Can we add the download metadata ts file to this check also? Making sure the value are the same yada yada

Copy link

netlify bot commented Mar 25, 2024

Deploy Preview for gis-utah-gov failed.

Name Link
🔨 Latest commit e5e0472
🔍 Latest deploy log https://app.netlify.com/sites/gis-utah-gov/deploys/660197909d3a6f00081a3840

@stdavis stdavis marked this pull request as ready for review March 25, 2024 15:30
@stdavis stdavis force-pushed the feat/sgid-index-validation branch from 4290150 to b9e679d Compare March 25, 2024 21:12
@stdavis stdavis force-pushed the feat/sgid-index-validation branch from 98ed2d0 to 6c7e9b6 Compare March 25, 2024 21:30
@steveoh steveoh enabled auto-merge (rebase) March 25, 2024 21:39
@steveoh steveoh merged commit 36819dd into main Mar 25, 2024
6 checks passed
@steveoh steveoh deleted the feat/sgid-index-validation branch March 25, 2024 21:39
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.

SGID Index Validation Script
2 participants