3 Commits

Author SHA1 Message Date
sku-refresh-bot
32319b67d7 chore(pricing): monthly SKU catalog refresh (2026-04-24)
Automated refresh from Oracle public pricing API.
See workflow artifact 'sku-refresh-logs' for the diff.
2026-04-24 15:53:41 +00:00
root
9fbe05a6a5 Use per-run branch name to avoid push collisions
All checks were successful
Deploy Skill to OCI / deploy (push) Successful in 19s
Prior run pushed automation/sku-refresh-2026-04-24 successfully but
failed before opening the PR (issue-creation bug, now fixed). On the
next run, main has moved, so a new commit on the same branch name has
a different parent → non-fast-forward rejection.

Append ${{ github.run_number }} to make the branch unique per workflow
invocation. Orphan branches left behind can be cleaned up after their
PRs are merged/closed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 12:45:57 -03:00
root
9b4d04cf34 Make discover count machine-readable for CI parsing
All checks were successful
Deploy Skill to OCI / deploy (push) Successful in 25s
The workflow's grep-on-free-text approach was fragile: local run correctly
extracted 162, but in the CI run the 'Open issue' step was skipped, meaning
new_count ended up as 0 after parsing. Likely causes: stdout buffering,
color codes, or shell differences between local and the Gitea runner's
shell.

Fix: tools/refresh_sku_catalog.py --discover now emits a deterministic
last-line marker `DISCOVER_MISSING_COUNT=<n>`. The workflow parses that
with sed (anchored, unambiguous) instead of the human-facing summary
line. Also added a diagnostic echo so the parsed value shows up in CI
logs for future debugging.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 12:43:06 -03:00
3 changed files with 8 additions and 11 deletions

View File

@@ -61,8 +61,9 @@ jobs:
run: | run: |
python3 tools/refresh_sku_catalog.py --discover -v 2>&1 \ python3 tools/refresh_sku_catalog.py --discover -v 2>&1 \
| tee /tmp/discover.log | tee /tmp/discover.log
NEW_COUNT=$(grep -oE '^[0-9]+ SKUs present in API' /tmp/discover.log \ NEW_COUNT=$(sed -n 's/^DISCOVER_MISSING_COUNT=\([0-9]\+\)$/\1/p' \
| head -1 | awk '{print $1}' || echo "0") /tmp/discover.log | tail -1)
echo "Parsed new_count='${NEW_COUNT}'"
echo "new_count=${NEW_COUNT:-0}" >> $GITHUB_OUTPUT echo "new_count=${NEW_COUNT:-0}" >> $GITHUB_OUTPUT
- name: Upload logs as artifact - name: Upload logs as artifact
@@ -83,7 +84,7 @@ jobs:
GITEA_REPO: ${{ github.repository }} GITEA_REPO: ${{ github.repository }}
run: | run: |
DATE=$(date -u +%Y-%m-%d) DATE=$(date -u +%Y-%m-%d)
BRANCH="automation/sku-refresh-${DATE}" BRANCH="automation/sku-refresh-${DATE}-run${{ github.run_number }}"
git config user.name "sku-refresh-bot" git config user.name "sku-refresh-bot"
git config user.email "sku-refresh@automation.local" git config user.email "sku-refresh@automation.local"

View File

@@ -1,4 +1,4 @@
last_verified: '2026-03-27' last_verified: '2026-04-24'
source: Oracle OCI Price List + internal BOM reference v1.73 source: Oracle OCI Price List + internal BOM reference v1.73
description: 'OCI SKU catalog for BOM generation. ~160 SKUs across 14+ categories. Prices are approximate and for estimation description: 'OCI SKU catalog for BOM generation. ~160 SKUs across 14+ categories. Prices are approximate and for estimation
only. Always verify against https://www.oracle.com/cloud/pricing/ only. Always verify against https://www.oracle.com/cloud/pricing/
@@ -563,7 +563,7 @@ categories:
- sku: B95714 - sku: B95714
product: Oracle Autonomous AI Transaction Processing - Dedicated - ECPU product: Oracle Autonomous AI Transaction Processing - Dedicated - ECPU
metric: ECPU Per Hour metric: ECPU Per Hour
list_price_usd: 0.336 list_price_usd: 0.0807
default_hours_units: 730 default_hours_units: 730
billing_type: hourly billing_type: hourly
- sku: B95715 - sku: B95715
@@ -1301,12 +1301,6 @@ categories:
list_price_usd: 0.015 list_price_usd: 0.015
default_hours_units: 730 default_hours_units: 730
billing_type: hourly billing_type: hourly
# OCI Data Science and Data Flow do not have dedicated SKUs in the Oracle
# public pricing API — they are billed via the underlying Compute + Block/Object
# Storage consumed by notebook sessions, model-deployment endpoints, and Spark
# runs. The entries below are placeholder estimates (VM.Standard3.Flex OCPU rate)
# so BOMs can include them as line items; always confirm against the customer's
# actual shape + usage before quoting.
- sku: EST-DS-NOTEBOOK - sku: EST-DS-NOTEBOOK
product: '[ESTIMATE] OCI Data Science - Notebook Session (billed via underlying VM.Standard compute OCPU)' product: '[ESTIMATE] OCI Data Science - Notebook Session (billed via underlying VM.Standard compute OCPU)'
metric: OCPU Per Hour metric: OCPU Per Hour

View File

@@ -385,6 +385,8 @@ def discover_catalog(verbose=False):
missing = discover_missing_skus(api_map, sku_map, verbose=verbose) missing = discover_missing_skus(api_map, sku_map, verbose=verbose)
print_missing_skus(missing, limit=None if verbose else 40) print_missing_skus(missing, limit=None if verbose else 40)
# Machine-readable summary for CI/automation — always last line on stdout.
print("\nDISCOVER_MISSING_COUNT={}".format(len(missing)))
return 0 return 0