Repository navigation
fix: wait for the 20-minute review guide Lambda - #185
ivanmilevtues wants to merge 2 commits into
Conversation
Amp-Thread-ID: https://ampcode.com/threads/T-01a237d8-4c3f-7181-be86-5ccfb2c318b7 Co-authored-by: Amp <amp@ampcode.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
CodeBoarding reviewStatus: 1 changed component See the full change in CodeBoarding. graph LR
n_Action_Execution_And_Relay["Action Execution And Relay"]
n_Remote_Analysis_Integration["Remote Analysis Integration"]
classDef added fill:#1f883d,stroke:#0b5d23,color:#ffffff;
classDef modified fill:#bf8700,stroke:#7d4e00,color:#ffffff;
classDef deleted fill:#cf222e,stroke:#82071e,color:#ffffff,stroke-dasharray:5 3;
class n_Remote_Analysis_Integration modified;
|
Amp-Thread-ID: https://ampcode.com/threads/T-01a237d8-4c3f-7181-be86-5ccfb2c318b7 Co-authored-by: Amp <amp@ampcode.com>
Svilen-Stefanov
left a comment
There was a problem hiding this comment.
Small and fine overall, and the progress prints are nice when you're staring at a long step. The main thing is the timeout: Lambda can't run longer than 15 min, so 21 min only makes sense if licensing-aws #84's 20 min Lambda can actually deploy, and I don't think it can. Measured on the staging runs, the guide call took ~8 min on eShop #11 and ~5 min on licensing-aws #84.
| 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) |
There was a problem hiding this comment.
blocker-ish: Lambda maxes out at 15 min, and I think #84's Duration.minutes(20) won't deploy, so waiting 21 min doesn't buy anything. Could we go with 15 min plus a small margin, as a named constant next to the other timeouts? 21 * 60 is a bit of a magic number here, and the comment above it would need updating too.
| # 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 |
There was a problem hiding this comment.
Also wondering about cost: on private repos the customer pays runner minutes while we wait on our Lambda, now up to ~15 min per review. Not for this PR, but maybe worth a ticket to make the guide async (the Lambda stores it, the platform picks it up) instead of holding the job open?
| (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}.") |
There was a problem hiding this comment.
nit: the new lines say "Journey analysis:" but the notice below still says "review-guide failed". Same prefix for both would make grepping the logs easier.
Allow 21 minutes for the review-guide HTTP response. Architecture and merge-risk keep their existing timeouts. Staging consumer: CodeBoarding/eShop#11. Backend: https://github.com/CodeBoarding/licensing-aws/pull/84. Verified with the remote_features unittest suite.