Skip to content

Commit

Permalink
feat: Download Flux modules within runtime as part of Salsa query (#5324
Browse files Browse the repository at this point in the history
)

* feat: Add and test a mocked flux_mod API for the salsa database

* feat: Allow modules to be downloaded via fluxmod

* test: Automatically upload the module for fluxmod integration tests

* test: Allow the fluxmod test to run in integration or mock mode depending on feature flag

* chore: s/flux_mod/fluxmod/g

* test: Allow multiple modules in the test setup for fluxmod

* chore: Handle the prelude in conjunction with flux modules

* perf: Cache flux modules in salsa

* feat: Allow the fluxmod token to be passed from go

* chore: make generate

* perf: Cache the http agent across requests for fluxmod

* feat: Allow fluxmod's Url to be configured

* chore: Improve error messages for fluxmod

* fix: Handle directories in flxmod via percent encoding

* chore: Improve error messages for fluxmod more

* test: Add a test for cyclic dependencies in flux modules

* fix: Error instead of overflowing the stack on deeply nested modules

* chore: Only return a single error for package depth errors

* chore: Don't try to use flux modules in wasm

The zip crate does not work here at least so we disable it completely for now.

* chore: cargo clippy

* fix: Include the whole source in the source field of file

Corrects the positions of errors when there isn't a token at the first line index and column.

* refactor: Don't gate the fluxmod integration test under a rust feature

Lets `--all-features` still work as a easy way to run all tests, if the integration part should run the `FLUXMOD_BASE_URL`
must be passed instead.

* chore: make generate

* chore: Try upgrading mingw on CI

* fix: workaround broken toolchain settings

* chore: Revert mingw

* chore: make generate

Co-authored-by: Brandon Pfeifer <bpfeifer@influxdata.com>
  • Loading branch information
Markus Westerlind and bnpfeife committed Nov 10, 2022
1 parent 77b1d78 commit cced93e
Show file tree
Hide file tree
Showing 23 changed files with 1,863 additions and 176 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ jobs:
go install github.com/influxdata/pkg-config
- run:
name: Generate libflux
command: go generate ./libflux/go/libflux
command: RUSTUP_TOOLCHAIN=1.63-x86_64-pc-windows-gnu go generate ./libflux/go/libflux
- run:
name: Build flux
no_output_timeout: 20m
command: go build ./...
command: RUSTUP_TOOLCHAIN=1.63-x86_64-pc-windows-gnu go build ./...

release:
docker:
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -161,19 +161,19 @@ libflux-go: $(LIBFLUX_GENERATED_TARGETS)
$(GO_GENERATE) ./libflux/go/libflux

libflux-wasm:
cd libflux/flux && CC=clang AR=llvm-ar wasm-pack build --scope influxdata --dev
cd libflux/flux && CC=clang AR=llvm-ar wasm-pack build --scope influxdata --dev --no-default-features

clean-wasm:
rm -rf libflux/flux/pkg

build-wasm:
cd libflux/flux && CC=clang AR=llvm-ar wasm-pack build -t nodejs --scope influxdata
cd libflux/flux && CC=clang AR=llvm-ar wasm-pack build -t nodejs --scope influxdata --no-default-features

publish-wasm: clean-wasm build-wasm
cd libflux/flux/pkg && npm publish --access public

test-wasm: clean-wasm build-wasm
cd libflux/flux && CC=clang AR==llvm-ar wasm-pack test --node
cd libflux/flux && CC=clang AR==llvm-ar wasm-pack test --node --no-default-features

test-valgrind: libflux
cd libflux/c && $(MAKE) test-valgrind
Expand Down

0 comments on commit cced93e

Please sign in to comment.