Skip to content

Conversation

@sonofflynn89
Copy link
Contributor

@sonofflynn89 sonofflynn89 commented Sep 22, 2025

  1. Description:
    Part of https://devtopia.esri.com/dc/hub/issues/13504

Does the final cleanup needed to allow sites to be fully migrated to the new catalog spec, including:

  • Deleting the unneeded hub:feature:catalogs:edit:advancedpermission since it wasn't relevant any more
  • Remove gating on the hub:site:workspace:catalog:upgrade permission
  • Add the temporary data.useCatalogV2 field (needed because of template idiosyncrasies)
  • Stop setting the legacy catalog on new sites that are created in workspaces
  • Change site update logic to conditionally remove the legacy catalog if a site is marked for upgrade
  1. Updated meaningful TSDoc to methods including Parameters and Returns, see Documentation Guide

  2. used semantic commit messages

  3. PR title follows semantic commit format (CRITICAL if the title is not in a semantic format, the release automation will not run!)

  4. Updated peerDependencies as needed. CRITICAL our automated release system can not be counted on to update peerDependencies so we must do it manually in our PRs when needed. See the updating peerDependencies section of the release instructions for more details.

  5. These changes have been verified by QA using a ?uiVersion that includes a PR-Preview of this branch and the v_req label has been applied to the issue.

  6. OD-UI E2E tests pass against these changes using a ?uiVersion that includes a PR-Preview of this branch

*CRITICAL
If you are making a breaking change, make sure to add the BREAKING CHANGE comment in the merge commit message. If this is not done, semantic-release will not do the right thing.

