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

feat: add flag for developing dy admin apply #156

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

wafuwafu13
Copy link
Contributor

@wafuwafu13 wafuwafu13 commented Aug 21, 2023

*Issue #155 (comment)

Description of changes:

During development, to eliminate the impact on users, ensure that apply only works when --dev is added.

# just return message
$ dy admin apply
not yet implemented

# develop feature
$ dy admin apply --dev
(something happen)

Now, dy admin apply --dev causes panic.

~/Desktop/dynein
$ ./target/release/dy admin apply
not yet implemented

~/Desktop/dynein
$ ./target/release/dy admin apply --dev
thread 'main' panicked at 'not yet implemented', src/main.rs:89:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@StoneDot
Copy link
Contributor

StoneDot commented Aug 24, 2023

Thank you for trying to build new feature for dynein.
I understand that you are trying to create the feature in separate multiple pull requests. I think It is a reasonable tactic.

As my quick search, I found that hidden option of structopt may work for this kind of phased development. I hope this information helps to implement more user-friendly interface even in developing phase. TeXitoi/structopt#466

@wafuwafu13
Copy link
Contributor Author

Do not display apply subcommand in help is good idea but it is written in the README.
So I want to keep --test-apply flag so that even if the user executes it, it will not affect the user.

src/cmd.rs Show resolved Hide resolved
Copy link
Contributor

@StoneDot StoneDot left a comment

Choose a reason for hiding this comment

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

Could you check my comments? I think you need to sort out what you want to check on your test code. I'm terrible sorry, but I was not able to get your intention from the code.

src/main.rs Outdated Show resolved Hide resolved
src/cmd.rs Show resolved Hide resolved
tests/apply.rs Outdated Show resolved Hide resolved
tests/apply.rs Outdated Show resolved Hide resolved
tests/apply.rs Outdated Show resolved Hide resolved
tests/apply.rs Outdated Show resolved Hide resolved
tests/apply.rs Outdated Show resolved Hide resolved
@wafuwafu13 wafuwafu13 marked this pull request as draft September 27, 2023 17:19
@wafuwafu13 wafuwafu13 marked this pull request as ready for review October 3, 2023 21:26
@wafuwafu13 wafuwafu13 marked this pull request as draft October 3, 2023 21:47
@wafuwafu13 wafuwafu13 marked this pull request as ready for review October 5, 2023 20:04
Copy link
Contributor

@StoneDot StoneDot left a comment

Choose a reason for hiding this comment

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

Could you check a new comment?

src/cmd.rs Show resolved Hide resolved
Copy link
Contributor

@StoneDot StoneDot left a comment

Choose a reason for hiding this comment

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

Thank you for the fix. LGTM

@StoneDot StoneDot merged commit cf44d2d into awslabs:main Oct 10, 2023
1 check passed
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.

2 participants