Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smaller Codebase #1501

Merged
merged 32 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
c021b30
start on moving crates into a central crate (`charted`; ./src folder)
auguwu Jan 18, 2024
5febc74
port more stuff to root `charted` crate
auguwu Jan 18, 2024
e0ae42d
add db controller code, update Helm plugin code (not finished!)
auguwu Jan 20, 2024
7ee4ea1
use sccache with NixOS, add code for charted's Helm plugin
auguwu Jan 21, 2024
5f7903c
move prettier file to root dir, update `./dev cli` to work what peopl…
auguwu Jan 22, 2024
9012aae
add all Main routes back, misc. stuff
auguwu Jan 23, 2024
a37a47e
web stuff, add /metrics route
auguwu Jan 25, 2024
6be1fb2
complete Users API
auguwu Jan 26, 2024
cfeb57b
[ci] run doctests, generate DTS of OpenAPI, fix build.rs script
auguwu Jan 26, 2024
6809de5
[ci] run doctests, generate DTS of OpenAPI, fix build.rs script
auguwu Jan 26, 2024
1a4616f
fix all merge conflicts
auguwu Jan 26, 2024
36ecff5
fix all doctests
auguwu Jan 26, 2024
e6e3147
fix `build.rs` script
auguwu Jan 26, 2024
a420b84
delet
auguwu Jan 26, 2024
20f4145
fix `build.rs` warnings, add Bearer token support
auguwu Jan 26, 2024
0d1c2d2
[ci] add `repo-token` argument to `Noelware/setup-protoc` action
auguwu Jan 26, 2024
5858749
Do it again!
auguwu Jan 26, 2024
7bccf4d
complete Users Avatars API
auguwu Jan 27, 2024
2aaf970
Added `Multipart` extractor and update dependencies
auguwu Jan 27, 2024
36365a8
add ldap authz backend (not tested), helm chart utility
auguwu Jan 27, 2024
25949b2
disable `src/charts` tests on Windows
auguwu Jan 27, 2024
bf649bc
add User Sessions API, update Bitfield/ApiKeyScope to use `IntoIterat…
auguwu Jan 28, 2024
e8da5e4
add User Repositories API
auguwu Jan 28, 2024
e777bee
update readme
auguwu Jan 28, 2024
ba070a2
fix misuse of `#[serde(untagged)]`
auguwu Jan 28, 2024
015bce3
[web] experiment
auguwu Jan 30, 2024
c6b3417
merge main ~> feat/smaller-codebase
auguwu Jan 30, 2024
eda0963
fix default redis uri, stackoverflow for CacheWorker<Target> ~> Box<d…
auguwu Jan 30, 2024
3eb5a9e
Remove `server/` directory, enable macOS M1 runner, only build `chart…
auguwu Feb 1, 2024
3bd5071
[ci] switch back
auguwu Feb 1, 2024
a10db87
merge `main` ~> `feat/smaller-codebase`
auguwu Feb 1, 2024
f6fa352
Merge branch 'main' into feat/smaller-codebase
spotlightishere Feb 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
39 changes: 27 additions & 12 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ on:
- LICENSE
jobs:
ci:
name: Rust CI (${{matrix.runner == 'ubuntu-latest' && 'Linux (x86_64)' || matrix.runner == 'self-hosted' && 'Linux (arm64)' || matrix.runner == 'macos-latest' && 'macOS (x86_64)' || matrix.runner == 'windows-latest' && 'Windows' || 'Unknown'}}, Rust ${{matrix.rust-version}})
name: Rust CI (${{matrix.runner == 'ubuntu-latest' && 'Linux (x86_64)' || matrix.runner == 'self-hosted' && 'Linux (arm64)' || matrix.runner == 'macos-latest' && 'macOS (x86_64)' || matrix.runner == 'macos-14-arm64' && 'macOS (M1)' || matrix.runner == 'windows-latest' && 'Windows' || 'Unknown'}}, Rust ${{matrix.rust-version}})
runs-on: ${{matrix.runner}}
strategy:
fail-fast: true
Expand All @@ -61,23 +61,36 @@ jobs:
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust-version}}
components: clippy, rustfmt
toolchain: ${{matrix.rust-version}}
components: clippy, rustfmt

- name: Setup Rust cache
uses: Swatinem/rust-cache@v2

- name: Install `protoc`
uses: Noelware/setup-protoc@1.2.0

- name: Setup `VCPKG_ROOT` environment variable
if: matrix.runner == 'windows-latest'
run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
id: vcpkg
run: |
echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_OUTPUT -Append

- name: Setup vcpkg cache
if: matrix.runner == 'windows-latest'
uses: actions/cache@v4
with:
key: vcpkg-cache
path: |
${{steps.vcpkg.outputs.VCPKG_ROOT}}

- name: Install OpenSSL on Windows with `vcpkg`
if: matrix.runner == 'windows-latest'
run: vcpkg install openssl:x64-windows-static-md

- name: Install `protoc`
uses: Noelware/setup-protoc@1.2.0
with:
repo-token: ${{github.token}}

- name: Build project
run: cargo build --all-features

Expand All @@ -88,31 +101,33 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
rust-version: [stable, nightly]
rust-version: [stable, nightly]
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust-version}}
components: clippy, rustfmt
toolchain: ${{matrix.rust-version}}
components: clippy, rustfmt

- name: Setup Rust cache
uses: Swatinem/rust-cache@v2

- name: Install `protoc`
uses: Noelware/setup-protoc@1.2.0
with:
repo-token: ${{github.token}}

- name: Build project
run: cargo build --all-features

- name: Clippy!
uses: auguwu/clippy-action@1.3.0
with:
all-features: true
token: ${{github.token}}
all-features: true
token: ${{github.token}}
ui:
name: Hoshi CI
runs-on: ubuntu-latest
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/OpenAPI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
toolchain: stable

- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
Expand All @@ -53,8 +53,12 @@ jobs:

- name: Generate OpenAPI document
run: |
cargo run --release --locked --bin charted-cli -- openapi ${GITHUB_WORKSPACE}/assets/openapi.json
bunx prettier --write --config ${GITHUB_WORKSPACE}/web/.prettierrc.json ./assets/openapi.json
cargo run --release --locked -- openapi ${GITHUB_WORKSPACE}/assets/openapi.json
bunx prettier --write --config ${GITHUB_WORKSPACE}/web/.prettierrc.json ./assets/openapi.json

- name: Update OpenAPI types
working-directory: ./web
run: bun generate:openapi

- name: Commit changes (if we can)
uses: EndBug/add-and-commit@v9
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/UpdateProtos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:

- name: Update protos
run: |
curl -fsSL -o ./crates/emails/protos/google/protobuf/struct.proto ${{env.GOOGLE_PROTOBUF_STRUCT_PROTO}}
curl -fsSL -o ./crates/emails/protos/emails.proto ${{env.CHARTED_EMAILS_PROTO}}
curl -fsSL -o ./protos/google/protobuf/struct.proto ${{env.GOOGLE_PROTOBUF_STRUCT_PROTO}}
curl -fsSL -o ./protos/emails.proto ${{env.CHARTED_EMAILS_PROTO}}

- name: Commit!
uses: EndBug/add-and-commit@v9
Expand Down
48 changes: 2 additions & 46 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,48 +1,3 @@
# Created by https://www.toptal.com/developers/gitignore/api/Bazel,Go,Rust,Node,PNPM,JetBrains+All,VisualStudio,VisualStudioCode,Terraform
# Edit at https://www.toptal.com/developers/gitignore?templates=Bazel,Go,Rust,Node,PNPM,JetBrains+All,VisualStudio,VisualStudioCode,Terraform

### Bazel ###
# gitignore template for Bazel build system
# website: https://bazel.build/

# Ignore all bazel-* symlinks. There is no full list since this can change
# based on the name of the directory bazel is cloned into.
/bazel-*

# Directories for the Bazel IntelliJ plugin containing the generated
# IntelliJ project files and plugin configuration. Seperate directories are
# for the IntelliJ, Android Studio and CLion versions of the plugin.
/.ijwb/
/.aswb/
/.clwb/

### Go ###
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
# vendor/

# Go workspace file
go.work

### JetBrains+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
Expand Down Expand Up @@ -734,11 +689,12 @@ FodyWeavers.xsd

!crates/helm-charts/tests/__fixtures__/*.tgz
!server/src/routing/**/repository/releases/
!src/charts/__fixtures__/*.tgz
!distribution/bin/
!scripts/publish/
.user.bazelrc
!Cargo.lock
config.yml
!src/bin/
.direnv/
.cache/
.data/
Expand Down
49 changes: 0 additions & 49 deletions .noelware/deployment/.terraform.lock.hcl

This file was deleted.

139 changes: 0 additions & 139 deletions .noelware/deployment/main.tf

This file was deleted.

Loading
Loading