Skip to content

[Feature]: Add dirctl routing publish --all flag #1965

Description

@csirmazbendeguz

Problem Statement

A Directory may contain records that are not published to the DHT network. This is expected. dirctl routing publish is a separate step that may or may not be run after dirctl push, dirctl import, etc.

For public Directory nodes, like Outhsift's Directory (http://ads.outshift.io/), this is not desired. Since it's a public node, we expect all records to be published to the network. Outshift's Directory hosts ~2000 records, most of which are not published

If there are a lot of existing records not published, manually publishing them may be infeasible.

Proposed Solution

Extend the dirctl routing publish command with the --all flag.

By running dirctl routing publish --all, users can publish all unpublished records.

Note: the command should ask the user for confirmation:

This operation will publish every unpublished record. Would you like to proceed?

The command should also accept a --yes flag to skip the confirmation

Alternatives Considered

Use a Bash script that fetches all CIDs and calls dirctl routing publish for each.
Functionally, it's the same.
The downside is, the Bash script doesn't work with the hardened dirctl image.

Checklist

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status
Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions