Repository navigation
π :: (#904) crash λμ μλν νλ‘μ° κ΅¬μΆ #922
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
Open
uson1004
wants to merge
5
commits into
develop
Choose a base branch
from
feature/904-crash-λμ-μλν-νλ‘μ°-ꡬμΆ
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
The head ref may contain hidden characters: "feature/904-crash-\uB300\uC751-\uC790\uB3D9\uD654-\uD50C\uB85C\uC6B0-\uAD6C\uCD95"
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
1c4140a
chore :: Firebase Functions λ° μν¬μ€νμ΄μ€ νκ²½ μ€μ μ΄κΈ°ν
uson1004 e813860
ci :: Functions λ° Runner λ°°ν¬λ₯Ό μν GitHub Actions μν¬νλ‘μ° μΆκ°
uson1004 e89c1bf
feat :: μλ μμ μλΉμ€ λ‘μ§ λ° Firebase Functions ꡬν
uson1004 97451de
refactor :: κ°λ
μ± ν₯μμ μν runCatchingCancellable μ½λ ν¬λ§·ν
μμ
uson1004 e335129
μλ μμ± PR μ΄μμ function ν
νλ¦Ώμ μ μ©
uson1004 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,30 @@ | ||
| ## κ°μ | ||
| > | ||
| π‘ μμ μμ½ | ||
| <!-- λ³Έ PRμμ μμ ν λ΄μ©μ κ°λ΅νκ² μ€λͺ ν΄μ£ΌμΈμ. --> | ||
|
|
||
| ## μμ μ¬ν | ||
| - | ||
| π κ΄λ ¨ μ΄μ | ||
| <!-- λ³Έ PRκ³Ό κ΄λ ¨λ μ΄μ λ²νΈλ₯Ό μμ±ν΄μ£ΌμΈμ. (μ: Closes #123) --> | ||
| Closes # | ||
|
|
||
| ## μΆκ° λ‘ ν λ§ | ||
| π οΈ μμ λ΄μ | ||
| <!-- λ³Έ PRμμ λ³κ²½λ μ¬νμ΄λ μλ‘κ² μΆκ°λ κΈ°λ₯μ ꡬ체μ μΌλ‘ μ μ΄μ£ΌμΈμ. --> | ||
| - [ ] | ||
| - [ ] | ||
|
|
||
| πΈ μ€ν¬λ¦°μ· / GIF (μ ν) | ||
| <!-- UI λ³κ²½ μ¬νμ΄ μλ€λ©΄ μ€ν¬λ¦°μ·μ΄λ νλ©΄ λ Ήν(GIF)λ₯Ό 첨λΆν΄μ£ΌμΈμ. --> | ||
| | AS-IS (λ³κ²½ μ ) | TO-BE (λ³κ²½ ν) | | ||
| | :---: | :---: | | ||
| | <!-- μ΄λ―Έμ§ μ²¨λΆ --> | <!-- μ΄λ―Έμ§ μ²¨λΆ --> | | ||
|
|
||
| π§ͺ ν μ€νΈ λ°©λ² | ||
| <!-- 리뷰μ΄κ° μ΄ PRμ λ³κ²½ μ¬νμ μ΄λ»κ² ν μ€νΈν΄ λ³Ό μ μλμ§ μ€λͺ ν΄μ£ΌμΈμ. --> | ||
| - [ ] (μ: νΉμ νλ©΄ μ§μ ν λ²νΌ ν΄λ¦) | ||
|
|
||
| β οΈ λ¦¬λ·°μ΄μκ² ν λ§ (μ ν) | ||
| <!-- 리뷰μ΄κ° μ€μ μ μΌλ‘ λ΄μΌ ν λΆλΆμ΄λ, μΆκ°λ‘ λ¨κΈ°κ³ μΆμ μ½λ©νΈκ° μλ€λ©΄ μμ±ν΄μ£ΌμΈμ. --> | ||
|
|
||
| β 체ν¬λ¦¬μ€νΈ | ||
| - [ ] μ½λλ₯Ό μ€μ€λ‘ 리뷰νκ³ μμ νλμ? | ||
| - [ ] Android Studioμμ λΉλκ° μ μμ μΌλ‘ μλ£λλμ? | ||
| - [ ] μ΄ν΄νκΈ° μ΄λ €μ΄ μ½λμ μ£Όμμ λ¬μλμ? | ||
| - [ ] 컨벀μ μ λ§κ² μ½λλ₯Ό μμ±νλμ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| name: Deploy Functions | ||
|
|
||
| on: | ||
| push: | ||
| branches: [develop] | ||
| paths: | ||
| - 'functions/**' | ||
| - '.github/workflows/DeployFunctions.yml' | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: deploy-functions-${{ github.ref }} | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| deploy: | ||
| name: Deploy Firebase Functions | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' | ||
|
|
||
| - name: Install dependencies | ||
| run: npm install | ||
| working-directory: functions | ||
|
|
||
| - name: Build | ||
| run: npm run build | ||
| working-directory: functions | ||
|
|
||
| - name: Deploy Firebase Functions | ||
| run: | | ||
| npm install -g firebase-tools | ||
| firebase deploy --only functions --project team-dms | ||
| working-directory: functions | ||
| env: | ||
| FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| name: Deploy Runner | ||
|
|
||
| on: | ||
| push: | ||
| branches: [develop] | ||
| paths: | ||
| - 'services/auto-fix-runner/**' | ||
| - '.github/workflows/DeployRunner.yml' | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: deploy-runner-${{ github.ref }} | ||
| cancel-in-progress: false | ||
|
|
||
| env: | ||
| PROJECT_ID: team-dms | ||
| REGION: us-central1 | ||
| SERVICE_NAME: auto-fix-runner | ||
| IMAGE: us-central1-docker.pkg.dev/team-dms/auto-fix-runner/runner | ||
|
|
||
| jobs: | ||
| deploy: | ||
| name: Build & Deploy to Cloud Run | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Authenticate to Google Cloud | ||
| uses: google-github-actions/auth@v2 | ||
| with: | ||
| workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }} | ||
| service_account: ${{ secrets.GCP_RUNNER_SERVICE_ACCOUNT }} | ||
|
|
||
| - name: Set up Cloud SDK | ||
| uses: google-github-actions/setup-gcloud@v2 | ||
|
|
||
| - name: Configure Docker for Artifact Registry | ||
| run: gcloud auth configure-docker us-central1-docker.pkg.dev --quiet | ||
|
|
||
| - name: Build Docker image | ||
| run: | | ||
| docker build \ | ||
| -t ${{ env.IMAGE }}:${{ github.sha }} \ | ||
| -t ${{ env.IMAGE }}:latest \ | ||
| services/auto-fix-runner/ | ||
|
|
||
| - name: Push Docker image | ||
| run: | | ||
| docker push ${{ env.IMAGE }}:${{ github.sha }} | ||
| docker push ${{ env.IMAGE }}:latest | ||
|
|
||
| - name: Deploy to Cloud Run | ||
| run: | | ||
| gcloud run deploy ${{ env.SERVICE_NAME }} \ | ||
| --image "${{ env.IMAGE }}:${{ github.sha }}" \ | ||
| --region ${{ env.REGION }} \ | ||
| --platform managed \ | ||
| --allow-unauthenticated \ | ||
| --set-secrets \ | ||
| "RUNNER_SHARED_TOKEN=RUNNER_SHARED_TOKEN:latest,GITHUB_APP_ID=GITHUB_APP_ID:latest,GITHUB_INSTALLATION_ID=GITHUB_INSTALLATION_ID:latest,GITHUB_APP_PRIVATE_KEY=GITHUB_APP_PRIVATE_KEY:latest" \ | ||
| --quiet | ||
|
|
||
| - name: Print service URL | ||
| run: | | ||
| gcloud run services describe ${{ env.SERVICE_NAME }} \ | ||
| --region ${{ env.REGION }} \ | ||
| --format "value(status.url)" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -196,3 +196,7 @@ app/release/ | |
|
|
||
| .claude/ | ||
| .gemini/ | ||
| .omx/ | ||
|
|
||
| functions/.env | ||
| functions/.env.* | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { | ||
| "functions": [ | ||
| { | ||
| "source": "functions", | ||
| "codebase": "default", | ||
| "disallowLegacyRuntimeConfig": true, | ||
| "ignore": [ | ||
| "node_modules", | ||
| ".git", | ||
| "firebase-debug.log", | ||
| "firebase-debug.*.log", | ||
| "*.local" | ||
| ], | ||
| "predeploy": [ | ||
| "npm --prefix \"$RESOURCE_DIR\" run lint", | ||
| "npm --prefix \"$RESOURCE_DIR\" run build" | ||
| ] | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| module.exports = { | ||
| root: true, | ||
| env: { | ||
| es6: true, | ||
| node: true, | ||
| }, | ||
| extends: [ | ||
| "eslint:recommended", | ||
| "plugin:import/errors", | ||
| "plugin:import/warnings", | ||
| "plugin:import/typescript", | ||
| "google", | ||
| "plugin:@typescript-eslint/recommended", | ||
| ], | ||
| parser: "@typescript-eslint/parser", | ||
| parserOptions: { | ||
| project: ["tsconfig.json", "tsconfig.dev.json"], | ||
| sourceType: "module", | ||
| }, | ||
| ignorePatterns: [ | ||
| "/lib/**/*", // Ignore built files. | ||
| "/generated/**/*", // Ignore generated files. | ||
| ], | ||
| plugins: [ | ||
| "@typescript-eslint", | ||
| "import", | ||
| ], | ||
| rules: { | ||
| "quotes": ["error", "double"], | ||
| "import/no-unresolved": 0, | ||
| "indent": ["error", 2], | ||
| }, | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # Compiled JavaScript files | ||
| lib/**/*.js | ||
| lib/**/*.js.map | ||
|
|
||
| # TypeScript v1 declaration files | ||
| typings/ | ||
|
|
||
| # Node.js dependency directory | ||
| node_modules/ | ||
| *.local | ||
| .env | ||
| .env.* |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π§© Analysis chain
π Script executed:
Repository: team-aliens/DMS-Android
Length of output: 376
π Script executed:
Repository: team-aliens/DMS-Android
Length of output: 1122
π Script executed:
Repository: team-aliens/DMS-Android
Length of output: 466
π Script executed:
Repository: team-aliens/DMS-Android
Length of output: 430
π Script executed:
Repository: team-aliens/DMS-Android
Length of output: 887
π Script executed:
Repository: team-aliens/DMS-Android
Length of output: 1208
π Script executed:
Repository: team-aliens/DMS-Android
Length of output: 3159
π Script executed:
Repository: team-aliens/DMS-Android
Length of output: 49
π Script executed:
Repository: team-aliens/DMS-Android
Length of output: 49
π Script executed:
Repository: team-aliens/DMS-Android
Length of output: 1313
π Script executed:
Repository: team-aliens/DMS-Android
Length of output: 845
π Script executed:
Repository: team-aliens/DMS-Android
Length of output: 6734
π Script executed:
Repository: team-aliens/DMS-Android
Length of output: 3159
π Script executed:
# Look at the end of the functions file to see what's exported tail -100 functions/src/index.tsRepository: team-aliens/DMS-Android
Length of output: 2774
π Script executed:
Repository: team-aliens/DMS-Android
Length of output: 669
Prefer IAM-authenticated service-to-service invocation for the Cloud Run runner.
The runner handles sensitive GitHub operations (branch creation, commits, PRs) and is deployed with
--allow-unauthenticated. While the runner validates a shared bearer token at the application level, this approach is weaker than IAM-based authentication. Since the runner is only invoked from backend code (Cloud Functions triggered via Slack interactions), restrict it to authenticated calls only using Cloud Run's IAM instead of relying on an environment variable secret.π€ Prompt for AI Agents