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

[v23.3.x] rpk: small fixes. #18634

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/go/rpk/pkg/cli/cloud/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ rpk will talk to a localhost:9092 cluster until you swap to a different profile.
}

if p.Name == common.ContainerProfileName {
fmt.Printf("You are talking to a localhost 'rpk container' cluster (rpk profile name: %q)", p.Name)
fmt.Printf("You are talking to a localhost 'rpk container' cluster (rpk profile name: %q)\n", p.Name)
} else {
fmt.Printf("You are talking to a self hosted cluster (rpk profile name: %q)\n", p.Name)
}
Expand Down
2 changes: 1 addition & 1 deletion src/go/rpk/pkg/cli/profile/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func CreateFlow(
var err error
o, err = createCloudProfile(ctx, yAuthVir, cfg, fromCloud)
if err != nil {
if err == ErrNoCloudClusters {
if errors.Is(err, ErrNoCloudClusters) {
fmt.Println("Your cloud account has no clusters available to select, avoiding creating a cloud profile.")
return nil
}
Expand Down
16 changes: 9 additions & 7 deletions src/go/rpk/pkg/cli/topic/consume.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,15 @@ func newConsumeCommand(fs afero.Fs, p *config.Params) *cobra.Command {
out.MaybeDie(err, "unable to initialize admin kafka client: %v", err)

// We fail if the topic does not exist.
listed, err := adm.ListTopics(cmd.Context(), topics...)
out.MaybeDie(err, "unable to check topic existence: %v", err)
listed.EachError(func(d kadm.TopicDetail) {
if errors.Is(d.Err, kerr.UnknownTopicOrPartition) {
out.Die("unable to consume topic %q: %v", d.Topic, d.Err.Error())
}
})
if !c.regex {
listed, err := adm.ListTopics(cmd.Context(), topics...)
out.MaybeDie(err, "unable to check topic existence: %v", err)
listed.EachError(func(d kadm.TopicDetail) {
if errors.Is(d.Err, kerr.UnknownTopicOrPartition) {
out.Die("unable to consume topic %q: %v", d.Topic, d.Err.Error())
}
})
}

err = c.parseOffset(offset, topics, adm)
out.MaybeDie(err, "invalid --offset %q: %v", offset, err)
Expand Down
2 changes: 1 addition & 1 deletion src/go/rpk/pkg/cli/transform/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func newDeployCommand(fs afero.Fs, p *config.Params) *cobra.Command {
var file string

cmd := &cobra.Command{
Use: "deploy [WASM]",
Use: "deploy",
Short: "Deploy a transform",
Long: `Deploy a transform.

Expand Down
Loading