Skip to content

chore: updates from review#57

Merged
tilwbr merged 15 commits intomainfrom
updates-from-review
Mar 26, 2026
Merged

chore: updates from review#57
tilwbr merged 15 commits intomainfrom
updates-from-review

Conversation

@SirSimon04
Copy link
Contributor

@SirSimon04 SirSimon04 commented Mar 24, 2026

  • in tests: cds.connect only once
  • workflows are now stored in srv/workflows folder
  • cds bind --exec -- cds import --from process becomes cds import --process

Copy link
Contributor

@hyperspace-insights hyperspace-insights bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR is straightforward and the main substantive issue was already identified: in the getAttributes handler, status is destructured from req.data but never passed to getInstancesByBusinessKey, meaning any status filter provided by the caller is silently dropped. All other changes (moving workflows to srv/workflows/, hoisting cds.connect.to calls to init() for efficiency, documentation updates, and tsconfig cleanup) look correct and well-reasoned. Please address the unused status variable in programmatic-service.ts.

PR Bot Information

Version: 1.19.3 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback

  • LLM: anthropic--claude-4.6-sonnet
  • Correlation ID: 0d35aed0-278d-11f1-8895-a0bb9ea6686c
  • Event Trigger: pull_request.opened

@SirSimon04 SirSimon04 marked this pull request as ready for review March 24, 2026 17:12
@SirSimon04 SirSimon04 requested a review from a team as a code owner March 24, 2026 17:12
@hyperspace-insights
Copy link
Contributor

Summary

The following content is AI-generated and provides a summary of the pull request:


Chore: Post-Review Updates – Workflow Path Restructure and cds import Simplification

Refactor

♻️ This PR applies several improvements following a code review: cds.connect calls are deduplicated in tests, workflow files are relocated to srv/workflows/, and the import command no longer requires cds bind --exec wrapping.

Changes

  • .prettierignore: Updated ignore path from tests/bookshop/workflows/* to tests/bookshop/srv/workflows/*.
  • README.md: Updated documentation to reflect the new srv/workflows/ path, simplified import command examples (removed cds bind --exec -- cds-tsx wrapper), and clarified credential binding notes.
  • lib/processImport.ts: Changed the output path for imported workflow JSON files to srv/workflows/. Added auto-resolution of cloud bindings via @sap/cds-dk/lib/bind/shared as a fallback when credentials are not found, removing the need to run commands under cds bind --exec. Introduced a requireCdsDk helper that falls back to the global npm root. Improved the error message for missing credentials.
  • lib/processImportRegistration.ts: Added profile: 'hybrid' and 'resolve-bindings': true options to the process import registration config.
  • package.json: Simplified all import:process:* scripts from cds bind --exec -- cds-tsx import ... to plain cds import --from process ... --force.
  • tests/bookshop/eslint.config.mjs: Added ignore rule for gen/** directory.
  • tests/bookshop/srv/annotation-hybrid-service.ts: Moved cds.connect.to(...) call to init() level (called once), removing duplicate calls inside individual event handlers.
  • tests/bookshop/srv/programmatic-service.ts: Same refactor — deduplicated cds.connect.to(...) calls by hoisting them to the top of init().
  • tests/bookshop/tsconfig.json / tsconfig.json: Removed allowJs: true and added exclude: ["**/node_modules"].
  • tests/integration/annotations/lifeCycleAnnotation.test.ts: Removed redundant warmup cds.connect.to('ProcessService') call in beforeAll.
  • tests/bookshop/srv/workflows/*: Workflow JSON files renamed/moved from tests/bookshop/workflows/ to tests/bookshop/srv/workflows/.

  • 🔄 Regenerate and Update Summary
  • ✏️ Insert as PR Description (deletes this comment)
  • 🗑️ Delete comment
PR Bot Information

Version: 1.19.3 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback

  • LLM: anthropic--claude-4.6-sonnet
  • Correlation ID: 933b8fb0-27a4-11f1-875a-56fa7e92715a
  • Summary Prompt: Default Prompt
  • Event Trigger: pull_request.ready_for_review
  • Output Template: Default Template

💌 Have ideas or want to contribute? Create an issue and share your thoughts with us!
📑 Check out the documentation for more information.
📬 Subscribe to the Hyperspace PR Bot DL to get the latest announcements and pilot features!

Made with ❤️ by Hyperspace.

Copy link
Contributor

@hyperspace-insights hyperspace-insights bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR makes solid structural improvements (moving workflows to srv/workflows, hoisting cds.connect.to calls out of handlers, and removing the cds bind --exec wrapper), but has three notable issues: the global npm root -g fallback needs its own error handling, the process.env mutation in the binding auto-resolution leaks state globally, and the simplified import scripts silently depend on the plugin being loaded to supply the correct options.

PR Bot Information

Version: 1.19.3 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback

  • Event Trigger: pull_request.ready_for_review
  • LLM: anthropic--claude-4.6-sonnet
  • Correlation ID: 933b8fb0-27a4-11f1-875a-56fa7e92715a

Copy link
Contributor

@Kronprinz03 Kronprinz03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tilwbr tilwbr merged commit 5d2b708 into main Mar 26, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants