Skip to main content

๐Ÿ•น๏ธ Integration Resync Triggers

This guide explains how you can trigger your integration using Port.

After setting up & running your integration, you can trigger resyncs using Port's UI/API. You can also trigger resyncs by setting scheduledResyncInterval in the integration environment variables.

Triggering your integration will run the integration resync and will resync all the data from the source into port and creating new data, update existing data and delete data that no longer exists in the source by doing so.

danger

If a resync event is received by your integration while it is actively performing a resync, the currently running resync will be aborted and a new resync process will start.

If a new resync trigger consistently aborts a running resync, it means that your integration never finishes a complete resync process (which means some information from the 3rd-party system might never appear in Port).

If you specify a scheduledResyncInterval, we recommend that you start with a larger buffer between resyncs (2 hours are almost always enough), and reduce the resync buffer only if you need more frequent automatic updates.

Triggering using Port's UIโ€‹

  1. Login to Port and browse to the builder page.

  2. Click on the Data Sources tab.

  3. Use the search bar to find the integration you want to trigger a resync for.

    Ingest Button

  4. Select the integration you want to trigger a resync for from the list of your installed integrations.

  5. Click on the Resync button.

    Installation Page

Triggering using Port's APIโ€‹

By patching the integration either with a new configuration or by patching it with no changes, The integration will detect the trigger and perform a resync.

  1. Navigate to the Port API.
  2. Click on the Authorize button and set your token in the Value field.
  3. Under the Integrations section, use the integration PATCH route using the integration identifier as specified in the config.yaml file of your integration.

Handling Incomplete Resyncsโ€‹

Ocean is designed to handle incomplete resyncs gracefully to prevent data loss. When a resync is interrupted, either due to a fatal error, unhandled exception, or a new resync being triggered before the previous one completes, Ocean will take the following actions:

  1. If an error occurs during the resync of a specific kind, Ocean will:

    • Stop the data ingestion for the current kind
    • Move on to the next kind in the sequence
    • Continue processing remaining kinds
    • Skip the delete phase
  2. When a new resync is triggered while another is in progress:

    • The ongoing resync will be terminated
    • A new resync will start immediately
    • This behavior ensures that your data stays current and prevents potential conflicts

This approach prioritizes data safety by ensuring that no data is accidentally deleted during interrupted resyncs. While this means that some stale data might temporarily remain in your catalog, it's a deliberate design choice to prevent data loss. The next successful resync will clean up any remaining stale data.

Interrupted Resyncs

If you notice that resyncs are frequently being interrupted, consider adjusting your scheduledResyncInterval to a longer duration to allow each resync to complete fully.