If you find yourself in this position...

  1. open a PR to master with a trivial change - fix a linting problem or something.
  2. when you merge that, make sure you add the BREAKING CHANGE message in the merge commit.
  3. then run npm deprecate @esri/{package-name}@v{version-you-don't-want-out}

@github-actions
Copy link
Contributor

There hasn't been any activity on this pull request in the past 3 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days. If you want this PR to never become stale, please apply the "Draft" label.

@github-actions github-actions bot added the Stale Stale issue - update or it will be closed label Sep 26, 2025
@sonofflynn89 sonofflynn89 removed the Stale Stale issue - update or it will be closed label Sep 26, 2025
@github-actions
Copy link
Contributor

There hasn't been any activity on this pull request in the past 3 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days. If you want this PR to never become stale, please apply the "Draft" label.

@github-actions github-actions bot added the Stale Stale issue - update or it will be closed label Sep 30, 2025
@sonofflynn89 sonofflynn89 removed the Stale Stale issue - update or it will be closed label Sep 30, 2025
@sonofflynn89 sonofflynn89 force-pushed the f/13504-allow-site-migration branch from 2ef92b8 to f5c4a61 Compare September 30, 2025 22:58
@codecov
Copy link

codecov bot commented Oct 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (b350124) to head (6950d0b).
⚠️ Report is 59 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##            master     #2013    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files         1071      1116    +45     
  Lines        19532     19812   +280     
  Branches      3617      3652    +35     
==========================================
+ Hits         19532     19812   +280     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2025

There hasn't been any activity on this pull request in the past 3 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days. If you want this PR to never become stale, please apply the "Draft" label.

@github-actions github-actions bot added the Stale Stale issue - update or it will be closed label Oct 6, 2025
@sonofflynn89 sonofflynn89 removed the Stale Stale issue - update or it will be closed label Oct 6, 2025
…n, remove hub:feature:catalogs:

affects: @esri/hub-common
affects: @esri/hub-common
…d data.catalog in certain circu

affects: @esri/hub-common
@sonofflynn89 sonofflynn89 force-pushed the f/13504-allow-site-migration branch from 6950d0b to aa34138 Compare October 8, 2025 22:00
@sonofflynn89 sonofflynn89 changed the title F/13504 allow site migration feat(hub-common): new sites are fully upgraded to the new catalog, old sites can opt into the upgrade Oct 9, 2025
@sonofflynn89 sonofflynn89 requested a review from Copilot October 9, 2025 21:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements final cleanup for migrating sites to the new catalog spec (v2), allowing full migration to the new catalog format while maintaining backwards compatibility for sites that haven't opted in yet.

  • Removes deprecated permission hub:feature:catalogs:edit:advanced and updates dependent permissions
  • Modifies site creation to use catalogV2 by default and removes legacy catalog initialization
  • Updates site update logic to conditionally handle catalog formats based on isCatalogV1Enabled flag

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/common/test/sites/HubSites.test.ts Updates test cases to verify catalog v1/v2 behavior and legacy catalog removal
packages/common/src/sites/defaults.ts Changes default site model to initialize catalogV2 instead of legacy catalog
packages/common/src/sites/_internal/getPropertyMap.ts Removes legacy catalog property mapping
packages/common/src/sites/_internal/SiteBusinessRules.ts Updates catalog upgrade permission to use assertions instead of flag-based availability
packages/common/src/sites/HubSites.ts Major refactor to handle catalog v1/v2 logic in create/update operations
packages/common/src/projects/_internal/ProjectBusinessRules.ts Removes deprecated permission dependency
packages/common/src/permissions/_internal/constants.ts Removes deprecated hub:feature:catalogs:edit:advanced permission
packages/common/src/permissions/HubPermissionPolicies.ts Removes deprecated permission policy and updates appearance permission
packages/common/src/initiatives/_internal/InitiativeBusinessRules.ts Removes deprecated permission dependency
packages/common/src/events/_internal/EventBusinessRules.ts Removes deprecated permission dependency
packages/common/src/discussions/_internal/DiscussionBusinessRules.ts Removes deprecated permission dependency

Copy link
Contributor

@knbhagat knbhagat left a comment

Choose a reason for hiding this comment

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

Great job Caleb, LGTM!

@github-actions
Copy link
Contributor

There hasn't been any activity on this pull request in the past 3 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days. If you want this PR to never become stale, please apply the "Draft" label.

@github-actions github-actions bot added the Stale Stale issue - update or it will be closed label Oct 14, 2025
@changeset-bot
Copy link

changeset-bot bot commented Oct 17, 2025

🦋 Changeset detected

Latest commit: ea601c2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@esri/hub-common Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot removed the Stale Stale issue - update or it will be closed label Oct 17, 2025
@github-actions
Copy link
Contributor

There hasn't been any activity on this pull request in the past 3 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days. If you want this PR to never become stale, please apply the "Draft" label.

@github-actions github-actions bot added the Stale Stale issue - update or it will be closed label Oct 21, 2025
@sonofflynn89 sonofflynn89 removed the Stale Stale issue - update or it will be closed label Oct 21, 2025
@github-actions
Copy link
Contributor

There hasn't been any activity on this pull request in the past 3 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days. If you want this PR to never become stale, please apply the "Draft" label.

@github-actions github-actions bot added the Stale Stale issue - update or it will be closed label Oct 27, 2025
@sonofflynn89 sonofflynn89 removed the Stale Stale issue - update or it will be closed label Oct 27, 2025
@JoshCrozier JoshCrozier force-pushed the master branch 2 times, most recently from 0e9fbe4 to 1afeabb Compare October 27, 2025 20:50
@sonofflynn89 sonofflynn89 requested a review from knbhagat October 30, 2025 22:38
@sonofflynn89
Copy link
Contributor Author

@knbhagat would you mind re-reviewing the PR? I had to fix a bug that Diana caught in testing. You can check out the new commits here:

https://github.com/Esri/hub.js/pull/2013/files/aa341389135e99db8429bd145943a95c034a5f36..ea601c2ad7c3fc84fbf1350e4c7adc50fac3c68f

Copy link
Contributor

@knbhagat knbhagat left a comment

Choose a reason for hiding this comment

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

Looks Good!

Copy link
Contributor

@abp6318 abp6318 left a comment

Choose a reason for hiding this comment

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

LGTM

modelToUpdate = convertCatalogToLegacyFormat(modelToUpdate, currentModel);
} else {
// ensure the old catalog is removed if the site is not using v1
delete modelToUpdate.data.catalog;
Copy link
Contributor

Choose a reason for hiding this comment

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

🥳🎉

Copy link
Contributor

Choose a reason for hiding this comment

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

There are a bunch of new TODOs in this file. Do we need to document them anywhere before we forget?

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

There hasn't been any activity on this pull request in the past 3 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days. If you want this PR to never become stale, please apply the "Draft" label.

@github-actions github-actions bot added the Stale Stale issue - update or it will be closed label Nov 4, 2025
@sonofflynn89 sonofflynn89 removed the Stale Stale issue - update or it will be closed label Nov 4, 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.

4 participants