Skip to content

Conversation

@turetske
Copy link
Collaborator

@turetske turetske commented Feb 11, 2025

Added descriptions of CLI commands for ls, stat, and sync

@turetske turetske linked an issue Feb 11, 2025 that may be closed by this pull request
@turetske turetske added documentation Improvements or additions to documentation labels Feb 11, 2025
Copy link
Member

@jhiemstrawisc jhiemstrawisc left a comment

Choose a reason for hiding this comment

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

One extra comment that applies to each of the new sections - Can you provide a real example using our new canonical object: pelican://osg-htc.org/pelicanplatform/test/hello-world.txt or the pelican://osg-htc.org/pelicanplatform/test collection where appropriate?

To use the pelican client to list objects in a collection, use Pelican's `object ls` sub-command

```bash
pelican object ls pelican://<federation-url></namespace-prefix></path/to/collection>
Copy link
Member

Choose a reason for hiding this comment

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

There are additional flags for this sub command we should document:

Flags:
  -C, --collection-only          List collections only
      --collections-url string   URL to use for collection listing, overriding the director's response
  -j, --json                     Print results in JSON format
  -l, --long                     Include extended information
  -O, --object-only              List objects only


Pelican also has an `object sync` command which will sync objects from a source object or collections to a destination object or collection. If the objects already exist in the destination and are the same size or larger than the source objects of the same name, they will not be overwritten, but the objects which don't exist will be added.

> **Warning**: In the case where an object in the destination is smaller than an object with the same name in the source, the sync command assumes that a partial sync was interrupted and completes it by appending the necessary bytes. If it issn't the same file, but has the same name, this can result in the mashing of two files together.
Copy link
Member

Choose a reason for hiding this comment

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

How can I user tell this is the case before they sync things and create potentially bad data? Can you also mention that this is a side-effect of "object immutability"?


> **Warning**: In the case where an object in the destination is smaller than an object with the same name in the source, the sync command assumes that a partial sync was interrupted and completes it by appending the necessary bytes. If it issn't the same file, but has the same name, this can result in the mashing of two files together.
### Sync Objects from a Collection to a Local Directory
Copy link
Member

Choose a reason for hiding this comment

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

Few comments:

  • Can you provide some discussion of or a link to how this can be done with tokens?
  • I think sync from remote to local also requires that listings is enabled, doesn't it? Can you explain any assumptions/requirements on Origin/prefix capabilities and how the user can verify those?
  • I can't remember all the implementation details, but are there any other assumptions to document about any importance of trailing /s in anything? I know you had a big chart to explain all the operations sync had to perform. Maybe that table is even worth including here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think the table is bit too mountain dewy. It was very much meant for internal use more than anything else. But I will try to clarify and odd edge cases or trailing '/' issues.

@turetske turetske added this to the v7.15 milestone Feb 24, 2025
@turetske turetske modified the milestones: v7.15, v7.16 Mar 21, 2025
@jhiemstrawisc jhiemstrawisc modified the milestones: v7.16, v7.17 Apr 22, 2025
@bbockelm bbockelm modified the milestones: v7.17, v7.18 Jun 13, 2025
@turetske turetske modified the milestones: v7.18, v7.19 Jul 8, 2025
@jhiemstrawisc jhiemstrawisc modified the milestones: v7.19, v7.20 Sep 2, 2025
@turetske turetske modified the milestones: v7.20, v7.21 Sep 4, 2025
@turetske turetske modified the milestones: v7.21, v7.22 Oct 9, 2025
@turetske turetske modified the milestones: v7.22, v7.23 Nov 18, 2025
@turetske turetske modified the milestones: v7.23, v7.24 Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add other command line information to the client documentation

3 participants