Skip to content

Commit

Permalink
build: remove as much of chronograf as possible, move static-asset co…
Browse files Browse the repository at this point in the history
…de into `static` package (#21898)

* Move script for building UI
* Verify checksum of built ui assets
* Transfer static asset handling into own package
* Delete as many files from chronograf/ as we can to still build


Co-authored-by: William Baker <wbaker@gmail.com>
  • Loading branch information
danxmoran and williamhbaker authored Jul 21, 2021
1 parent 5af3d62 commit de103ee
Show file tree
Hide file tree
Showing 331 changed files with 373 additions and 69,650 deletions.
35 changes: 4 additions & 31 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,34 +35,10 @@ test.key
/editorconfig-checker
/staticcheck

ui/node_modules
ui/coverage
ui/npm-error.log
ui/build
ui/.cache
ui/package-lock.json
ui/junit.xml

# e2e test artifacts
ui/cypress/screenshots
ui/cypress/videos

ui/src/api/.gitignore
ui/src/api/.openapi-generator-ignore
ui/src/api/.openapi-generator/VERSION
ui/src/api/git_push.sh

# UI generated typescript types
ui/src/client/generatedRoutes.ts

http/swagger_gen.go

# The below files are generated with make generate
# These are used with the assests go build tag.
chronograf/canned/bin_gen.go
chronograf/dist/dist_gen.go
chronograf/server/swagger_gen.go
http/swagger_gen.go
# Generated static assets
/static/data/*
!/static/data/swagger*.yml
/static/static_gen.go

# Ignore TSM/TSI testdata binary files
tsdb/tsi1/testdata
Expand Down Expand Up @@ -140,8 +116,6 @@ man/*.1.gz
# test outputs
/test-results.xml
junit-results
cypress/screenshots
cypress/videos

# profile data
/prof
Expand All @@ -158,6 +132,5 @@ cypress/videos
.influxdbv2/
.profile
.rustup/
.yarnrc
go/
goreleaser-install
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Because of the version bump to `go`, the macOS build for this release requires a
1. [21869](https://github.com/influxdata/influxdb/pull/21869): Specify which fields are missing when rejecting an incomplete onboarding request.
1. [21864](https://github.com/influxdata/influxdb/pull/21864): Systemd unit should block on startup until http endpoint is ready
1. [21839](https://github.com/influxdata/influxdb/pull/21839): Fix display and parsing of `influxd upgrade` CLI prompts in PowerShell.
1. [21898](https://github.com/influxdata/influxdb/pull/21898): Removed unused `chronograf-migator` package & chronograf API service, and updated various "chronograf" references.

## v2.0.7 [2021-06-04]
----------------------
Expand Down
33 changes: 2 additions & 31 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

# SUBDIRS are directories that have their own Makefile.
# It is required that all SUBDIRS have the `all` and `clean` targets.
SUBDIRS := http ui chronograf storage
SUBDIRS := static storage

export GOPATH=$(shell go env GOPATH)
export GOOS=$(shell go env GOOS)
Expand Down Expand Up @@ -69,12 +69,6 @@ SOURCES := $(shell find . -name '*.go' -not -name '*_test.go') go.mod go.sum
# All go source files excluding the vendored sources.
SOURCES_NO_VENDOR := $(shell find . -path ./vendor -prune -o -name "*.go" -not -name '*_test.go' -print)

# All assets for chronograf
UISOURCES := $(shell find ui -type f -not \( -path ui/build/\* -o -path ui/node_modules/\* -o -path ui/.cache/\* -o -name Makefile -prune \) )

# All precanned dashboards
PRECANNED := $(shell find chronograf/canned -name '*.json')

# List of binary cmds to build
CMDS := \
bin/$(GOOS)/influxd
Expand Down Expand Up @@ -139,9 +133,6 @@ checkgenerate:

generate: $(SUBDIRS)

test-js: node_modules
make -C ui test

test-go:
$(GO_TEST) $(GO_TEST_PATHS)

Expand Down Expand Up @@ -176,26 +167,6 @@ clean:
$(RM) -r bin
$(RM) -r dist

define CHRONOGIRAFFE
._ o o
\_`-)|_
,"" _\_
," ## | 0 0.
," ## ,-\__ `.
," / `--._;) - "HAI, I'm Chronogiraffe. Let's be friends!"
," ## /
," ## /
endef
export CHRONOGIRAFFE
chronogiraffe: $(SUBDIRS) generate $(CMDS)
@echo "$$CHRONOGIRAFFE"

run: chronogiraffe
./bin/$(GOOS)/influxd --assets-path=ui/build

run-e2e: chronogiraffe
./bin/$(GOOS)/influxd --assets-path=ui/build --e2e-testing --store=memory

# generate feature flags
flags:
$(GO_GENERATE) ./kit/feature
Expand All @@ -216,4 +187,4 @@ dshell: dshell-image
@docker container run --rm -p 8086:8086 -p 8080:8080 -u $(shell id -u) -it -v $(shell pwd):/code -w /code influxdb:dshell

# .PHONY targets represent actions that do not create an actual file.
.PHONY: all $(SUBDIRS) run fmt checkfmt tidy checktidy checkgenerate test test-go test-js test-go-race test-tls bench clean node_modules vet nightly chronogiraffe dist ping protoc e2e run-e2e influxd libflux flags dshell dclean docker-image-flux docker-image-influx pkg-config
.PHONY: all $(SUBDIRS) run fmt checkfmt tidy checktidy checkgenerate test test-go test-js test-go-race test-tls bench clean node_modules vet nightly chronogiraffe dist ping protoc e2e influxd libflux flags dshell dclean docker-image-flux docker-image-influx pkg-config
14 changes: 0 additions & 14 deletions chronograf/.bumpversion.cfg

This file was deleted.

67 changes: 0 additions & 67 deletions chronograf/.kapacitor/alerts.go

This file was deleted.

Loading

0 comments on commit de103ee

Please sign in to comment.