Skip to content

Commit

Permalink
chore: update CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
docmerlin committed Nov 17, 2020
1 parent 5c5d4f5 commit 50c97c4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

1. [20036](https://github.com/influxdata/influxdb/pull/20036): Warn if V1 users are upgraded, but V1 auth wasn't enabled
1. [20039](https://github.com/influxdata/influxdb/pull/20039): Export 1.x CQs as part of `influxd upgrade`
1. [20067](https://github.com/influxdata/influxdb/pull/20067): Add DBRP cli commands as `influxd v1 dbrp`

### Bug Fixes

Expand Down
22 changes: 14 additions & 8 deletions cmd/influx/v1_dbrp.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,6 @@ func v1DBRPFindF(cmd *cobra.Command, args []string) error {
}
filter := influxdb.DBRPMappingFilterV2{OrgID: &orgID}

if err := filter.OrgID.DecodeFromString(orgID.String()); err != nil {
return err
}

if v1DBRPFindFlags.ID != "" {
fID, err := influxdb.IDFromString(v1DBRPFindFlags.ID)
if err != nil {
Expand All @@ -99,6 +95,18 @@ func v1DBRPFindF(cmd *cobra.Command, args []string) error {
filter.BucketID = fID
}

if v1DBRPFindFlags.DB != "" {
fID, err := influxdb.IDFromString(v1DBRPFindFlags.BucketID)
if err != nil {
return err
}
filter.BucketID = fID
}

if v1DBRPFindFlags.RP != "" {
filter.RetentionPolicy = &v1DBRPFindFlags.RP
}

dbrps, _, err := s.FindMany(context.Background(), filter, influxdb.FindOptions{})
if err != nil {
return err
Expand Down Expand Up @@ -290,9 +298,8 @@ func v1DBRPDeleteF(cmd *cobra.Command, args []string) error {
var v1DBRPUpdateFlags struct {
ID string // Specifies the mapping ID to filter on
Org organization // required // Specifies the organization ID to filter on
DB string //InfluxDB v1 database
Default *bool
RP string // InfluxDB v1 retention policy
Default *bool // pointer nil means that Default is unset in the Flags
RP string // InfluxDB v1 retention policy
}

func v1DBRPUpdateCmd(f *globalFlags, opt genericCLIOpts) *cobra.Command {
Expand All @@ -317,7 +324,6 @@ func v1DBRPUpdateF(cmd *cobra.Command, args []string) error {
}
if defaultFlg := cmd.Flags().Lookup("default"); defaultFlg.Changed {
defaultBool, _ := cmd.Flags().GetBool("default")
defaultBool = false
v1DBRPUpdateFlags.Default = &defaultBool
}

Expand Down

0 comments on commit 50c97c4

Please sign in to comment.