Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
45d4224
refactor: helper for changes on a model
caspiano Jul 21, 2021
54de227
feat(controller:repositories): use build client to fetch driver commits
caspiano Aug 9, 2021
35f149a
refactor(controller:repositories): use build for driver metadata
caspiano Aug 9, 2021
bef269b
build(shard.yml): reference build branch
caspiano Aug 10, 2021
8c67512
test(api:repositories): test for commit listing
caspiano Aug 11, 2021
678a287
refactor(api:repositories): use build for driver discovery
caspiano Aug 11, 2021
aa458f7
refactor(api:drivers): use build for driver compilation status
caspiano Aug 11, 2021
e6aad27
chore(models): update to new scopes
caspiano Aug 17, 2021
fa64b05
fix(api:repositories): commit listing
caspiano Aug 17, 2021
2364ace
ci: add dep on build
caspiano Aug 20, 2021
7bcb941
Merge branch 'master' into refactor/build-commits
caspiano Mar 7, 2022
f1c3fdf
Merge branch 'master' into refactor/build-commits
caspiano Jun 2, 2022
7fefd87
refactor: use updated core client
caspiano Jun 2, 2022
ddd103d
chore: remove todo in docker-compose
caspiano Jun 2, 2022
740ed4c
ci: specify build branch of core
caspiano Jun 2, 2022
56ec996
ci: add GHCR_PAT to workflow
caspiano Jun 2, 2022
12137c0
ci: wtf gha
caspiano Jun 2, 2022
2648ac8
ci: use secrets input
caspiano Jun 2, 2022
015480a
fix: update action-controller handler args
caspiano Jun 2, 2022
43f5888
refactor: action-controller 5 (really not passing atm)
caspiano Jun 8, 2022
86171fd
fix: add `Host` header in specs
caspiano Jun 9, 2022
8b59b14
ci: try skip
caspiano Jun 9, 2022
d5d322e
Revert "ci: try skip"
caspiano Jun 9, 2022
0af3b27
refactor(spec): remove top-level assignments
caspiano Jun 13, 2022
c226f34
Merge branch 'master' into refactor/build-commits
caspiano Jun 24, 2022
45e53c4
test: fiddling with spec execution order to fix auth errors
caspiano Jun 27, 2022
25350ac
test: chipping away
caspiano Jun 27, 2022
47ca045
wip
caspiano Jun 29, 2022
ff24d94
Merge branch 'master' into refactor/build-commits
caspiano Jul 6, 2022
12698c0
fix: majority of specs fixed
caspiano Jul 14, 2022
30fa51b
fix: compiled test
caspiano Jul 15, 2022
5e18bae
test: enable commit listing specs
caspiano Jul 15, 2022
31dd4b0
feat: use build for commit listing
caspiano Jul 20, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
with:
todo_issues: true
first_commit: 0a1e7680dc203f278f18fbe1f81bfd2713b83d1c
secrets:
CR_PAT: ${{ secrets.GHCR_PAT }}

crystal-style:
uses: PlaceOS/.github/.github/workflows/crystal-style.yml@main
Expand Down
34 changes: 16 additions & 18 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ version: "3.7"
# YAML Anchors

x-deployment-env: &deployment-env
LOG_LEVEL: trace
ENV: ${ENV:-development}
SG_ENV: ${SG_ENV:-development}
TZ: $TZ

x-build-client-env: &build-client-env
PLACEOS_BUILD_HOST: ${PLACEOS_BUILD_HOST:-build}
PLACEOS_BUILD_PORT: ${PLACEOS_BUILD_PORT:-3000}

x-elastic-client-env: &elastic-client-env
ELASTIC_HOST: ${ELASTIC_HOST:-elastic}
ELASTIC_PORT: ${ELASTIC_PORT:-9200}
Expand All @@ -15,7 +20,6 @@ x-etcd-client-env: &etcd-client-env
ETCD_HOST: ${ETCD_HOST:-etcd}
ETCD_PORT: ${ETCD_PORT:-2379}


