Commit Graph

351 Commits (8ed55e72b85b0807c97d3d1d7d12e9f07c9737e9)

Author SHA1 Message Date
Jeffrey Smith II a0f1184bb3
fix: manually scheduled task runs now run when expected (#23664)
* fix: run manually scheduled tasks at their scheduled time

* fix: actually use it

* fix: get tests building

* fix: fix tests

* fix: lint
2022-10-13 14:57:57 -04:00
Jeffrey Smith II 090f681737
feat: Add remotes and replications to telemetry (#23456)
* feat: start work on remotes/replications phone home data

* feat: add remotes/replications phone home data (no tests

* refactor: use erroring binary conversions

* style: gofmt

* refactor: improve some error handling

* style: cleanup

* feat: add tests

* refactor: just list remotes/replications rather than decrement

* chore: linting fix

Co-authored-by: DStrand1 <dstrandboge@influxdata.com>
2022-06-16 14:48:06 -04:00
Dane Strandboge 82d1123e78
build: upgrade to Go 1.18.1 (#23252) 2022-04-13 15:24:27 -05:00
Jonathan A. Sternberg 72c4c55609
build(flux): update flux to v0.162.0 (#23255) 2022-04-05 16:10:41 -05:00
Daniel Moran 0fbda8397d
feat: recommend `influxd downgrade` after encountering unknown KV migration (#22805) 2021-11-01 11:07:54 -04:00
Daniel Moran eedd84671b
feat: initialize `influxd downgrade` command to run `Down()` migrations on metadata (#22800) 2021-10-29 16:34:01 -04:00
Daniel Moran 335b74b25f
feat: take a backup of KV/SQL metadata stores before applying migrations (#22765) 2021-10-28 16:02:15 -04:00
Daniel Moran 58139c47b2
feat: add auth to remotes & replications APIs (#22744) 2021-10-26 11:32:35 -04:00
Daniel Moran a1a725945b
chore: fix KV migration to add notebooks and annotations to all-access tokens (#22738) 2021-10-22 18:03:09 -04:00
Daniel Moran 504f0e4413
feat: passing `type=basic` returns task metadata without query text (#22728) 2021-10-22 09:14:58 -04:00
Daniel Moran 7b7d4f3856
fix(upgrade): don't drop shard-group durations when upgrading DBs (#22650)
Add KV migration to repair missing shard-group durations
2021-10-11 14:43:57 -07:00
Sam Arnold 5015297d40
fix: more expressive errors (#22448)
* fix: more expressive errors

Closes #22446

* fix: server only logging for untyped errors

* chore: fix formatting
2021-09-13 15:12:35 -04:00
Daniel Moran dc3b501298
refactor: rename Lock/Unlock on KV stores to RLock/RUnlock (#22357) 2021-08-31 17:03:54 -04:00
Daniel Moran 01355a068c
refactor: move helper functions for setting up test stores into testing package (#22347)
* Move tenant.Service unit tests into its package
* Delete the top-level TenantService interface now that it's not used.
* Move helper funcs for setting up test stores into testing pkg
* Delete duplicate implementations scattered through the codebase
* Move error assertions into store-creation helpers
2021-08-31 16:43:45 -04:00
Daniel Moran 585ff40968
fix: migrate all-access tokens to grant notebook/annotation permissions (#22257) 2021-08-18 16:20:22 -04:00
William Baker b5b36b2804
feat: migrations for annotations & notebooks resource types on operator token (#21840)
* feat: migration for operator token to include permissions for annotations and notebooks

* feat: run migrations for restored dbs

* chore: cleanup go.mod

* chore: better description comment for migration

* fix: fixed cursor return condition

* fix: hard code the list of old operator permissions

* feat: run migrations prior to swapping restored dbs

* fix: fix the sqlite migrator

* chore: update CHANGELOG
2021-07-14 09:23:25 -05:00
William Baker b0ea3b6675
feat: backup and restore sqlite database (#21584)
* feat: new metadata backup endpoint

* feat: added restore/sql API endpoint

* fix: content-type is multipart/mixed, part names are kv and sql

* fix: changed multipart manifest to buckets and made it .json

* feat: added lock for backing up sqlite and bolt dbs

* fix: use read lock instead of write lock on kv during backup

* fix: use filepath.Join for temp dirs
2021-06-02 19:07:53 -04:00
Sam Arnold 7b2e122869
refactor: refactor for tasks backport (#21117)
* chore: remove dead code

* refactor: move FluxLanguageService interface to fluxlang

* chore: run fmt

* refactor: move task.go from top level to task/taskmodel

* chore: run formatter

* chore: fix up import ordering with gci
2021-04-07 14:42:55 -04:00
Daniel Moran 00afd95cb7
refactor: automated move of errors and id from root to kit (#21101)
Co-authored-by: Sam Arnold <sarnold@influxdata.com>
2021-03-30 14:10:02 -04:00
Daniel Moran ba4099ddb9
feat(cmd/influx): allow setting shard-group durations for buckets via API and CLI (#20911)
Co-authored-by: Alexander Savinykh <asavinykh@nbrx.de>
2021-03-11 14:51:03 -05:00
Daniel Moran e86ee475b2
fix: make AST-based option parsing the default, remove feature flag (#20875) 2021-03-08 09:51:21 -05:00
Daniel Moran ebd37c8b9a
fix(kv): log migration events at debug level to avoid spam (#20572) 2021-01-25 10:34:59 -08:00
Daniel Moran bac5515a0a
fix(kv): add KV migration to repair DBRP mappings broken by schema change (#20168) 2020-11-25 12:49:45 -05:00
Stuart Carnie dfbe114ead fix: PR Feedback – ensure keys cannot contain / 2020-11-24 10:28:00 +11:00
Stuart Carnie 6e7a6313d7 fix: Add a ByOrgID index to DBRP
This commit adds a new index and migration to the DBRP service for
retrieving all database and retention policy mappings for a single
organization.

This change was required to resolve an invalid assumption of the DBRP
service, which relied on a prefix match of the byOrgAndDatabase kv.Index
when performing search operations by organization ID only.

Closes #20096
2020-11-24 10:28:00 +11:00
Stuart Carnie 78977eb3c8 fix: Ensure Index.Walk fetches matching foreign keys only
This commit modifies the behaviour of the indexWalk function to ensure
it parses the key parts and matches the foreign key exactly.

Closes #20096
2020-11-24 10:28:00 +11:00
Arnav Aggarwal 96b26f5a42
Merge pull request #19979 from influxdata/timeFilterTasks
feat(tasks): added functionality to filter runs by time
2020-11-16 13:22:07 -08:00
George MacRorie 5954db8c4d chore(documents): reinstate minimal read-only document store for dashboard templates 2020-11-16 12:41:26 +00:00
George MacRorie 16d916a952 refactor(kv): delete deprecated kv service code
This includes removal of a lot of kv.Service responsibilities. However,
it does not finish the re-wiring. It removes documents, telegrafs,
notification rules + endpoints, checks, orgs, users, buckets, passwords,
urms, labels and authorizations. There are some oustanding pieces that
are needed to get kv service compiling (dashboard service urm
dependency). Then all the call sites for kv service need updating and
the new implementations of telegraf and notification rules + endpoints
needed installing (along with any necessary migrations).
2020-11-16 12:41:26 +00:00
Daniel Moran 15b9531273
fix: correct various typos (#19987)
Co-authored-by: kumakichi <xyesan@gmail.com>
2020-11-11 13:54:21 -05:00
Arnav Aggarwal 46d20c127a fix(tasks): made code review changes 2020-11-11 08:21:51 -10:00
Arnav Aggarwal 64a562db42 feat(tasks): added functionality to filter runns by time 2020-11-10 10:30:34 -10:00
Adrian Thurston 30ad7281aa
refactor: replace builtin package with fluxinit/static (#3304) (#19909)
A static initialization is not desirable in the main binaries, as it forces all
paths of code to init, but it is still useful in tests. It allows static
intialization to be performed once for all tests and eliminates the need to
always add the FluxInit call. Added a fluxinit/static package that calls
fluxinit.FluxInit() to replace the builtin package. This hides the nature of
the initialization and makes it clear that it is mandatory initialization code
getting called.
2020-11-05 16:54:28 -08:00
Ben Johnson 419b0cf76b feat: Implement full restore 2020-11-05 10:05:01 -07:00
George 8ca2989717 feat(dashboards): isolate service in own package (#19852)
feat(dashboard): add owner ID to dashboard model

This adds the explicit OwnerID field to Dashboard and also adds a
migration which populates dashboard owners IDs based on dashboard owner
URMs.

feat(dashboards): isolate service in own package

This change isolates the dashboards service into its own package. It
also updates the API to no longer interface with user resource mappings.
Instead it defines new handlers which rely on the newly populated owner
ID field.

chore(dashboards): port tests from http package into new service transport package

chore(launcher): use dashboard transport package client in launcher tests

chore(kv): remove now defunkt dashboard service implementations
2020-11-04 15:53:02 +00:00
George MacRorie b274e15eac fix(telegraf): support pagination parameters when listing 2020-11-04 15:53:02 +00:00
George MacRorie 5feea36e16 refactor(telegraf): remove references to kv service telegraf service implementation 2020-11-04 15:53:02 +00:00
George MacRorie 222470b1ef refactor(telegraf): add new isolated config service 2020-11-04 15:53:02 +00:00
Dan Moran ace60ed322 fix(kv): remove extra multiplication of RP to avoid overflow
Mirrors change from the onboarding service.
2020-11-03 12:37:50 -05:00
Stuart Carnie 6bc4158a46 feat(authorization): Add bcrypt password support to v1 authorizations
This commit extends the `v1/authorization` package to support
passwords associated with a token.

The summary of changes include:

* authorization.Service implements influxdb.PasswordsService
* Setting passwords for authorizations
* Verifying (comparing) passwords for a given authorization
* A service to cache comparing passwords, using a weaker hash
  that will live in memory only. This implementation is copied
  from InfluxDB 1.x
* Extended HTTP service to set a password using
  /private/legacy/authorizations/{id}/password

Closes #
2020-10-28 13:03:42 -07:00
George 78cafa861b
refactor(notifications): isolate endpoint service (#19818)
* refactor(notifications): isolate endpoint service

Following the ongoing effort to isolate behaviours into their own
packages and off of kv.Service, this change move the notification
endpoints service implementation into its own package. It removes the
endpoint behaviors from the kv service completely.

* chore(influxd): wire up the isolated check service in place of kv service
2020-10-28 15:22:14 +00:00
Stuart Carnie 5c63c2163d feat(authorization): Create a v1 authorization service
This service is a private API for managing authorization tokens
for v1 API requests.

Note that this commit does not hook up the service to the v1
`/query` and `/write`, which will occur in a subsequent PR.

Closes #19812
2020-10-27 08:26:10 -07:00
George 3d643e0681
refactor(notification): move rule service into own package (#19804)
* refactor(notification): move rule service into own package

* chore(launcher): fix tests to use clients as opposed to direct kv service

* chore(influx): update task cli to consume core domain model task from client

* chore(kv): remove rule service behaviours from kv

This also introduces the org id resolver type. Which is transplanted
from the kv service. As this one function coupled all resource
capabilities onto the kv service. Making removing these capabilities
impossible. Moving this type out into its own package which depends on
each service explicitly ensures we don't have one type which has to
implement all the service contracts.

* fix(launcher): remove double reference to influxdb package
2020-10-27 11:45:05 +00:00
Stuart Carnie d28e55d3b6 fix(kv): Reorganize bcrypt password hashing outside transactions
This ensures that transaction lifetimes are shorter to reduce lock
contention.

Additionally, this PR removes the ability to set an empty password
when running the initial on-boarding process. According to the
original developer, this behavior was required to permit Cloud
processes to complete. As this code is no longer shared, this security
issue is corrected.
2020-10-12 08:06:32 -07:00
greg linton 13cb2927bb Merge branch 'master' into feat/18733 2020-09-21 17:21:06 -06:00
Ayan George ca2055c16c
refactor: Replace ctx.Done() with ctx.Err() (#19546)
* refactor: Replace ctx.Done() with ctx.Err()

Prior to this commit we checked for context cancellation with a select
block and context.Context.Done() without multiplexing over any other
channel like:

  select {
    case <-ctx.Done():
      // handle cancellation
    default:
      // fallthrough
  }

This commit replaces those type of blocks with a simple check of
ctx.Err().  This has the following benefits:

* Calling ctx.Err() is much faster than entering a select block.

* ctx.Done() allocates a channel when called for the first time.

* Testing the result of ctx.Err() is a reliable way of determininging if
  a context.Context value has been canceled.

* fix: Fix data race in execDeleteTagValueEntry()
2020-09-16 12:20:09 -04:00
Yoofi Quansah 99bb1bba4d
Merge pull request #19548 from influxdata/yq-issue-19547
chore: remove hardcoded constants for ids
2020-09-14 09:20:45 -07:00
greg linton 53b325c7d0 Merge branch 'master' into feat/18733 2020-09-11 14:23:24 -06:00
Yoofi Quansah 2099b64578 chore: total removal of references to hardcoded IDs 2020-09-11 12:29:00 -07:00
Alirie Gray 12039918e4 fix(variables): use Update function for Put Variable 2020-09-11 11:48:11 -07:00