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

Support interactive edit for consumers #1145

Open
ripienaar opened this issue Sep 9, 2024 · 2 comments
Open

Support interactive edit for consumers #1145

ripienaar opened this issue Sep 9, 2024 · 2 comments
Assignees
Labels
proposal Enhancement idea or proposal

Comments

@ripienaar
Copy link
Collaborator

Proposed change

Make it like nats s edit -I

Use case

consumer editing

Contribution

No response

@ripienaar ripienaar added the proposal Enhancement idea or proposal label Sep 9, 2024
ploubser added a commit to ploubser/natscli that referenced this issue Sep 12, 2024
Here we add the --interactive flag to the consumer edit action. This
behaves the same as stream interactive edit.
ploubser added a commit to ploubser/natscli that referenced this issue Sep 12, 2024
Here we add the --interactive flag to the consumer edit action. This
behaves the same as stream interactive edit.
ripienaar added a commit that referenced this issue Sep 12, 2024
(#1145) Support interactive edit for consumers
@ripienaar ripienaar reopened this Jan 13, 2025
@ripienaar
Copy link
Collaborator Author

This one is pretty broken, shows many wrong fields

 32 # List of durations in Go format that represents a retry time scale for NaK'd messages
 33 #
 34 #   Type: array (items: integer)
 35 maxwaiting: 512
 36 optstartseq: 0
 37 optstarttime: null
 38 ratelimit: 0
 39 replaypolicy: 0
 40 samplefrequency: ""
 41 headersonly: false
 42 maxrequestbatch: 0
 43 maxrequestexpires: 0s
 44 maxrequestmaxbytes: 0
 45 inactivethreshold: 0s
 46 replicas: 0
 47 memorystorage: false

Compared to https://github.com/nats-io/nats-server/blob/e485bfa816d7c62b687df23447ac28784f5b4f38/server/consumer.go#L116

@ripienaar
Copy link
Collaborator Author

The issue here is that the ConsumerConfig doesn't have the yaml markup here https://github.com/nats-io/jsm.go/blob/f5cd8a22d0931e69320eb585d6265069e1326a34/api/consumers.go#L402

As the backend for this is a yaml marshal/unmarshal without those keys it doesn't turn MemoryStorage into mem_storage instead doing memorystorage that isnt in the schema.

So we'll have to add the yaml tags on the main config and all related structs, code wise I think CLI is fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Enhancement idea or proposal
Projects
None yet
Development

No branches or pull requests

2 participants