Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into feature/instana_sup…
Browse files Browse the repository at this point in the history
…port

# Conflicts:
#	driver/registry_default.go
#	go.mod
#	go.sum
  • Loading branch information
aeneasr committed Jun 16, 2021
2 parents e390b73 + abe3a40 commit 0f241ef
Show file tree
Hide file tree
Showing 206 changed files with 11,295 additions and 12,391 deletions.
12 changes: 8 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ jobs:
- checkout
- setup_remote_docker

- go/load-cache:
key: ory-kratos-go-mod-v1
- go/mod-download
- go/save-cache:
key: ory-kratos-go-mod-v1

- prettier/install
- prettier/check
- prettier/install:
Expand All @@ -59,15 +65,13 @@ jobs:

- golangci/install
- golangci/lint
- go/load-cache
- go/mod-download
- go/save-cache
- node/install-packages
- run: timeout 15 sh -c 'until nc -z $0 $1; do sleep 1; done' 127.0.0.1 4444
- run: make install
- run: make test-docs
- run: make test-coverage
- run: test -z "$CIRCLE_PR_NUMBER" && goveralls -service=circle-ci -coverprofile=coverage.txt -repotoken=$COVERALLS_REPO_TOKEN || echo "forks are not allowed to push to coveralls"
- run: |
bash <(curl -s https://codecov.io/bash)
test-e2e:
docker:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ cover.out
tmp/
.DS_Store
./kratos
coverage.txt
packrd/
*-packr.go
dist/
Expand All @@ -13,3 +12,4 @@ test/e2e/cypress/videos
test/e2e/cypress/screenshots
test/e2e/.bin
pkged.go
coverage.*
10 changes: 0 additions & 10 deletions .schema/openapi/patches/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@
- op: add
path: /components/schemas/uiNodeInputAttributes/properties/value/nullable
value: true
- op: replace
path: /components/schemas/uiNodeInputAttributesValue
value:
oneOf:
- type: string
- type: number
- type: boolean
- op: add
path: /components/schemas/uiNodeInputAttributes/properties/value/$ref
value: "#/components/schemas/uiNodeInputAttributesValue"

- op: replace
path: /components/schemas/selfServiceErrorContainer/properties/errors/type
Expand Down
61 changes: 37 additions & 24 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents**

- [Unreleased (2021-06-02)](#unreleased-2021-06-02)
- [Unreleased (2021-06-15)](#unreleased-2021-06-15)
- [Bug Fixes](#bug-fixes)
- [Code Refactoring](#code-refactoring)
- [Documentation](#documentation)
- [Features](#features)
- [Tests](#tests)
- [Unclassified](#unclassified)
- [0.6.3-alpha.1 (2021-05-17)](#063-alpha1-2021-05-17)
- [Bug Fixes](#bug-fixes-1)
- [Code Refactoring](#code-refactoring-1)
Expand All @@ -27,14 +28,14 @@
- [Documentation](#documentation-2)
- [Features](#features-3)
- [Tests](#tests-1)
- [Unclassified](#unclassified)
- [Unclassified](#unclassified-1)
- [BREAKING CHANGES](#breaking-changes-1)
- [0.5.5-alpha.1 (2020-12-09)](#055-alpha1-2020-12-09)
- [Bug Fixes](#bug-fixes-4)
- [Documentation](#documentation-3)
- [Features](#features-4)
- [Tests](#tests-2)
- [Unclassified](#unclassified-1)
- [Unclassified](#unclassified-2)
- [0.5.4-alpha.1 (2020-11-11)](#054-alpha1-2020-11-11)
- [Bug Fixes](#bug-fixes-5)
- [Code Refactoring](#code-refactoring-3)
Expand All @@ -54,14 +55,14 @@
- [Documentation](#documentation-7)
- [Features](#features-7)
- [Tests](#tests-5)
- [Unclassified](#unclassified-2)
- [Unclassified](#unclassified-3)
- [0.5.0-alpha.1 (2020-10-15)](#050-alpha1-2020-10-15)
- [Bug Fixes](#bug-fixes-9)
- [Code Refactoring](#code-refactoring-4)
- [Documentation](#documentation-8)
- [Features](#features-8)
- [Tests](#tests-6)
- [Unclassified](#unclassified-3)
- [Unclassified](#unclassified-4)
- [BREAKING CHANGES](#breaking-changes-2)
- [0.4.6-alpha.1 (2020-07-13)](#046-alpha1-2020-07-13)
- [Bug Fixes](#bug-fixes-10)
Expand All @@ -79,14 +80,14 @@
- [Code Refactoring](#code-refactoring-5)
- [Documentation](#documentation-10)
- [Features](#features-9)
- [Unclassified](#unclassified-4)
- [Unclassified](#unclassified-5)
- [BREAKING CHANGES](#breaking-changes-3)
- [0.3.0-alpha.1 (2020-05-15)](#030-alpha1-2020-05-15)
- [Bug Fixes](#bug-fixes-16)
- [Code Refactoring](#code-refactoring-6)
- [Documentation](#documentation-11)
- [Features](#features-10)
- [Unclassified](#unclassified-5)
- [Unclassified](#unclassified-6)
- [BREAKING CHANGES](#breaking-changes-4)
- [0.2.1-alpha.1 (2020-05-05)](#021-alpha1-2020-05-05)
- [Documentation](#documentation-12)
Expand All @@ -95,7 +96,7 @@
- [Code Refactoring](#code-refactoring-7)
- [Documentation](#documentation-13)
- [Features](#features-11)
- [Unclassified](#unclassified-6)
- [Unclassified](#unclassified-7)
- [BREAKING CHANGES](#breaking-changes-5)
- [0.1.1-alpha.1 (2020-02-18)](#011-alpha1-2020-02-18)
- [Bug Fixes](#bug-fixes-18)
Expand All @@ -116,48 +117,49 @@
- [Bug Fixes](#bug-fixes-20)
- [Documentation](#documentation-18)
- [Features](#features-14)
- [Unclassified](#unclassified-7)
- [Unclassified](#unclassified-8)
- [0.1.0-alpha.1 (2020-01-31)](#010-alpha1-2020-01-31)
- [Documentation](#documentation-19)
- [0.0.3-alpha.15 (2020-01-31)](#003-alpha15-2020-01-31)
- [Unclassified](#unclassified-8)
- [0.0.3-alpha.14 (2020-01-31)](#003-alpha14-2020-01-31)
- [Unclassified](#unclassified-9)
- [0.0.3-alpha.13 (2020-01-31)](#003-alpha13-2020-01-31)
- [0.0.3-alpha.14 (2020-01-31)](#003-alpha14-2020-01-31)
- [Unclassified](#unclassified-10)
- [0.0.3-alpha.11 (2020-01-31)](#003-alpha11-2020-01-31)
- [0.0.3-alpha.13 (2020-01-31)](#003-alpha13-2020-01-31)
- [Unclassified](#unclassified-11)
- [0.0.3-alpha.10 (2020-01-31)](#003-alpha10-2020-01-31)
- [0.0.3-alpha.11 (2020-01-31)](#003-alpha11-2020-01-31)
- [Unclassified](#unclassified-12)
- [0.0.3-alpha.7 (2020-01-30)](#003-alpha7-2020-01-30)
- [0.0.3-alpha.10 (2020-01-31)](#003-alpha10-2020-01-31)
- [Unclassified](#unclassified-13)
- [0.0.3-alpha.5 (2020-01-30)](#003-alpha5-2020-01-30)
- [0.0.3-alpha.7 (2020-01-30)](#003-alpha7-2020-01-30)
- [Unclassified](#unclassified-14)
- [0.0.3-alpha.4 (2020-01-30)](#003-alpha4-2020-01-30)
- [0.0.3-alpha.5 (2020-01-30)](#003-alpha5-2020-01-30)
- [Unclassified](#unclassified-15)
- [0.0.3-alpha.2 (2020-01-30)](#003-alpha2-2020-01-30)
- [0.0.3-alpha.4 (2020-01-30)](#003-alpha4-2020-01-30)
- [Unclassified](#unclassified-16)
- [0.0.3-alpha.1 (2020-01-30)](#003-alpha1-2020-01-30)
- [0.0.3-alpha.2 (2020-01-30)](#003-alpha2-2020-01-30)
- [Unclassified](#unclassified-17)
- [0.0.3-alpha.1 (2020-01-30)](#003-alpha1-2020-01-30)
- [Unclassified](#unclassified-18)
- [0.0.1-alpha.9 (2020-01-29)](#001-alpha9-2020-01-29)
- [0.0.2-alpha.1 (2020-01-29)](#002-alpha1-2020-01-29)
- [Unclassified](#unclassified-18)
- [Unclassified](#unclassified-19)
- [0.0.1-alpha.6 (2020-01-29)](#001-alpha6-2020-01-29)
- [0.0.1-alpha.5 (2020-01-29)](#001-alpha5-2020-01-29)
- [Unclassified](#unclassified-19)
- [Unclassified](#unclassified-20)
- [0.0.1-alpha.3 (2020-01-28)](#001-alpha3-2020-01-28)
- [0.0.1-alpha.2 (2020-01-28)](#001-alpha2-2020-01-28)
- [0.0.1-alpha.1 (2020-01-28)](#001-alpha1-2020-01-28)
- [Documentation](#documentation-20)
- [Unclassified](#unclassified-20)
- [Unclassified](#unclassified-21)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

# [Unreleased](https://github.com/ory/kratos/compare/v0.6.3-alpha.1...944d045aa7fc59eadfdd18951f0d4937b1ea79df) (2021-06-02)
# [Unreleased](https://github.com/ory/kratos/compare/v0.6.3-alpha.1...2ffad9ee751471451e2151719a2e70d5f89437b0) (2021-06-15)


### Bug Fixes

* Check filesystem before fallback to bundled templates ([#1401](https://github.com/ory/kratos/issues/1401)) ([22d999e](https://github.com/ory/kratos/commit/22d999e78eb4f67d2f3ba07e62fd28ffb3331d6d))
* Mark ui node message as optional ([#1365](https://github.com/ory/kratos/issues/1365)) ([7b8d59f](https://github.com/ory/kratos/commit/7b8d59f48ed14a6d0672238645d8675d4bf7fd77)), closes [#1361](https://github.com/ory/kratos/issues/1361) [#1362](https://github.com/ory/kratos/issues/1362)
* Prometheus metrics fix ([#1299](https://github.com/ory/kratos/issues/1299)) ([ac5d00d](https://github.com/ory/kratos/commit/ac5d00d472a87ab51e7c6834e2cb59f107fc3b3b))
* Recovery email case sensitive ([#1357](https://github.com/ory/kratos/issues/1357)) ([bce14c4](https://github.com/ory/kratos/commit/bce14c487450bd668859f362b98704644fa4c72a)), closes [#1329](https://github.com/ory/kratos/issues/1329)
Expand All @@ -167,6 +169,7 @@

### Code Refactoring

* Corp package ([#1402](https://github.com/ory/kratos/issues/1402)) ([0202dc5](https://github.com/ory/kratos/commit/0202dc57aacc0d48e4c1ee4e68c91654451f63fa))
* Introduce DefaultContextualizer in corp package ([#1390](https://github.com/ory/kratos/issues/1390)) ([944d045](https://github.com/ory/kratos/commit/944d045aa7fc59eadfdd18951f0d4937b1ea79df)), closes [#1363](https://github.com/ory/kratos/issues/1363)


Expand All @@ -181,16 +184,26 @@

### Features

* **identities:** Add a state to identities ([#1312](https://github.com/ory/kratos/issues/1312)) ([d22954e](https://github.com/ory/kratos/commit/d22954e2fdb7b2dd5206651b6dd5cf96185a33ba)), closes [#598](https://github.com/ory/kratos/issues/598)
* Add vk and yandex providers to oidc providers and documentation ([#1339](https://github.com/ory/kratos/issues/1339)) ([22a3ef9](https://github.com/ory/kratos/commit/22a3ef98181eb5922cc0f1c016d42ce46732d0a2)), closes [#1234](https://github.com/ory/kratos/issues/1234)
* Include Credentials Metadata in admin api ([#1274](https://github.com/ory/kratos/issues/1274)) ([c8b6219](https://github.com/ory/kratos/commit/c8b62190fca53db4e1b3a4ddb5253fbd2fd46002)), closes [#820](https://github.com/ory/kratos/issues/820)
* Include Credentials Metadata in admin api Missing changes in handler ([#1366](https://github.com/ory/kratos/issues/1366)) ([a71c220](https://github.com/ory/kratos/commit/a71c2208dedac45d32dab578e62a5e3105c8dee0))
* Team id in slack oidc ([#1409](https://github.com/ory/kratos/issues/1409)) ([e4d021a](https://github.com/ory/kratos/commit/e4d021a037a6b44f8bd66372e9c260c640e87b9d)), closes [#1408](https://github.com/ory/kratos/issues/1408)
* **identities:** Add a state to identities ([#1312](https://github.com/ory/kratos/issues/1312)) ([d22954e](https://github.com/ory/kratos/commit/d22954e2fdb7b2dd5206651b6dd5cf96185a33ba)), closes [#598](https://github.com/ory/kratos/issues/598)


### Tests

* **e2e:** Greatly improve test performance ([#1421](https://github.com/ory/kratos/issues/1421)) ([2ffad9e](https://github.com/ory/kratos/commit/2ffad9ee751471451e2151719a2e70d5f89437b0)):

> Instead of running the individual profiles as separate Cypress instances, we now use one singular instance which updates the Ory Kratos configuration depending on the test context. This ensures that hot-reloading is properly working while also signficantly reducing the amount of time spent on booting up the service dependencies.
* Add tests for cookie behavior of API and browser endpoints ([d1b1521](https://github.com/ory/kratos/commit/d1b15217867cfb92a615c793b26fad288f5e5742))


### Unclassified

* Format ([169c0cd](https://github.com/ory/kratos/commit/169c0cd8d424babef69a52ddf65e2b75ded09a46))



## [0.6.3-alpha.1](https://github.com/ory/kratos/compare/v0.6.2-alpha.1...v0.6.3-alpha.1) (2021-05-17)

Expand Down
35 changes: 13 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,9 @@ $(call make-lint-dependency)
docs/cli: .bin/clidoc
clidoc .

.bin/traefik:
https://github.com/containous/traefik/releases/download/v2.3.0-rc4/traefik_v2.3.0-rc4_linux_amd64.tar.gz \
tar -zxvf traefik_${traefik_version}_linux_${arch}.tar.gz

.bin/cli: go.mod go.sum Makefile
go build -o .bin/cli -tags sqlite github.com/ory/cli
.bin/ory: Makefile
bash <(curl https://raw.githubusercontent.com/ory/cli/master/install.sh) -b .bin v0.0.53
touch -a -m .bin/ory

node_modules: package.json Makefile
npm ci
Expand All @@ -57,11 +54,6 @@ docs: docs/node_modules
lint: .bin/golangci-lint
golangci-lint run -v ./...

.PHONY: cover
cover:
go test ./... -coverprofile=cover.out
go tool cover -func=cover.out

.PHONY: mocks
mocks: .bin/mockgen
mockgen -mock_names Manager=MockLoginExecutorDependencies -package internal -destination internal/hook_login_executor_dependencies.go github.com/ory/kratos/selfservice loginExecutorDependencies
Expand All @@ -80,17 +72,16 @@ test:

.PHONY: test-coverage
test-coverage: .bin/go-acc .bin/goveralls
go-acc -o coverage.txt ./... -- -v -failfast -timeout=20m -tags sqlite
test -z "$CIRCLE_PR_NUMBER" && goveralls -service=circle-ci -coverprofile=coverage.txt -repotoken=$COVERALLS_REPO_TOKEN || echo "forks are not allowed to push to coveralls"
go-acc -o coverage.out ./... -- -v -failfast -timeout=20m -tags sqlite

# Generates the SDK
.PHONY: sdk
sdk: .bin/swagger .bin/cli node_modules
sdk: .bin/swagger .bin/ory node_modules
swagger generate spec -m -o spec/swagger.json -x github.com/ory/kratos-client-go
cli dev swagger sanitize ./spec/swagger.json
ory dev swagger sanitize ./spec/swagger.json
swagger validate ./spec/swagger.json
CIRCLE_PROJECT_USERNAME=ory CIRCLE_PROJECT_REPONAME=kratos \
cli dev openapi migrate \
ory dev openapi migrate \
-p https://raw.githubusercontent.com/ory/x/master/healthx/openapi/patch.yaml \
-p file://.schema/openapi/patches/meta.yaml \
-p file://.schema/openapi/patches/schema.yaml \
Expand Down Expand Up @@ -148,16 +139,16 @@ test-e2e: node_modules test-resetdb
test/e2e/run.sh mysql

.PHONY: migrations-sync
migrations-sync: .bin/cli
cli dev pop migration sync persistence/sql/migrations/templates persistence/sql/migratest/testdata
migrations-sync: .bin/ory
ory dev pop migration sync persistence/sql/migrations/templates persistence/sql/migratest/testdata

.PHONY: migrations-render
migrations-render: .bin/cli
cli dev pop migration render persistence/sql/migrations/templates persistence/sql/migrations/sql
migrations-render: .bin/ory
ory dev pop migration render persistence/sql/migrations/templates persistence/sql/migrations/sql

.PHONY: migrations-render-replace
migrations-render-replace: .bin/cli
cli dev pop migration render -r persistence/sql/migrations/templates persistence/sql/migrations/sql
migrations-render-replace: .bin/ory
ory dev pop migration render -r persistence/sql/migrations/templates persistence/sql/migrations/sql

.PHONY: migratest-refresh
migratest-refresh:
Expand Down
7 changes: 5 additions & 2 deletions cmd/cliclient/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func (h *MigrateHandler) MigrateSQL(cmd *cobra.Command, args []string) {
var d driver.Registry

if flagx.MustGetBool(cmd, "read-from-env") {
d = driver.New(
d = driver.NewWithoutInit(
cmd.Context(),
configx.WithFlags(cmd.Flags()),
configx.SkipValidation())
Expand All @@ -44,13 +44,16 @@ func (h *MigrateHandler) MigrateSQL(cmd *cobra.Command, args []string) {
os.Exit(1)
return
}
d = driver.New(
d = driver.NewWithoutInit(
cmd.Context(),
configx.WithFlags(cmd.Flags()),
configx.SkipValidation(),
configx.WithValue(config.ViperKeyDSN, args[0]))
}

err := d.Init(cmd.Context(), driver.SkipNetworkInit)
cmdx.Must(err, "An error occurred planning migrations: %s", err)

var plan bytes.Buffer
statuses, err := d.Persister().MigrationStatus(cmd.Context())
cmdx.Must(err, "An error occurred planning migrations: %s", err)
Expand Down
Loading

0 comments on commit 0f241ef

Please sign in to comment.