Skip to content

As a data provider, I want to skip following symlinks during ingress #340

Description

@jordanpadams

Checked for duplicates

Yes - I have already checked

User Persona(s)

Data Provider, Node Operator

Motivation

...so that I can avoid uploading duplicate data when files are symlinked into multiple locations within my data delivery structure.

Additional Details

By default, the DUM client follows symlinks when walking directories during path resolution (using os.walk with followlinks=True). This can result in the same physical files being uploaded multiple times if they are symlinked from different locations.

A new --skip-symlinks flag should be added to pds-ingress-client that:

  1. Prevents following symbolic links to directories during path traversal
  2. Excludes symbolic links to files from the ingress file set

This feature supports the parent theme #319.


For Internal Dev Team To Complete

Acceptance Criteria

Given a directory structure containing symlinks to files or directories
When I perform pds-ingress-client --skip-symlinks ...
Then I expect symlinked files and directories to be excluded from the upload

Engineering Details

  • Modify PathUtil.resolve_ingress_paths() in path_util.py to accept a follow_symlinks parameter
  • Change os.walk(..., followlinks=True) to use the parameter value
  • Add filtering for symlinked files using os.path.islink()
  • Add --skip-symlinks argument to setup_argparser() in pds_ingress_client.py
  • Pass the flag value through the call chain

I&T

  • Unit tests for PathUtil.resolve_ingress_paths() with symlink scenarios
  • Integration test with symlinked directory structure

Metadata

Metadata

Assignees

Type

No type

Projects

Status
🏁 Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions