HOWTO: Bulk Import Packages using Drop Paths
  • 15 Aug 2022
  • 4 Minutes to read
  • Dark
    Light
  • PDF

HOWTO: Bulk Import Packages using Drop Paths

  • Dark
    Light
  • PDF

How To Bulk Import Packages Into A Feed Using A Drop Path

Users of ProGet come to the software with multiple packages ready to be imported – be it from their local drive, a package-hosting service, or an alternative private repository.

It’s entirely possible for you to write a script to publish your package using the feed’s API endpoints, but it’s often easier to bulk-import those packages using a drop path. This ProGet feature configures a feed to use a drop path (a local or network path) that ProGet periodically scans for files to import.

This tutorial will describe how to create a drop-path to easily import packages into your ProGet feeds in bulk quantities. It will also cover some common errors that may occur during the import process and how to resolve them.

If you are looking to migrate packages between two ProGet feeds, please see our migrating a ProGet feed guide.

Step 1: Create a drop-path folder on your server

On your server, navigate to the drive and create a folder for the bulk-import process.

It can be a folder you already have, but for this demonstration we’ll create a new folder and name it “drop-import.” If you are using a folder on a server other than the one ProGet is installed on, you will need use the UNC path of your network shared folder.

Note about Drop Path Folder

The ProGet service account must have full control (read, delete files) over this folder. This step is a good opportunity to configure this permission.

Copy this folder path for later.

Display of the file path of a server's intended drop path folder.

Step 2: Navigate to a feed's Storage & Retention

In ProGet, for your desired feed, Navigate Feeds > "MyFeed" > Manage Feed > Storage & Retention.

The Manage feed page of a feed pointing towards the storage and retention tab.

Step 3: Click on “configure” of the "Drop Path" line item

The storage properties page of a feed, pointing towards the configure button of the drop path line item

A pop-up will appear.

Step 4: Type in the folder path

In the "Feed drop path", type or copy/paste the folder path from your server's drive.

The "Set Drop Path" window in ProGet

Click [Save]

Your feed is now configured to the drop path folder.

The storage properties page of a feed displaying the configured drop path folder in the drop path line item.

After Configuring a Drop Path

You can check on importing packages by navigating to the Packages page of ProGet.

Your feed (or feeds) will populate with packages from the drop-path folder.

You may need to wait a few moments depending on the server power/speed. You can manually refresh to see progress (if necessary).

Troubleshooting

Some warnings or errors may occur during the bulk-import process. You can view these by navigating to the Settings page of ProGet (you’ll need to be logged in as an administrator to view settings).

The diagnostic center of ProGet showing multiple warnings due to a drop path issue.

Warnings or errors are also displayed in the Service Status Service Output window, found in Settings > Manage Service and scrolling down.

Issue: “The Package Already Exists on the Feed”

This warning will display as such in the Server Output window:

The ProGet Service Output display showing the "the package already exists" warning

This warning means the package already exists in the ProGet feed, so it won’t be imported / installed onto ProGet a second time.

This error will likely appear after the first round of a drop path scan. For example: if ProGet scanned a drop path folder for the first time and then more files were added after the first scan, ProGet will scan a second time, recognize there are files it has already imported/installed, and will skip those files.

There are two ways to resolve this warning.

Option 1: Delete the drop path folder files

Deleting the file from the drop path folder will not delete it from ProGet. ProGet has already imported the data and files onto its server, so the information won't be lost.

You can double-check if a file is still accessible by navigating Feed > Package > Package Version > Files

The files page of a ProGet Package

Option 2: Allow overwriting (not recommended)

Generally, we don’t recommend this method as most developers don’t want to overwrite packages and instead version their packages.

However, if your organization is okay with overwriting packages, you can resolve this warning in the Settings page.

Navigate Settings > Advanced Settings and search for Feeds.AllowDropPathImportOverwrite

The "Allow Override" line item in Advanced Settings of ProGet

Click on the box Allow Drop Path Import Overwrite.

Click [Save Changes] at the bottom of the Advanced Settings page.

Files will now overwrite packages when imported.

This is a global setting and will enable overwriting packages on all feeds configured to use a drop path.

Issue: “An error occurred in the web application: Could not find file …”

This warning may occur if, for some reason, the package was deleted on the drive.

You will see this page if you navigate to the Files tab of the drive-deleted package:

An unexpected error stating ProGet could not find a file.

The error will display on the Diagnostic Center like so:

A "could not find file" error as displayed in the Diagnostic Center

ProGet stores package data on ProGet, but package files on disk. Since ProGet has stored the package data, it may think the package is still present when it isn’t; therefore it won’t import the package to reinstall.

This situation is very unlikely, since it means internal (possibly hidden) files were deleted on disk.

To resolve, delete the package in ProGet.

The drop path configuration will then re-import and reinstall the package.

Issue: "Error deleting imported package..."

This warning will display as such in the Server Output window:

The Service Output display with a warning that a package could not be deleted.

This warning will occur if ProGet does not have permission to read/delete from the drop path folder on the server or network share.

You can resolve this warning by opening the properties of the drop path folder on the server and navigate to the security tab in the pop-up window. Then, Configure your security settings to allow ProGet to have full control on this folder.

Once configured, ProGet will now be able to properly delete a package both in ProGet and on the server.


Was this article helpful?