Skip to content

Commit

Permalink
chore: remove json1 build tag everywhere
Browse files Browse the repository at this point in the history
This is no longer necessary since SQLite 3.38, and was in fact removed completely in go-sqlite v1.14.13
  • Loading branch information
alnr committed Aug 30, 2024
1 parent d686795 commit 93edc9a
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .docker/Dockerfile-build
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ENV CGO_ENABLED=1
RUN go mod download

COPY . .
RUN go build -ldflags="-extldflags=-static" -tags sqlite,json1,sqlite_omit_load_extension -o /usr/bin/hydra
RUN go build -ldflags="-extldflags=-static" -tags sqlite,sqlite_omit_load_extension -o /usr/bin/hydra

#########################

Expand Down
2 changes: 1 addition & 1 deletion .docker/Dockerfile-hsm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ COPY . .
###############################

FROM builder as build-hydra
RUN go build -tags sqlite,json1,hsm -o /usr/bin/hydra
RUN go build -tags sqlite,hsm -o /usr/bin/hydra

###############################

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
- name: Run go-acc (tests)
run: |
make .bin/go-acc
.bin/go-acc -o coverage.out ./... -- -failfast -timeout=20m -tags sqlite,json1,sqlite_omit_load_extension
.bin/go-acc -o coverage.out ./... -- -failfast -timeout=20m -tags sqlite,sqlite_omit_load_extension
- name: Submit to Codecov
run: |
bash <(curl -s https://codecov.io/bash)
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ lint: .bin/golangci-lint-$(GOLANGCI_LINT_VERSION)
.PHONY: test
test: .bin/go-acc
make test-resetdb
source scripts/test-env.sh && go-acc ./... -- -failfast -timeout=20m -tags sqlite,json1,sqlite_omit_load_extension
source scripts/test-env.sh && go-acc ./... -- -failfast -timeout=20m -tags sqlite,sqlite_omit_load_extension
docker rm -f hydra_test_database_mysql
docker rm -f hydra_test_database_postgres
docker rm -f hydra_test_database_cockroach
Expand Down Expand Up @@ -84,15 +84,15 @@ e2e: node_modules test-resetdb
# Runs tests in short mode, without database adapters
.PHONY: quicktest
quicktest:
go test -failfast -short -tags sqlite,json1,sqlite_omit_load_extension ./...
go test -failfast -short -tags sqlite,sqlite_omit_load_extension ./...

.PHONY: quicktest-hsm
quicktest-hsm:
DOCKER_BUILDKIT=1 DOCKER_CONTENT_TRUST=1 docker build --progress=plain -f .docker/Dockerfile-hsm --target test-hsm -t oryd/hydra:${IMAGE_TAG} --target test-hsm .

.PHONY: refresh
refresh:
UPDATE_SNAPSHOTS=true go test -failfast -short -tags sqlite,json1,sqlite_omit_load_extension ./...
UPDATE_SNAPSHOTS=true go test -failfast -short -tags sqlite,sqlite_omit_load_extension ./...

authors: # updates the AUTHORS file
curl https://raw.githubusercontent.com/ory/ci/master/authors/authors.sh | env PRODUCT="Ory Hydra" bash
Expand Down Expand Up @@ -178,14 +178,14 @@ install-stable:
HYDRA_LATEST=$$(git describe --abbrev=0 --tags)
git checkout $$HYDRA_LATEST
go install \
-tags sqlite,json1,sqlite_omit_load_extension \
-tags sqlite,sqlite_omit_load_extension \
-ldflags "-X github.com/ory/hydra/v2/driver/config.Version=$$HYDRA_LATEST -X github.com/ory/hydra/v2/driver/config.Date=`TZ=UTC date -u '+%Y-%m-%dT%H:%M:%SZ'` -X github.com/ory/hydra/v2/driver/config.Commit=`git rev-parse HEAD`" \
.
git checkout master

.PHONY: install
install:
go install -tags sqlite,json1,sqlite_omit_load_extension .
go install -tags sqlite,sqlite_omit_load_extension .

.PHONY: post-release
post-release: .bin/yq
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -849,24 +849,24 @@ It is recommended to use the make file to run your tests using `make quicktest`
**Please note**:

All tests run against a sqlite in-memory database, thus it is required to use
the `-tags sqlite,json1` build tag.
the `-tags sqlite` build tag.

Short tests run fairly quickly. You can either test all of the code at once:

```shell script
go test -v -failfast -short -tags sqlite,json1 ./...
go test -v -failfast -short -tags sqlite ./...
```

or test just a specific module:

```shell script
go test -v -failfast -short -tags sqlite,json1 ./client
go test -v -failfast -short -tags sqlite ./client
```

or a specific test:

```shell script
go test -v -failfast -short -tags sqlite,json1 -run ^TestName$ ./...
go test -v -failfast -short -tags sqlite -run ^TestName$ ./...
```

##### Regular Tests
Expand Down
2 changes: 1 addition & 1 deletion scripts/db-diff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function dump_sqlite {
hydra::util::ensure-sqlite

rm "$SQLITE_PATH" > /dev/null 2>&1 || true
go run -tags sqlite,json1,sqlite_omit_load_extension . migrate sql "sqlite://$SQLITE_PATH?_fk=true" --yes > /dev/null 2>&1 || true
go run -tags sqlite,sqlite_omit_load_extension . migrate sql "sqlite://$SQLITE_PATH?_fk=true" --yes > /dev/null 2>&1 || true
echo '.dump' | sqlite3 "$SQLITE_PATH"
}

Expand Down
2 changes: 1 addition & 1 deletion test/conformance/hydra/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN go mod download

COPY . .

RUN go build -tags sqlite,json1 -o /usr/bin/hydra
RUN go build -tags sqlite -o /usr/bin/hydra

VOLUME /var/lib/sqlite

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/circle-ci.bash
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if [[ ! -d "../../node_modules/" ]]; then
(cd ../..; npm ci)
fi

(cd ../../; go build -tags sqlite,json1 -o test/e2e/hydra . )
(cd ../../; go build -tags sqlite -o test/e2e/hydra . )

# Install oauth2-client
if [[ ! -d "./oauth2-client/node_modules/" ]]; then
Expand Down

0 comments on commit 93edc9a

Please sign in to comment.