- Docker: Delete 23 deprecated Dockerfiles, fix CI/CD to use Dockerfile.foxhunt-build - Config: Remove 36 .env files, keep 4 essential, delete config/environments/ - Docs: Archive 614 Wave D files to docs/archive/wave_d/, 95% reduction in root - Scripts: Delete 56 deprecated scripts, keep 58 production-critical (49% reduction) - Python: Organize 37 scripts into scripts/python/ subdirectories, delete ml/python/ - Build: Remove 1GB artifacts, delete old venvs, clean Python cache from git - Migrations: Delete deprecated directory (4,432 lines), remove duplicate database/migrations/ - Infrastructure: Delete deployment/ (61 files), docs/scripts/ (8 files) Total impact: ~2,500 files cleaned, 750MB+ space freed, zero production impact All deleted scripts backed up to archives. runpod/ and tests/runpod/ preserved. data_acquisition_service retained per user request.
92 lines
2.1 KiB
Python
Executable File
92 lines
2.1 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
import os
|
|
import requests
|
|
from dotenv import load_dotenv
|
|
|
|
# Load RunPod API key
|
|
env_path = '.env.runpod'
|
|
load_dotenv(env_path)
|
|
RUNPOD_API_KEY = os.getenv('RUNPOD_API_KEY')
|
|
|
|
if not RUNPOD_API_KEY:
|
|
print("ERROR: RUNPOD_API_KEY not found in .env.runpod")
|
|
exit(1)
|
|
|
|
# Try alternative field names
|
|
queries = [
|
|
# Attempt 1: containerRegistryAuths
|
|
"""
|
|
query {
|
|
myself {
|
|
containerRegistryAuths {
|
|
id
|
|
name
|
|
username
|
|
createdAt
|
|
}
|
|
}
|
|
}
|
|
""",
|
|
# Attempt 2: savedRegistryAuths
|
|
"""
|
|
query {
|
|
myself {
|
|
savedRegistryAuths {
|
|
id
|
|
name
|
|
username
|
|
createdAt
|
|
}
|
|
}
|
|
}
|
|
""",
|
|
# Attempt 3: Get user info to see available fields
|
|
"""
|
|
query {
|
|
myself {
|
|
id
|
|
email
|
|
}
|
|
}
|
|
"""
|
|
]
|
|
|
|
headers = {
|
|
"Content-Type": "application/json",
|
|
"Authorization": f"Bearer {RUNPOD_API_KEY}"
|
|
}
|
|
|
|
for i, query in enumerate(queries, 1):
|
|
print(f"\n{'='*60}")
|
|
print(f"Attempt {i}:")
|
|
print(f"{'='*60}")
|
|
|
|
response = requests.post(
|
|
"https://api.runpod.io/graphql",
|
|
json={"query": query},
|
|
headers=headers
|
|
)
|
|
|
|
result = response.json()
|
|
print("Response:", result)
|
|
|
|
if 'data' in result and 'errors' not in result:
|
|
print("\n✅ Query successful!")
|
|
if i < 3: # Registry auth queries
|
|
auth_field = 'containerRegistryAuths' if i == 1 else 'savedRegistryAuths'
|
|
if result['data']['myself'] and auth_field in result['data']['myself']:
|
|
creds = result['data']['myself'][auth_field]
|
|
if creds:
|
|
print(f"\n✅ Found credentials ({len(creds)}):")
|
|
for cred in creds:
|
|
print(f" ID: {cred['id']}")
|
|
print(f" Name: {cred['name']}")
|
|
print(f" Username: {cred['username']}")
|
|
print(f" Created: {cred['createdAt']}")
|
|
print()
|
|
else:
|
|
print("\n⚠️ No credentials configured")
|
|
break
|
|
else:
|
|
print(f"❌ Failed: {result.get('errors', 'Unknown error')}")
|