Skip to content

Commit

Permalink
Simplify Fern scripts, move SDKs from gen/ to sdks/
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanFlurry committed Jan 2, 2024
1 parent dd9ef43 commit 60e5313
Show file tree
Hide file tree
Showing 4,690 changed files with 295,369 additions and 75,961 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
51 changes: 1 addition & 50 deletions .github/workflows/fern.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,54 +19,5 @@ jobs:
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
run: |
./scripts/fern/generate_local.sh
./scripts/openapi/gen_spec_compat.sh
./scripts/openapi/gen_rust.sh
./scripts/fern/gen.sh
git --no-pager diff --exit-code
# Release internal version to Git to be installed on the hub
fern-release-internal:
needs: fern-check
if: github.event_name == 'push' && !contains(github.ref, 'refs/tags/')
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v3

- name: Install Fern
run: npm install -g fern-api

- name: Release SDKs
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
FERN_NPM_TOKEN: ${{ secrets.FERN_NPM_TOKEN }}
run: |
# Use version 0.0.1 because we use the Git hash instead
git_hash=$(git rev-parse --short "$GITHUB_SHA")
fern generate --group internal --version "0.0.1-${git_hash}" --log-level debug
fern-release:
needs: fern-check
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-20.04
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v3

- name: Install Fern
run: npm install -g fern-api

- name: Release SDKs
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
FERN_NPM_TOKEN: ${{ secrets.FERN_NPM_TOKEN }}
RIVET_MAVEN_USERNAME: ${{ secrets.RIVET_MAVEN_USERNAME }}
RIVET_MAVEN_PASSWORD: ${{ secrets.RIVET_MAVEN_PASSWORD }}
run: |
fern generate --group external --version ${{ github.ref_name }} --log-level debug
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,3 @@ lib/**/Cargo.lock

tests/basic-game/.env

# Local SDKs
sdks/
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **Matchmaker** Lowered internal overhead of log shipping for lobbies
- **Matchmaker** Game mode names are now more lenient to include capital letters & underscores
- **API** Return `API_REQUEST_TIMEOUT` error after 50s (see `docs/infrastructure/API_TIMEOUTS.md` for context)
- **API** Move generated client APIs to sdks/
- Lower long poll timeout from 60s -> 40s

### Security
Expand Down
2 changes: 0 additions & 2 deletions fern/definition/admin/__package__.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
service:
auth: true
base-path: /admin
audiences:
- public
endpoints:
login:
path: /login
Expand Down
2 changes: 0 additions & 2 deletions fern/definition/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ error-discrimination:
environments:
Production: https://api.rivet.gg
default-environment: Production
audiences:
- public
errors:
- commons.InternalError
- commons.RateLimitError
Expand Down
2 changes: 0 additions & 2 deletions fern/definition/cloud/__package__.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
service:
auth: true
base-path: /cloud
audiences:
- public
endpoints:
bootstrap:
path: /bootstrap
Expand Down
2 changes: 0 additions & 2 deletions fern/definition/cloud/auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ imports:
service:
auth: true
base-path: /cloud/auth
audiences:
- public
endpoints:
inspect:
path: /inspect
Expand Down
4 changes: 0 additions & 4 deletions fern/definition/cloud/devices/links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,11 @@ service:
endpoints:
prepare:
path: ""
audiences:
- public
method: "POST"
response: PrepareDeviceLinkResponse

get:
path: ""
audiences:
- public
method: "GET"
request:
name: GetDeviceLinkRequest
Expand Down
2 changes: 0 additions & 2 deletions fern/definition/cloud/games/avatars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ imports:
service:
auth: true
base-path: /cloud/games/{game_id}
audiences:
- public
path-parameters:
game_id:
type: uuid
Expand Down
2 changes: 0 additions & 2 deletions fern/definition/cloud/games/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ imports:
service:
auth: true
base-path: /cloud/games/{game_id}
audiences:
- public
path-parameters:
game_id:
type: uuid
Expand Down
2 changes: 0 additions & 2 deletions fern/definition/cloud/games/cdn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ imports:
service:
auth: true
base-path: /cloud/games/{game_id}/cdn/sites
audiences:
- public
path-parameters:
game_id:
type: uuid
Expand Down
2 changes: 0 additions & 2 deletions fern/definition/cloud/games/games.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ imports:
service:
auth: true
base-path: /cloud/games
audiences:
- public
endpoints:
getGames:
path: ""
Expand Down
2 changes: 0 additions & 2 deletions fern/definition/cloud/games/matchmaker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ imports:
service:
auth: true
base-path: /cloud/games/{game_id}/matchmaker/lobbies
audiences:
- public
path-parameters:
game_id:
type: uuid
Expand Down
2 changes: 0 additions & 2 deletions fern/definition/cloud/games/namespaces/__package__.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ imports:

service:
auth: true
audiences:
- public
base-path: /cloud
endpoints:
createGameNamespace:
Expand Down
2 changes: 0 additions & 2 deletions fern/definition/cloud/games/namespaces/analytics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ imports:

