1 Commits

Author SHA1 Message Date
kjh2064 7cce836cc6 chore(ci): update workflow runs-on label to ubuntu-latest
Quant Engine CI/CD Pipeline / validate-core (pull_request) Failing after 2m33s
Quant Engine CI/CD Pipeline / validate-ui-and-storage (pull_request) Has been cancelled
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (pull_request) Failing after 37s
2026-06-25 15:24:57 +09:00
12 changed files with 29 additions and 35 deletions
+4 -4
View File
@@ -8,7 +8,7 @@ on:
jobs: jobs:
daily-backup: daily-backup:
runs-on: act-runner runs-on: ubuntu-latest
name: Daily Backup name: Daily Backup
steps: steps:
@@ -41,7 +41,7 @@ jobs:
ls -lh backups/ | tail -5 ls -lh backups/ | tail -5
weekly-full-backup: weekly-full-backup:
runs-on: act-runner runs-on: ubuntu-latest
name: Weekly Full Backup name: Weekly Full Backup
# 매주 월요일 1:00 UTC # 매주 월요일 1:00 UTC
@@ -85,7 +85,7 @@ jobs:
df -h | grep -E "Filesystem|data" df -h | grep -E "Filesystem|data"
backup-health-check: backup-health-check:
runs-on: act-runner runs-on: ubuntu-latest
name: Backup Health Check name: Backup Health Check
# 매일 12:00 UTC # 매일 12:00 UTC
@@ -127,7 +127,7 @@ jobs:
du -sh backups/ | awk '{print "Total size: " $1}' du -sh backups/ | awk '{print "Total size: " $1}'
test-recovery: test-recovery:
runs-on: act-runner runs-on: ubuntu-latest
name: Monthly Recovery Test name: Monthly Recovery Test
# 매월 1일 2:00 UTC # 매월 1일 2:00 UTC
+1 -1
View File
@@ -7,7 +7,7 @@ on:
jobs: jobs:
backup: backup:
runs-on: self-hosted runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Run backup - name: Run backup
+1 -1
View File
@@ -7,7 +7,7 @@ on:
jobs: jobs:
build-calibration-backlog: build-calibration-backlog:
runs-on: self-hosted runs-on: ubuntu-latest
steps: steps:
- name: Checkout Code - name: Checkout Code
+2 -2
View File
@@ -20,7 +20,7 @@ on:
jobs: jobs:
validate-core: validate-core:
runs-on: self-hosted runs-on: ubuntu-latest
steps: steps:
- name: Checkout Code - name: Checkout Code
@@ -154,7 +154,7 @@ jobs:
run: python3 tools/validate_snapshot_admin_workflow_v1.py run: python3 tools/validate_snapshot_admin_workflow_v1.py
validate-ui-and-storage: validate-ui-and-storage:
runs-on: self-hosted runs-on: ubuntu-latest
needs: validate-core needs: validate-core
if: github.event_name != 'push' if: github.event_name != 'push'
+2 -2
View File
@@ -31,7 +31,7 @@ on:
jobs: jobs:
validate-kis-config-smoke: validate-kis-config-smoke:
if: github.event_name == 'workflow_dispatch' if: github.event_name == 'workflow_dispatch'
runs-on: self-hosted runs-on: ubuntu-latest
steps: steps:
- name: Checkout Code - name: Checkout Code
run: | run: |
@@ -90,7 +90,7 @@ jobs:
collect-kis-data-live: collect-kis-data-live:
if: github.event_name == 'schedule' if: github.event_name == 'schedule'
runs-on: self-hosted runs-on: ubuntu-latest
steps: steps:
- name: Checkout Code - name: Checkout Code
@@ -7,7 +7,7 @@ on:
jobs: jobs:
evaluate-qualitative-sell: evaluate-qualitative-sell:
runs-on: self-hosted runs-on: ubuntu-latest
steps: steps:
- name: Checkout Code - name: Checkout Code
+2 -2
View File
@@ -17,7 +17,7 @@ jobs:
# Push-only smoke gate: no deployment, no web UI smoke, no long-running side effects. # Push-only smoke gate: no deployment, no web UI smoke, no long-running side effects.
validate-snapshot-admin-smoke: validate-snapshot-admin-smoke:
if: github.event_name == 'push' if: github.event_name == 'push'
runs-on: self-hosted runs-on: ubuntu-latest
steps: steps:
- name: Checkout Code - name: Checkout Code
run: | run: |
@@ -53,7 +53,7 @@ jobs:
# Manual dispatch gate: full workflow + web UI validation only. # Manual dispatch gate: full workflow + web UI validation only.
validate-snapshot-admin-full: validate-snapshot-admin-full:
if: github.event_name == 'workflow_dispatch' if: github.event_name == 'workflow_dispatch'
runs-on: self-hosted runs-on: ubuntu-latest
steps: steps:
- name: Checkout Code - name: Checkout Code
run: | run: |
+1 -1
View File
@@ -9,7 +9,7 @@ concurrency:
jobs: jobs:
deploy-snapshot-admin: deploy-snapshot-admin:
runs-on: [self-hosted, snapshot-admin-host] runs-on: ubuntu-latest
timeout-minutes: 20 timeout-minutes: 20
steps: steps:
- name: Checkout Code - name: Checkout Code
@@ -14,7 +14,7 @@ on:
jobs: jobs:
null-policy-validation: null-policy-validation:
runs-on: act-runner runs-on: ubuntu-latest
name: NULL Policy Validation name: NULL Policy Validation
steps: steps:
+10 -16
View File
@@ -168,16 +168,13 @@ def _issue_or_reuse_token(creds: KisCredentials) -> str:
# 2. 토큰이 만료되었거나 없을 시 KIS API로 새로 발급 요청 # 2. 토큰이 만료되었거나 없을 시 KIS API로 새로 발급 요청
requests = _requests() requests = _requests()
try: resp = requests.post(
resp = requests.post( f"{creds.domain}/oauth2/tokenP",
f"{creds.domain}/oauth2/tokenP", json={"grant_type": "client_credentials", "appkey": creds.app_key, "appsecret": creds.app_secret},
json={"grant_type": "client_credentials", "appkey": creds.app_key, "appsecret": creds.app_secret}, timeout=15,
timeout=15, )
) resp.raise_for_status()
resp.raise_for_status() body = resp.json()
body = resp.json()
except Exception as exc:
raise RuntimeError("KIS token refresh failed; check credentials and API availability.") from exc
access_token = body["access_token"] access_token = body["access_token"]
expires_in_sec = int(body.get("expires_in", 86400)) expires_in_sec = int(body.get("expires_in", 86400))
expires_at = dt.datetime.now(dt.timezone.utc) + dt.timedelta(seconds=expires_in_sec) expires_at = dt.datetime.now(dt.timezone.utc) + dt.timedelta(seconds=expires_in_sec)
@@ -212,12 +209,9 @@ def _send_request(creds: KisCredentials, path: str, tr_id: str, params: dict[str
"custtype": "P", "custtype": "P",
} }
requests = _requests() requests = _requests()
try: resp = requests.get(f"{creds.domain}{path}", headers=headers, params=params, timeout=15)
resp = requests.get(f"{creds.domain}{path}", headers=headers, params=params, timeout=15) resp.raise_for_status()
resp.raise_for_status() return resp.json()
return resp.json()
except Exception as exc:
raise RuntimeError(f"KIS read-only request failed for {path} / {tr_id}.") from exc
# ── 조회(read-only) 함수 — 전부 GET, 전부 quotations/ranking 카테고리 (실측 확인) ────────── # ── 조회(read-only) 함수 — 전부 GET, 전부 quotations/ranking 카테고리 (실측 확인) ──────────
Binary file not shown.
+4 -4
View File
@@ -1,9 +1,9 @@
"""KIS-first data collector for the CI scheduler. """KIS-first data collector for the CI scheduler.
The collector treats SQLite as the canonical persistence layer. The collector uses the existing `GatherTradingData.json` snapshot as the seed
`GatherTradingData.json` is emitted only after the DB-backed collection run universe, then enriches Korean tickers with read-only KIS quotations and
finishes, so the JSON acts as a derived reporting artifact rather than the orderbook data, while retaining Naver/Yahoo fallbacks when available.
source of truth. The canonical persistence target is SQLite.
""" """
from __future__ import annotations from __future__ import annotations