diff --git a/action.yml b/action.yml index cbd9818..1b009ed 100644 --- a/action.yml +++ b/action.yml @@ -740,7 +740,7 @@ runs: # After the artifact holds the analysis and before it is uploaded: each feature is one more # file in it. Uses production by default; an empty URL disables it. It never fails the run. - - name: Run remote features + - name: Generate review journeys and run architecture and merge-risk checks id: remote_features if: steps.guard.outputs.skip != 'true' && steps.guard.outputs.mode == 'review' && inputs.review_guide_url != '' continue-on-error: true @@ -781,7 +781,7 @@ runs: REQUESTY_BASE_URL: ${{ inputs.requesty_base_url }} VERCEL_API_KEY: ${{ inputs.vercel_api_key }} VERCEL_BASE_URL: ${{ inputs.vercel_base_url }} - run: python3 "$GITHUB_ACTION_PATH/scripts/remote_features.py" + run: python3 -u "$GITHUB_ACTION_PATH/scripts/remote_features.py" - name: Upload review artifact id: upload_review_artifact_dotcom diff --git a/scripts/remote_features.py b/scripts/remote_features.py index eaa7e95..d23055e 100644 --- a/scripts/remote_features.py +++ b/scripts/remote_features.py @@ -723,11 +723,16 @@ def run_review_guide(service_url: str, data: bytes, headers: dict, artifact: Pat if "x-llm-provider" in headers and "x-llm-api-key" not in headers: raise Skip("the service cannot call this run's provider") keep_bundle(artifact, data) - answer = _post(f"{service_url.rstrip('/')}/v1/review-guide", data, headers) + # Allow the 20-minute journey Lambda to finish and return its response. + print("Journey analysis: sending /v1/review-guide request; waiting for the service response.") + answer = _post(f"{service_url.rstrip('/')}/v1/review-guide", data, headers, timeout=21 * 60) guide = answer.get("guide") if not isinstance(guide, dict): raise ValueError("the service returned no guide") (artifact / "review_guide.json").write_text(json.dumps(guide, ensure_ascii=False, indent=1)) + journeys = guide.get("journeys") + count = f" ({len(journeys)} journeys)" if isinstance(journeys, list) else "" + print(f"Journey analysis: saved review_guide.json{count}.") except Exception as error: print(f"::notice::review-guide {'skipped' if isinstance(error, Skip) else 'failed'}: {error}") @@ -846,6 +851,7 @@ def _guide_and_architecture(pool, service_url: str, ctx: dict, bearer: dict, env architecture's envelope, which records why when neither request went out.""" try: headers = {**bearer, **model_headers(env)} + print("Journey analysis: preparing the analysis bundle.") guide_request, architecture_request = _requests(ctx, collect(env), env) except TooLarge as error: print(f"::notice::review-guide skipped: {error}")