Comparison Management
Comparisons allow you to view metadata differences between two sources (HubSpot portals or GitHub repositories). This guide covers creating, viewing, renaming, and deleting comparisons.
Overview
A metadata comparison analyzes the differences between two environments:
- Source: Where metadata is read from (origin)
- Target: Where changes would be deployed to (destination)
Both source and target can be either:
- HubSpot Portal (via OAuth or Private App connection)
- GitHub Repository (specific branch)
Creating a Comparison
Prerequisites
You need at least 2 sources configured before creating a comparison:
- Minimum: 2 HubSpot portals, OR 2 GitHub repos, OR 1 portal + 1 repo
- Sources must be different (cannot compare a portal to itself)
From the Comparisons Screen
- Navigate to Comparisons in the main navigation
- Click New Comparison button (top-right)
- In the modal:
- (Optional) Enter a descriptive name (e.g., "Production vs Staging")
- Select Source (origin) from the dropdown
- Select Target (destination) from the dropdown
- Click Initialize Comparison
The system will:
- Create the comparison record with
pendingstatus - Queue extraction tasks for both source and target
- Redirect you to the comparison view
- Begin populating metadata from both environments
- Calculate differences once both sides are populated
From Quick Actions
You can also create comparisons from:
- Connections screen: Click "Compare" on any portal
- GitHub screen: Click "Compare" on any repository
Comparison Lifecycle
Status Flow
pending → in_progress → completed
| Status | Description |
|---|---|
pending | Comparison created, waiting to start |
in_progress | Extracting metadata from source and/or target |
completed | Both sides populated, differences calculated |
Population Process
Each comparison tracks two population flags:
- source_populated: Source metadata extraction complete
- target_populated: Target metadata extraction complete
The comparison view shows real-time progress for each side with:
- Metadata type being processed
- Number of items extracted
- Completion percentage
Viewing Comparisons
Comparisons List
The Comparisons screen shows all your comparisons with:
- Name: Custom name or auto-generated ID
- Source: Origin environment (portal or repo)
- Target: Destination environment (portal or repo)
- Actions: View or delete buttons
Mobile view: Card-based layout with all details
Desktop view: Table layout with sortable columns
Comparison Details
Click View or the comparison name to open the diff viewer, which shows:
-
Header:
- Comparison name
- Source and target labels
- Status badge
- Action buttons (Deploy, Refresh)
-
Diff Table:
- All metadata items with differences
- Change types:
create,update,delete,no_change - Metadata type grouping
- Side-by-side comparison
-
Changeset Panel (right sidebar):
- Selected items for deployment
- Dependency resolution
- Deployment controls
-
Deploy History (bottom panel):
- Past deployments from this comparison
- Status, timestamp, and logs
Renaming Comparisons
Comparisons are auto-named by default (e.g., "Comparison a1b2c3d4"). You can rename them for clarity:
How to Rename
- Navigate to Comparisons screen
- Hover over the comparison name
- Click the pencil icon that appears
- Enter the new name in the modal
- Click Save
Keyboard shortcut: Press Enter to save after typing
Naming Best Practices
- Use descriptive names that indicate the comparison purpose
- Include environment names: "Production → Staging"
- Add dates for time-based comparisons: "Pre-Migration Snapshot"
- Use consistent naming conventions across your team
Examples:
- ✅ "Prod vs Dev - Q1 2024"
- ✅ "Staging → Production"
- ✅ "Pre-Release Validation"
- ❌ "Comparison 1"
- ❌ "test"
Deleting Comparisons
When to Delete
Delete comparisons when:
- They're no longer needed for reference
- You want to clean up old test comparisons
- The comparison was created by mistake
- You need to free up storage space
How to Delete
- Navigate to Comparisons screen
- Find the comparison to delete
- Click the trash icon (🗑️)
- Confirm deletion in the modal
⚠️ Warning: Deletion is permanent and cannot be undone. The comparison record, changeset, and associated metadata will be removed.
What Gets Deleted
- Comparison record
- Calculated changeset
- Population progress data
- Associated metadata snapshots
What's Preserved
- Deployment history (stored separately)
- Source and target connections
- Original portal/repo data
Exporting Metadata to ZIP
You can download all metadata from a comparison as a ZIP archive. This is useful for:
- Offline review: Examine metadata without accessing the web interface
- Backup: Keep a local copy of metadata at a specific point in time
- Sharing: Send metadata to team members or support
- Analysis: Process metadata with external tools
What's Included
The ZIP archive contains:
- All metadata items from the selected side (source or target)
- Files organized by metadata type and hierarchy
- YAML format for each item
- Folder structure matching the metadata organization
File Structure
metadata-export-12345678-1234567890.zip
├── custom_objects/
│ ├── project.yaml
│ └── invoice.yaml
├── custom_object_property/
│ ├── project/
│ │ ├── project_name.yaml
│ │ ├── project_status.yaml
│ │ └── project_owner.yaml
│ └── invoice/
│ ├── invoice_number.yaml
│ └── invoice_amount.yaml
├── workflows/
│ ├── lead_nurture.yaml
│ └── deal_followup.yaml
├── forms/
│ ├── contact_us.yaml
│ └── demo_request.yaml
└── ...
How to Export
From Comparison View
- Open the comparison you want to export
- Click the Export button (download icon) in the toolbar
- Choose which side to export:
- Export Source: Download metadata from the source environment
- Export Target: Download metadata from the target environment
- Your browser will download the ZIP file
From Instance Metadata View
- Navigate to a HubSpot connection
- Click View Metadata button
- Click the Export button in the toolbar
- The ZIP file will download automatically
File Naming
ZIP files are automatically named with:
- Connection ID (first 8 characters)
- Timestamp (Unix timestamp)
- Format:
metadata-export-{connectionId}-{timestamp}.zip
Example: metadata-export-a1b2c3d4-1704067200000.zip
Use Cases
Offline Review
Download metadata before a deployment to review changes offline:
- Create comparison between environments
- Export both source and target
- Extract ZIP files locally
- Use a diff tool to compare YAML files
- Review changes without internet connection
Backup Before Major Changes
Create a snapshot before making significant changes:
- Export current portal metadata
- Store ZIP file with descriptive name
- Make changes in HubSpot
- If needed, reference the backup to restore settings
Sharing with Team
Share metadata with team members who don't have system access:
- Export metadata from comparison
- Send ZIP file via email or file sharing
- Team members can review YAML files
- Discuss changes before deployment
External Analysis
Process metadata with custom scripts or tools:
- Export metadata as ZIP
- Extract files to local directory
- Run analysis scripts on YAML files
- Generate reports or validate configurations
Working with Exported Files
Reading YAML Files
Each YAML file contains the complete metadata for one item:
# Example: contact_property.yaml
name: favorite_color
label: Favorite Color
type: enumeration
fieldType: select
groupName: contactinformation
options:
- label: Red
value: red
- label: Blue
value: blue
- label: Green
value: green
Comparing Exports
To compare two exports:
- Export source and target from a comparison
- Extract both ZIP files to separate folders
- Use a diff tool (e.g.,
diff, Beyond Compare, WinMerge) - Compare folders to see differences
Limitations
- Export size: Large portals (>5000 items) may take longer to download
- Format: Only YAML format is supported (no JSON export)
- Filtering: Exports include all metadata types (no selective export)
- UI availability: Export button may not be visible in all views yet
Troubleshooting
Export Button Not Visible
Cause: Feature is being rolled out and may not be available in all views yet.
Solution:
- Check if you're viewing a completed comparison
- Ensure you have the latest version of the application
- Contact support if the button is missing
Download Fails or Times Out
Cause: Large portal with many metadata items.
Solution:
- Wait a few moments and try again
- Check your internet connection
- Contact support if the portal is extremely large (>10,000 items)
ZIP File is Empty or Corrupted
Cause: Export process was interrupted.
Solution:
- Delete the partial download
- Try exporting again
- Ensure stable internet connection during download
Cannot Open YAML Files
Cause: YAML files require a text editor.
Solution:
- Use any text editor (VS Code, Sublime Text, Notepad++)
- Do not use Microsoft Word or similar document editors
- YAML files are plain text and human-readable
Permissions
Comparison management requires specific workspace permissions:
| Action | Required Permission |
|---|---|
| View comparisons | comparisons:read |
| Create comparisons | comparisons:create |
| Rename comparisons | comparisons:update |
| Delete comparisons | comparisons:delete |
Note: Workspace admins have all permissions by default.
Common Workflows
Comparing Two Portals
Use case: Compare production and staging HubSpot portals
- Connect both portals (see Connections)
- Create comparison: Production (source) → Staging (target)
- Wait for population to complete
- Review differences in diff viewer
- Select items to deploy
- Deploy changes to staging
Comparing Portal to Git
Use case: Validate that portal matches your Git repository
- Connect HubSpot portal and GitHub repo
- Create comparison: Git (source) → Portal (target)
- Review differences
- Deploy missing items from Git to portal
Pre-Deployment Validation
Use case: Check what will change before deploying
- Create comparison between environments
- Review all differences carefully
- Check for unexpected changes
- Rename comparison: "Pre-Deploy Check - [Date]"
- Keep for audit trail
Troubleshooting
"New Comparison" Button Disabled
Problem: Cannot create new comparison
Cause: Less than 2 sources configured
Solution:
- Connect at least 2 HubSpot portals, OR
- Connect at least 2 GitHub repositories, OR
- Connect 1 portal + 1 repository
See Connections and GitHub Integration.
Comparison Stuck in "Pending"
Problem: Comparison status doesn't change from pending
Possible causes:
- Worker not running
- Task queue backed up
- Connection authentication expired
Solution:
- Check connection status on Connections screen
- Re-authenticate if needed
- Wait a few minutes for task queue to process
- If still stuck after 10 minutes, delete and recreate
Population Taking Too Long
Problem: Metadata extraction is slow
Factors affecting speed:
- Number of metadata types
- Amount of data in portal/repo
- HubSpot API rate limits
- Network conditions
Expected times:
- Small portal (less than 100 items): 1-2 minutes
- Medium portal (100-1000 items): 3-5 minutes
- Large portal (more than 1000 items): 5-15 minutes
Solution: Be patient. The system will continue processing in the background.
Cannot Delete Comparison
Problem: Delete button is disabled or missing
Cause: Insufficient permissions
Solution: Contact your workspace admin to grant comparisons:delete permission.
Source and Target Look Identical
Problem: No differences shown, but you expected changes
Possible causes:
- Environments are actually in sync
- Metadata types not selected during extraction
- Cached data from previous comparison
Solution:
- Click Refresh button to re-extract metadata
- Verify correct source and target are selected
- Check that relevant metadata types are enabled
Best Practices
Organization
- Use descriptive names: Rename comparisons immediately after creation
- Delete old comparisons: Clean up test or outdated comparisons regularly
- Keep audit trail: Preserve important comparisons for compliance
Workflow
- Compare before deploying: Always create a comparison before major deployments
- Review carefully: Check all differences before selecting items to deploy
- Document changes: Use comparison names to document what was compared and when
Performance
- Limit concurrent comparisons: Don't create too many at once
- Reuse comparisons: Refresh existing comparisons instead of creating new ones
- Archive old data: Delete comparisons older than 90 days
Related Features
- Deployments: Deploy changes from comparisons
- Drift Detection: Automated comparison monitoring
- Deployment History: Track deployment outcomes
- Connections: Manage HubSpot portal connections
- GitHub Integration: Connect repositories
Next Steps
- Learn about deploying changes from comparisons
- Set up drift detection for automated monitoring
- Review deployment history for audit trails