service:
auth: true
audiences:
- public
base-path: /cloud/games/{game_id}/namespaces/{namespace_id}/analytics
path-parameters:
game_id:
Expand Down
2 changes: 0 additions & 2 deletions fern/definition/cloud/games/namespaces/logs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ imports:

service:
auth: true
audiences:
- public
base-path: /cloud/games/{game_id}/namespaces/{namespace_id}
path-parameters:
game_id:
Expand Down
2 changes: 0 additions & 2 deletions fern/definition/cloud/games/tokens.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
service:
auth: true
base-path: /cloud
audiences:
- public
endpoints:
createCloudToken:
path: /games/{game_id}/tokens/cloud
Expand Down
2 changes: 0 additions & 2 deletions fern/definition/cloud/games/versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ imports:
service:
auth: true
base-path: /cloud/games/{game_id}/versions
audiences:
- public
path-parameters:
game_id:
type: uuid
Expand Down
2 changes: 0 additions & 2 deletions fern/definition/cloud/groups.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ imports:
service:
auth: true
base-path: /cloud/groups
audiences:
- public
endpoints:
validate:
path: /validate
Expand Down
2 changes: 0 additions & 2 deletions fern/definition/cloud/logs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ imports:
service:
auth: true
base-path: /cloud/rays
audiences:
- public
endpoints:
getRayPerfLogs:
path: /{ray_id}/perf
Expand Down
2 changes: 0 additions & 2 deletions fern/definition/cloud/tiers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ imports:
service:
auth: true
base-path: /cloud/region-tiers
audiences:
- public
endpoints:
getRegionTiers:
path: ""
Expand Down
2 changes: 0 additions & 2 deletions fern/definition/cloud/uploads.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
service:
auth: true
base-path: /cloud/uploads
audiences:
- public
endpoints:
completeUpload:
path: /{upload_id}/complete
Expand Down
2 changes: 0 additions & 2 deletions fern/definition/group/__package__.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ imports:

service:
auth: true
audiences:
- public
base-path: /group/groups
endpoints:
listSuggested:
Expand Down
2 changes: 0 additions & 2 deletions fern/definition/group/invites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ imports:

service:
auth: true
audiences:
- public
base-path: /group
endpoints:
getInvite:
Expand Down
2 changes: 0 additions & 2 deletions fern/definition/group/joinRequests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

service:
auth: true
audiences:
- public
base-path: /group/groups/{group_id}/join-request
path-parameters:
group_id:
Expand Down
4 changes: 0 additions & 4 deletions fern/definition/identity/__package__.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ imports:

service:
auth: true
audiences:
- public
base-path: /identity/identities
endpoints:
setup:
Expand All @@ -37,8 +35,6 @@ service:
`Setup` every time the client starts.
path: ""
method: POST
audiences:
- public
request:
name: SetupRequest
body:
Expand Down
2 changes: 0 additions & 2 deletions fern/definition/identity/events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ imports:

service:
auth: true
audiences:
- public
base-path: /identity/events
endpoints:
watch:
Expand Down
4 changes: 0 additions & 4 deletions fern/definition/identity/links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ service:
QR code for `identity_link_url` to authenticate on their phone.
path: ""
method: POST
audiences:
- public
response: PrepareGameLinkResponse

get:
Expand All @@ -35,8 +33,6 @@ service:
may have switched accounts.
path: ""
method: GET
audiences:
- public
request:
name: GetGameLinkRequest
query-parameters:
Expand Down
12 changes: 0 additions & 12 deletions fern/definition/kv/__package__.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ service:
get:
path: ""
method: GET
audiences:
- public
docs: Returns a specific key-value entry by key.
request:
name: GetOperationRequest
Expand All @@ -28,17 +26,13 @@ service:
put:
path: ""
method: PUT
audiences:
- public
docs: Puts (sets or overwrites) a key-value entry by key.
request:
body: PutRequest

delete:
path: ""
method: DELETE
audiences:
- public
docs: Deletes a key-value entry by key.
request:
name: DeleteOperationRequest
Expand All @@ -61,8 +55,6 @@ service:
getBatch:
path: /batch
method: GET
audiences:
- public
docs: Gets multiple key-value entries by key(s).
request:
name: GetBatchRequest
Expand All @@ -80,17 +72,13 @@ service:
putBatch:
path: /batch
method: PUT
audiences:
- public
docs: Puts (sets or overwrites) multiple key-value entries by key(s).
request:
body: PutBatchRequest

deleteBatch:
path: /batch
method: DELETE
audiences:
- public
docs: Deletes multiple key-value entries by key(s).
request:
name: DeleteBatchRequest
Expand Down
2 changes: 0 additions & 2 deletions fern/definition/matchmaker/lobbies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ imports:

service:
auth: true
audiences:
- public
base-path: /matchmaker/lobbies
endpoints:
ready:
Expand Down
2 changes: 0 additions & 2 deletions fern/definition/matchmaker/players.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ imports:
service:
auth: true
base-path: /matchmaker/players
audiences:
- public
endpoints:
connected:
path: /connected
Expand Down
Loading

0 comments on commit 60e5313

Please sign in to comment.