x-redis-client-env: &redis-client-env
REDIS_URL: ${REDIS_URL:-redis://redis:6379}

Expand All @@ -29,7 +33,7 @@ x-search-ingest-client-env: &search-ingest-client-env

services:
test: # Rest API
image: placeos/service-spec-runner:${CRYSTAL_VERSION:-1.4.1}
image: placeos/service-spec-runner:${CRYSTAL_VERSION:-1.5.0}
volumes:
- ${PWD}/spec:/app/spec
- ${PWD}/src:/app/src
Expand All @@ -39,7 +43,7 @@ services:
- ${PWD}/shard.yml:/app/shard.yml
- ${PWD}/coverage:/app/coverage
depends_on:
- auth
- build
- core
- elastic
- etcd
Expand All @@ -53,11 +57,19 @@ services:
GITHUB_ACTION: ${GITHUB_ACTION:-}
<<: *deployment-env
# Service Hosts
<<: *build-client-env
<<: *elastic-client-env
<<: *etcd-client-env
<<: *redis-client-env
<<: *rethinkdb-client-env

build:
image: placeos/build:${PLACE_BUILD_TAG:-nightly}
restart: always
hostname: build
environment:
<<: *deployment-env

elastic:
image: blacktop/elasticsearch:${ELASTIC_VERSION:-7.9.1}
restart: always
Expand Down Expand Up @@ -105,22 +117,8 @@ services:
# Environment
<<: *deployment-env

auth: # Authentication Service
image: placeos/auth:nightly
restart: always
hostname: auth
depends_on:
- redis
- rethink
environment:
<<: *rethinkdb-client-env
<<: *redis-client-env
COAUTH_NO_SSL: "true"
TZ: $TZ
PLACE_URI: https://${PLACE_DOMAIN:-localhost:8443}

core: # Module coordinator
image: placeos/core:${PLACE_CORE_TAG:-nightly}
image: ghcr.io/placeos/core:feat-build
restart: always
hostname: core
depends_on:
Expand Down
58 changes: 45 additions & 13 deletions shard.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ shards:
git: https://github.com/place-labs/crystalemail.git
version: 0.2.6

action-controller:
action-controller: # Overridden
git: https://github.com/spider-gazelle/action-controller.git
version: 4.10.1
version: 5.1.6

active-model:
git: https://github.com/spider-gazelle/active-model.git
Expand All @@ -21,6 +21,14 @@ shards:
git: https://github.com/sija/any_hash.cr.git
version: 0.2.5

awscr-s3:
git: https://github.com/taylorfinnell/awscr-s3.git
version: 0.8.3

awscr-signer:
git: https://github.com/taylorfinnell/awscr-signer.git
version: 0.8.2

backtracer:
git: https://github.com/sija/backtracer.cr.git
version: 1.2.1
Expand All @@ -29,6 +37,10 @@ shards:
git: https://github.com/spider-gazelle/bindata.git
version: 1.10.0

clip:
git: https://github.com/erdnaxeli/clip.git
version: 0.2.4

clustering:
git: https://github.com/place-labs/clustering.git
version: 3.1.1
Expand Down Expand Up @@ -109,6 +121,10 @@ shards:
git: https://github.com/crystal-community/hardware.git
version: 0.5.2

hot_topic:
git: https://github.com/jgaskins/hot_topic.git
version: 0.1.0+git.commit.c4577d949221d535f29162343bf503b578308954

hound-dog:
git: https://github.com/place-labs/hound-dog.git
version: 2.9.0
Expand Down Expand Up @@ -137,6 +153,14 @@ shards:
git: https://github.com/luckyframework/lucky_router.git
version: 0.5.1

lz4:
git: https://github.com/naqvis/lz4.cr.git
version: 0.1.4

molinillo:
git: https://github.com/crystal-lang/crystal-molinillo.git
version: 0.2.0

murmur3:
git: https://github.com/aca-labs/murmur3.git
version: 0.1.1+git.commit.7cbe25c0ca8d052c9d98c377c824dcb0e038c790
Expand All @@ -159,19 +183,19 @@ shards:

openssl_ext:
git: https://github.com/spider-gazelle/openssl_ext.git
version: 2.1.5
version: 2.2.0

opentelemetry-api:
git: https://github.com/wyhaines/opentelemetry-api.cr.git
version: 0.5.0

opentelemetry-instrumentation:
git: https://github.com/wyhaines/opentelemetry-instrumentation.cr.git
version: 0.3.6+git.commit.2b4477f57da6b593469deadc3a439e5ed83dd23f
version: 0.5.0+git.commit.7d83b9a53c9540fbc159f06eeed5d4bdad5c4377

opentelemetry-sdk:
opentelemetry-sdk: # Overridden
git: https://github.com/wyhaines/opentelemetry-sdk.cr.git
version: 0.5.0+git.commit.5629aa05bfc0837abe6efd8f19ad28b560d9b6b7
version: 0.5.1+git.commit.857f4dc24e3c4f2ed04b81118b39beccdecdb105

pars: # Overridden
git: https://github.com/spider-gazelle/pars.git
Expand All @@ -185,33 +209,37 @@ shards:
git: https://github.com/spider-gazelle/pinger.git
version: 1.1.2

placeos-build:
git: https://github.com/placeos/build.git
version: 1.0.6+git.commit.f8d65b6ed947b1c28378214a9df54261bff2bd76

placeos-compiler:
git: https://github.com/placeos/compiler.git
version: 4.9.2

placeos-core:
git: https://github.com/placeos/core.git
version: 4.3.1+git.commit.bd4e5ff5194118b66e1f25d12b192530c9766e5f
version: 4.3.1+git.commit.29ed1ca9807ab75a597cbe42ad898163b2ee7005

placeos-core-client:
placeos-core-client: # Overridden
git: https://github.com/placeos/core-client.git
version: 0.5.2
version: 1.0.0

placeos-driver:
git: https://github.com/placeos/driver.git
version: 6.3.11
version: 6.4.4

placeos-frontend-loader:
git: https://github.com/placeos/frontend-loader.git
version: 2.5.0

placeos-log-backend:
git: https://github.com/place-labs/log-backend.git
version: 0.11.1
version: 0.11.2

placeos-models:
git: https://github.com/placeos/models.git
version: 8.11.0
version: 8.11.2

placeos-resource:
git: https://github.com/place-labs/resource.git
Expand Down Expand Up @@ -267,12 +295,16 @@ shards:

search-ingest:
git: https://github.com/placeos/search-ingest.git
version: 2.3.3
version: 2.3.4

secrets-env: # Overridden
git: https://github.com/spider-gazelle/secrets-env.git
version: 1.3.1

shards:
git: https://github.com/crystal-lang/shards.git
version: 0.17.0

simple_retry:
git: https://github.com/spider-gazelle/simple_retry.git
version: 1.1.1
Expand Down
13 changes: 13 additions & 0 deletions shard.override.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
dependencies:
pars:
github: spider-gazelle/pars

secrets-env:
github: spider-gazelle/secrets-env

placeos-core-client:
github: placeos/core-client
version: ~> 1.0

action-controller:
github: spider-gazelle/action-controller
version: ~> 5.1

opentelemetry-sdk:
github: wyhaines/opentelemetry-sdk.cr
branch: main
9 changes: 7 additions & 2 deletions shard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies:
# Server framework
action-controller:
github: spider-gazelle/action-controller
version: ~> 4.1
version: ~> 5.1

# Data validation library
active-model:
Expand Down Expand Up @@ -41,10 +41,15 @@ dependencies:
github: spider-gazelle/pinger
version: ~> 1

# For build client
placeos-build:
github: placeos/build
branch: main

# For core client
placeos-core-client:
github: placeos/core-client
version: ~> 0.3
version: ~> 1.0

# For driver state helpers
placeos-driver:
Expand Down
25 changes: 11 additions & 14 deletions spec/controllers/api_key_spec.cr
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
require "../helper"
require "../scope_helper"

module PlaceOS::Api
describe ApiKeys do
_, scoped_authorization_header = x_api_authentication
base = ApiKeys::NAMESPACE[0]
_, scoped_headers = Spec::Authentication.x_api_authentication
before_all { _, scoped_headers = Spec::Authentication.x_api_authentication }

with_server do
Specs.test_404(base, model_name: Model::ApiKey.table_name, headers: scoped_authorization_header)
Spec.test_404(ApiKeys.base_route, model_name: Model::ApiKey.table_name, headers: Spec::Authentication.headers)

describe "index", tags: "search" do
Specs.test_base_index(Model::ApiKey, ApiKeys)
end
describe "index", tags: "search" do
Spec.test_base_index(Model::ApiKey, ApiKeys)
end

describe "CRUD operations", tags: "crud" do
Specs.test_crd(Model::ApiKey, ApiKeys)
end
describe "CRUD operations", tags: "crud" do
Spec.test_crd(Model::ApiKey, ApiKeys)
end

describe "scopes" do
Specs.test_controller_scope(ApiKeys)
end
describe "scopes" do
Spec.test_controller_scope(ApiKeys)
end
end
end
Loading