Skip to content

[Feature]: Activate Globus immediately on zstash update #415

Description

@forsyth2

How will this affect the next version number?

New feature (increment MINOR version)

Is your feature request related to a problem?

Related to #409, @wlin7 noted that zstash update

can take significant time to check/gather file list before checking on auth token. Maybe we should switch the order: immediately checking on token and consent if zstash sets to use globus.

Describe the solution you'd like

It looks like #414 (the main fix to #409) is going to be more focused on stat optimization. Nevertheless, this is still a good idea for a performance improvement and could be implemented separately. #412 (which is closed) added this block, which should work:

    # Check Globus authentication early to fail fast before file scanning
    if config.hpss is not None and config.hpss != "none":
        url = urlparse(config.hpss)
        if url.scheme == "globus":
            logger.info("Checking Globus authentication before file scanning...")
            globus_activate(config.hpss)

    # Existing code here:
    # Start doing actual work
    logger.debug("Running zstash update")
    logger.debug("Local path : {}".format(config.path))
    logger.debug("HPSS path  : {}".format(config.hpss))
    logger.debug("Max size  : {}".format(maxsize))
    logger.debug("Keep local tar files  : {}".format(keep))

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions