The internal command can be used to execute flux tests using the same
internals as the `flux test` command, but it will invoke these tests
against a test influxdb instance that is launched in-process.
When checking for existing configs, check the length of the array after
parsing. There could be an empty config file present.
If --name was specified then use that as the configuration name, regardless of
whether or not there are existing configs.
Allow a 0 (infinite) retention to be specified with --retention when in
interactive mode.
Co-authored-by: Dan Moran <dmoran@influxdata.com>
This package provides essentially the same API as the Cloud tests
package, utilising the `TestLauncher` type.
Additional With functional options were added to the `Launcher`
in order to expose type-safe configuration of InfluxQL configuration.
Additional With options may be added in the future as the need arises.
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).
This resolves observed race conditions when running test suites that
utilize the launcher. It also reduces test times considerably, by
eliminating a slow loop to find a port.
The enhancements and fixes to the user experience are as follows:
* Rename active and inactive commands to the actions set-active and
set-inactive respectively to clarify their behavior
To set a token to active:
```
influx v1 auth set-active
```
To set a token to inactive, preventing its use:
```
influx v1 auth set-inactive
```
* allow `--id` or `--username` anywhere a single authentication token is
required
* use separate vars to store the flag state of each command
* factor out the behavior to find a single authentication token into
a shared function, `v1FindOneAuthorization`
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.
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
* fix: use fluxinit package to init flux library instead of builtin
The builtin package performs costly initialization work in the go init()
function, which causes the work to be performed for all paths of the main
executables that need it, including help screens. This patch uses the fluxinit
package, which requires a call to do the costly work. It allows help screens
and other code paths to execute quickly.
* fix: need to draw in the influxdb-specific standard library in fluxinit
This commit add a series of new subcommands to the `influx` CLI tool.
* `influx v1` to host any InfluxDB v1 specific commands
* `influx v1 auth` for v1 authorization token management.
The commands provide access to the private authorization APIs
used to manage authorization tokens for v1 compatibility APIs,
including:
* `/write`
* `/query`
Closes#19765
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 #
* 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
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
* 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
This function is used by the end-to-end test harness to stabilize query profile
results before diff and is needed when implementing the Profile interface.
This commit ensures OSS is using the new implementation of the
AuthorizationService from the authorization package.
It also removes the associated feature flag.
This commit removes incorrect implementations of the `DeleteBucket`
and `DeleteBucketRangePredicate` APIs from the storage package,
which remained after the transition to the tsdb 1.x storage engine.
Secondly, this PR utilizes the `ENotImplemented` error code to inform
users which call the `/api/v2/delete`
- Update CIrcleCI configuration to start release process on an RC build
- Update .goreleaser.yml:
- Start building armel and armhf binaries and rpm and debian packages.
- Generate sha256 checksum file.
- launcher.go: do not use `max` module to escape integeroverflow problem for armel and armhf builds
- Start using `v0.142.0` of goreleaser
- Added pre and post install/uninstall scripts for rpm amd deb packages
The `net/http` package default transport will request content gzipped
automatically if `DisableCompression` is set to false (which is the
default). If the transport does it automatically, it will decompress it
automatically which is what was the original intention of the code. But,
if it is requested explicitly, then go will not decompress the data
automatically.
Enables the mix and max aggregates for the ReadGroupAggregte pushdown behind a feature flag.
Co-authored-by: Jonathan A. Sternberg <jonathan@influxdata.com>
* chore: update task tests to use the tenant service
After the introduction of the tenant system we need to switch the testing frameworks
to use it instead of the old kv system
* chore: update onboarding to allow injected middleware
This modifies the query cli to remove the flux runtime dependency and
uses the public http api to execute the query. It then uses flux's csv
decoder to read the raw response.
This removes any dependency on the flux runtime and substantially
reduces the binary size and the startup execution time.
The `buckets()` command would use a bucket lookup that wrapped the
`FindBuckets` API. It did not use the pagination aspect of this API
correctly. When the underlying implementation was changed to a version
that correctly implemented pagination, this broke the query `buckets()`
command. Since it was query that used the API incorrectly rather than a
regression in the `FindBuckets` implementation, this fixes the usage to
correctly use pagination.
introduces the new flag --configs-path to the influx CLI. This new
flag has a corresponding env var INFLUX_CONFIGS_PATH. It is useful
to export this env var in a shell dotfile for consumption throughout the
box.
closes: #17979