Skip to content

feat: add inactive topic policies command for topic - #444

Merged
zymap merged 2 commits into
streamnative:masterfrom
nodece:inactive_topic
Sep 28, 2021
Merged

zymap merged 2 commits into
streamnative:masterfrom
nodece:inactive_topic

Conversation

@nodece

@nodece nodece commented Sep 8, 2021 •

Copy link
Copy Markdown
Contributor

Signed-off-by: Zixuan Liu [email protected]

Changes

background from #246, the PR implements the following commands:

  • pulsarctl topics get-inactive-topic-policies <topic> --applied <bool>
  • pulsarctl topics remove-inactive-topic-policies <topic>
  • pulsarctl topics set-inactive-topic-policies <topic> --enable-delete-while-inactive <bool> --max-inactive-duration <string> --delete-mode <delete_when_no_subscriptions|delete_when_subscriptions_caught_up>

@nodece
nodece requested review from a team and zymap as code owners September 8, 2021 10:04
@nodece
nodece force-pushed the inactive_topic branch 6 times, most recently from e1d1290 to 16f8e96 Compare September 9, 2021 06:08
Comment thread pkg/ctl/topic/get_inactive_topic.go Outdated

import (
"github.com/streamnative/pulsarctl/pkg/cmdutils"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

remove the empty line?

"github.com/stretchr/testify/assert"
)

func TestInactiveTopicCmd(t *testing.T) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We also need to add some failure case tests.

@nodece nodece Sep 22, 2021 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think we just need to test the flag required by set-inactive-topic-policies.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The failure case is used to check the error response is parsed correctly at the pulsarctl

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Do you want to test the response from pulsar?

@nodece
nodece force-pushed the inactive_topic branch 2 times, most recently from b8246b2 to 851cdeb Compare September 24, 2021 06:19
@nodece
nodece force-pushed the inactive_topic branch 2 times, most recently from a97367d to 57cdcf0 Compare September 24, 2021 12:29
@zymap
zymap merged commit db4dda4 into streamnative:master Sep 28, 2021
@nodece
nodece deleted the inactive_topic branch September 29, 2021 01:36
nodece added a commit that referenced this pull request Nov 12, 2021
Signed-off-by: Zixuan Liu <[email protected]>

### Changes

background from #246,  the PR implements the following commands:

- `pulsarctl topics get-inactive-topic-policies <topic> --applied <bool>`
- `pulsarctl topics remove-inactive-topic-policies <topic>`
- `pulsarctl topics set-inactive-topic-policies <topic> --enable-delete-while-inactive <bool> --max-inactive-duration <string> --delete-mode <delete_when_no_subscriptions|delete_when_subscriptions_caught_up>`

(cherry picked from commit db4dda4)
tisonkun pushed a commit to tisonkun/pulsar-client-go that referenced this pull request Aug 15, 2023
…sarctl#444)

Signed-off-by: Zixuan Liu <[email protected]>

### Changes

background from streamnative/pulsarctl#246,  the PR implements the following commands:

- `pulsarctl topics get-inactive-topic-policies <topic> --applied <bool>`
- `pulsarctl topics remove-inactive-topic-policies <topic>`
- `pulsarctl topics set-inactive-topic-policies <topic> --enable-delete-while-inactive <bool> --max-inactive-duration <string> --delete-mode <delete_when_no_subscriptions|delete_when_subscriptions_caught_up>`
tisonkun pushed a commit to apache/pulsar-client-go that referenced this pull request Aug 16, 2023
…sarctl#444)

Signed-off-by: Zixuan Liu <[email protected]>

### Changes

background from streamnative/pulsarctl#246,  the PR implements the following commands:

- `pulsarctl topics get-inactive-topic-policies <topic> --applied <bool>`
- `pulsarctl topics remove-inactive-topic-policies <topic>`
- `pulsarctl topics set-inactive-topic-policies <topic> --enable-delete-while-inactive <bool> --max-inactive-duration <string> --delete-mode <delete_when_no_subscriptions|delete_when_subscriptions_caught_up>`
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