Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace --delete with --delete-destination-extra in transfer commands #1037

Merged
merged 4 commits into from
Oct 15, 2024

Conversation

MaxTueckeGlobus
Copy link
Contributor

https://app.shortcut.com/globus/story/35029/globus-cli-replace-delete-with-delete-destination-extra-in-transfer-commands

Changes

  • Added new --delete-destination-extra flag to globus timer create transfer and globus transfer that mirrors the existing --delete flags behavior
  • Added deprecation warning to the old --delete flag for globus timer create transfer and globus transfer

Testing

  • Added functional tests for --delete flag deprecation warning
  • Added functional tests checking --delete and --delete-destination-extra are mutually exclusive

@MaxTueckeGlobus MaxTueckeGlobus force-pushed the sc-35029-deprecate-delete-flag branch from 7dfc257 to 53737cb Compare October 15, 2024 17:52
src/globus_cli/commands/timer/create/transfer.py Outdated Show resolved Hide resolved
src/globus_cli/commands/transfer.py Outdated Show resolved Hide resolved
tests/functional/test_basics.py Outdated Show resolved Hide resolved
tests/functional/timer/test_transfer_create.py Outdated Show resolved Hide resolved
Copy link

@m1yag1 m1yag1 left a comment

Choose a reason for hiding this comment

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

Only minor restructured text markup issues in the changelog fragment.

@m1yag1
Copy link

m1yag1 commented Oct 15, 2024

FYI, I went ahead and pulled your changes and did a few manual tests. I received the deprecated warning as expected:

❯ globus timer create transfer --delete $src_coll:/home/share $dst_coll:/~/share --stop-after-runs=1

`--delete` has been deprecated and will be removed in a future release. Use --delete-destination-extra instead.
Timer ID:               ccf036fd-4c83-47e6-8fc3-052eb824f4ab
Name:                   CLI Created Timer [2024-10-15T15:25:11.472322]
Type:                   None
Submitted At:           2024-10-15 15:25:12
Status:                 loaded
Last Run:               None
Next Run:               2024-10-15 15:25:12
Schedule:               once at 2024-10-15 15:25:12
Number of Runs:         0
Number of Timer Errors: 0

I was also able to create a timer with the new flag:

globus timer create transfer --delete-destination-extra $src_coll:/home/share $dst_coll:/~/share --stop-after-runs=1

Timer ID:               524c26ea-0b90-4a37-8d62-4ebbadd2b598
Name:                   CLI Created Timer [2024-10-15T15:27:29.787513]
Type:                   None
Submitted At:           2024-10-15 15:27:31
Status:                 loaded
Last Run:               None
Next Run:               2024-10-15 15:27:30
Schedule:               once at 2024-10-15 15:27:30
Number of Runs:         0
Number of Timer Errors: 0

Plz, note that --delete-destination-extra does not have backticks like delete in the deprecation warning message..

@MaxTueckeGlobus MaxTueckeGlobus merged commit c3031d0 into main Oct 15, 2024
32 checks passed
@MaxTueckeGlobus MaxTueckeGlobus deleted the sc-35029-deprecate-delete-flag branch October 15, 2024 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants