Skip to content

Single js backend #37

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

Merged
merged 44 commits into from
Jun 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
ae4074e
nodejs alt
max-ostapenko May 10, 2025
619c267
node22
max-ostapenko May 10, 2025
8ede3a5
max_instance dev override
max-ostapenko May 10, 2025
57d17a4
missing vars
max-ostapenko May 10, 2025
7a8675b
region dev override
max-ostapenko May 10, 2025
f32d711
formatting
max-ostapenko May 10, 2025
6508edd
exports entry point
max-ostapenko May 10, 2025
3167270
no prod port
max-ostapenko May 10, 2025
aa983c3
fix port
max-ostapenko May 10, 2025
df29edb
sync routes
max-ostapenko May 10, 2025
18e560f
test global backend
max-ostapenko May 11, 2025
14344d2
no var
max-ostapenko May 11, 2025
e65c4dc
v1 path
max-ostapenko May 11, 2025
7523248
fix vars
max-ostapenko May 11, 2025
3a8860c
dependabot
max-ostapenko May 11, 2025
136e5ca
scale test
max-ostapenko May 11, 2025
898b041
1 cpu
max-ostapenko May 11, 2025
249b26e
cleanup and tests
max-ostapenko May 11, 2025
79eeeea
cd
max-ostapenko May 11, 2025
eb313cc
remove express js
max-ostapenko May 24, 2025
7dd31b5
update port listener
max-ostapenko May 24, 2025
addc1f4
switch to us-central db
max-ostapenko May 25, 2025
21d577a
dynamic geos and ranks
max-ostapenko May 25, 2025
d036b31
version filter
max-ostapenko May 25, 2025
18ea833
versions endpoint
max-ostapenko May 25, 2025
d195491
min dev instances
max-ostapenko May 31, 2025
7e99850
field selection
max-ostapenko Jun 3, 2025
c6351c4
test with the current db
max-ostapenko Jun 3, 2025
eaab1bc
2 DBs at the same time
max-ostapenko Jun 3, 2025
91a3149
remove caching
max-ostapenko Jun 3, 2025
99d57a8
revert cache and upgrade run instance
max-ostapenko Jun 4, 2025
aaa9900
test fix
max-ostapenko Jun 4, 2025
4fbb6ec
no cache
max-ostapenko Jun 4, 2025
0de112a
recreate gateway
max-ostapenko Jun 4, 2025
f2a1ac1
id fix
max-ostapenko Jun 4, 2025
a9bf511
esm version
max-ostapenko Jun 4, 2025
c0bcaa7
cached latest
max-ostapenko Jun 4, 2025
c0e696d
deduped tech requests
max-ostapenko Jun 4, 2025
14328bf
query cache
max-ostapenko Jun 4, 2025
a925eae
internal caching
max-ostapenko Jun 4, 2025
45bcaeb
firestore query select method
max-ostapenko Jun 5, 2025
141959a
cache cleanup
max-ostapenko Jun 5, 2025
c7b8cdb
prod tf
max-ostapenko Jun 5, 2025
43f1fda
extended cache
max-ostapenko Jun 5, 2025
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
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
- package-ecosystem: "npm"
directory: "/src"
schedule:
interval: "weekly"
- package-ecosystem: "terraform"
directory: "/terraform"
schedule:
interval: "weekly"
52 changes: 18 additions & 34 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ name: Tech Report API Pipeline
on: [push]

env:
PIPELINE_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
PIPELINE_SA_KEY: ${{ secrets.GCP_SA_KEY }}
PIPELINE_PROJECT_DATABASE_DEV: ${{ secrets.GCP_PROJECT_DATABASE_DEV }}
PIPELINE_PROJECT_DATABASE_PROD: ${{ secrets.GCP_PROJECT_DATABASE_PROD }}
PIPELINE_GOOGLE_SERVICE_ACCOUNT_CLOUD_FUNCTIONS: ${{ secrets.GCP_SERVICE_ACCOUNT_CLOUD_FUNCTIONS }}
PIPELINE_GOOGLE_SERVICE_ACCOUNT_API_GATEWAY: ${{ secrets.GCP_SERVICE_ACCOUNT_API_GATEWAY }}

Expand All @@ -15,18 +12,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
if [ -f requirements.txt ]; then python -m pip install -r requirements.txt; fi
- name: Test with pytest
run: |
python -m pytest -W "ignore"
- run: |
cd src
npm ci
npm run test

deploy_development:
if: github.ref == 'refs/heads/development'
Expand All @@ -40,30 +29,29 @@ jobs:
- name: Google Cloud Auth
uses: 'google-github-actions/auth@v2'
with:
project_id: ${{ env.PIPELINE_PROJECT_ID }}
project_id: 'httparchive'
credentials_json: ${{ env.PIPELINE_SA_KEY }}

- uses: hashicorp/setup-terraform@v3

- name: Terraform fmt
id: fmt
run: terraform fmt -check
continue-on-error: true

- name: Terraform Init
id: init
run: terraform init

- name: Terraform Validate
id: validate
run: terraform validate -no-color

- name: Terraform Plan
id: plan
run: |
terraform plan -no-color -var="google_service_account_cloud_functions=${{ env.PIPELINE_GOOGLE_SERVICE_ACCOUNT_CLOUD_FUNCTIONS }}" \
-var="google_service_account_api_gateway=${{ env.PIPELINE_GOOGLE_SERVICE_ACCOUNT_API_GATEWAY }}" \
-var="project_database=${{ env.PIPELINE_PROJECT_DATABASE_DEV }}"
-var="google_service_account_api_gateway=${{ env.PIPELINE_GOOGLE_SERVICE_ACCOUNT_API_GATEWAY }}"
continue-on-error: true

- name: Terraform Plan status
Expand All @@ -75,9 +63,8 @@ jobs:
run: |
terraform apply -var="google_service_account_cloud_functions=${{ env.PIPELINE_GOOGLE_SERVICE_ACCOUNT_CLOUD_FUNCTIONS }}" \
-var="google_service_account_api_gateway=${{ env.PIPELINE_GOOGLE_SERVICE_ACCOUNT_API_GATEWAY }}" \
-var="project_database=${{ env.PIPELINE_PROJECT_DATABASE_DEV }}" \
-auto-approve

deploy_production:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
Expand All @@ -90,30 +77,29 @@ jobs:
- name: Google Cloud Auth
uses: 'google-github-actions/auth@v2'
with:
project_id: ${{ env.PIPELINE_PROJECT_ID }}
project_id: 'httparchive'
credentials_json: ${{ env.PIPELINE_SA_KEY }}

- uses: hashicorp/setup-terraform@v3

- name: Terraform fmt
id: fmt
run: terraform fmt -check
continue-on-error: true

- name: Terraform Init
id: init
run: terraform init

- name: Terraform Validate
id: validate
run: terraform validate -no-color

- name: Terraform Plan
id: plan
run: |
terraform plan -no-color -var="google_service_account_cloud_functions=${{ env.PIPELINE_GOOGLE_SERVICE_ACCOUNT_CLOUD_FUNCTIONS }}" \
-var="google_service_account_api_gateway=${{ env.PIPELINE_GOOGLE_SERVICE_ACCOUNT_API_GATEWAY }}" \
-var="project_database=${{ env.PIPELINE_PROJECT_DATABASE_PROD }}"
-var="google_service_account_api_gateway=${{ env.PIPELINE_GOOGLE_SERVICE_ACCOUNT_API_GATEWAY }}"
continue-on-error: true

- name: Terraform Plan status
Expand All @@ -125,7 +111,5 @@ jobs:
run: |
terraform apply -var="google_service_account_cloud_functions=${{ env.PIPELINE_GOOGLE_SERVICE_ACCOUNT_CLOUD_FUNCTIONS }}" \
-var="google_service_account_api_gateway=${{ env.PIPELINE_GOOGLE_SERVICE_ACCOUNT_API_GATEWAY }}" \
-var="project_database=${{ env.PIPELINE_PROJECT_DATABASE_PROD }}" \
-auto-approve



11 changes: 2 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ spec.yaml
# CLI
.DS_Store

# asdf
/.tool-versions

# python
__pycache__
.pytest_cache
.venv

utils.txt
logs
node_modules/
src/coverage/
Loading
Loading