HARMONY-2372: resolve input and output files at once.#929
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughUpdates the Steps API so ChangesSteps API resolveFiles update
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@services/harmony/app/frontends/steps.ts`:
- Around line 125-132: The resolveFiles query handling in steps.ts should
normalize the incoming value before calling parseBoolean, since
query.resolvefiles can be a string[] when the parameter is repeated. Update the
logic in the resolveFiles parsing block to detect and reject/handle multi-valued
inputs consistently, and only pass a single normalized string into parseBoolean
so repeated params and empty values don’t bypass RequestValidationError handling
or fall through as a raw runtime error. Keep the fix localized to the
resolveFiles branch and preserve the existing
ParameterParseError-to-RequestValidationError conversion in the same try/catch
path.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 1c2d14ef-bd06-47fc-a26b-c73c25ce2f98
📒 Files selected for processing (3)
services/harmony/app/frontends/steps.tsservices/harmony/app/markdown/steps.mdservices/harmony/test/jobs/jobs-steps.ts
| // Map of workItem id -> its resolved page of files | ||
| type ResolvedFiles = Map<number, WiResolvedFiles>; | ||
| // A single workItem's resolved page of input and output files | ||
| interface WiAccessFiles { |
There was a problem hiding this comment.
nit: I probably would rename this to WorkItemAccessFiles
Jira Issue ID
HARMONY-2372
Description
Combines inputFilesUrl and outputFilesUrl into a single accessFilesUrl link to resolve both input and output files.
Both sets of files are pageable independently (but to see it you'll probably need a batchee step and a
wilimitLocal Test Steps
Pull this branch, run the tests, and deploy to Harmony-In-A-Box.
Make some requests and examine the steps endoint output.
Verify that there are single links now that are
accessFilesUrland that the links have&resolvefiles=truein themIf you're feeling lucky you can deploy Harmony-In-A-Box with: "harmonyservices/query-cmr:latest","podaac/l2ss-py:sit","nasa/batchee:latest","nasa/stitchee:latest",podaac/concise:sit",
run this 20 element request.
http://localhost:3000/C1254854453-LARC_CLOUD/ogc-api-coverages/1.0.0/collections/all/coverage/rangeset?subset=lat(-70%3A30)&subset=lon(-157.5%3A-10)&concatenate=true&maxResults=20&extend=true&serviceId=l2-subsetter-batchee-stitchee-concise
Access the batchee files via the link
/steps?workitem={batchee}&resolvefiles=truecheck paging for in and output files works by adding a
wilimit/steps?workitem={batchee}&resolvefiles=true&wilimit=3you can add another workitem to make sure more than one still works as well.
/steps?workitem={querycmrWid},{batcheeWid}&resolvefiles=true&wilimit=3PR Acceptance Checklist
Summary by CodeRabbit
accessFilesUrllink in overview mode.inputFilesandoutputFilestogether, with updated paging included where applicable.resolveFilesto useresolveFiles=true, with stricter single-value validation.accessFilesUrlandresolveFiles=trueflow.