Add missing endpoints and separate generated code#324
Conversation
…s and moved shared enums
This reverts commit cb9fc88.
There was a problem hiding this comment.
Just for posterity (and to help myself since I'm new!), I'm going to write a few notes here.
I can see this is a PR consisting overwhelmingly of mechanical refactoring, with structural improvement to support the SDK Roadmap:
The adapter pattern creates 3 files for every API (codegen + adapter + proxy).
Some insights generated by Claude Code:
✏️ Real Changes (<10% of files and LOC)
- Import path updates in ~50 example files:
- conductor.client.ai.configuration → conductor.shared.ai.enums
- conductor.client.http.models → conductor.client.adapters.models - New documentation:
- CLIENT_REGENERATION_GUIDE.md (315 lines) - Real new functionality:
- Integration API support (a handful of actual implementation files)
- Some adapter methods like TaskAdapter.to_task_result()
💡 Stats:
- ~695 files (80%) are boilerplate: Generated code + stub adapters + proxy re-exports
- ~150 files (17%) are import updates: Examples and tests updating import paths
- ~30 files (3%) are actual new code: Integration features and documentation
I'm can approve this PR on the basis that e2e tests exist (even if they're incomplete), so if these underlying structural changes don't break anything, it's probably fine. 👍🏼
(And very minor thing that need not hold up the PR: from future imports should probably be removed going forward.)
HOWEVER I have a concern about potential overengineering that I'd like to clear up @IgorChvyrov-sm before approving this.
rethinking this after seeing #326 -- concerns about architecture and possible impacts to SDK-user (developer) experience
We can discuss the SDK architecture (feel free to ping me if you have any questions). Regarding future statements, we support Python from version 3.7 so I don't understand why they need to be removed. Could you elaborate on this point in more detail? |
Sure, this is a philosophy of maintenance and code scannability (fast-readability) thing. Here are the 3 statements that use
For now we have to keep the We're not supporting versions of Python before 3.7, so any compatibility code doing something that a previous version of Python need is just cruft. Sure, it won't add much weight to the package, but the implication for a human seeing a Also, consider that the following statement doesn't cause any harm either:
The only difference is that a linter would complain about this, but it wouldn't pick up on a useless So, the philosophy I'm adhering to here is "don't leave in code that doesn't serve a useful purpose." (I did say it was a very minor thing!) |
|
Hey so just as we discussed in Slack @IgorChvyrov-sm, here's my breakdown of the developer experience concern I have about this PR. State of the arch conversation reflected in this PR: This change theoretically enables the SDK to more easily keep up with Conductor API changes. This change makes it so that there are 3 files per API call. For the developer, this change may have the following effects: Import Pattern Confusion 🔀Before: Single import path**
After: Three possible import paths**Option 1: Proxy layer (backward compatible) Option 2: Adapter layer Option 3: Codegen layer (raw) ImpactDevelopers unsure which to use, potential for inconsistent usage across codebase. Future architectural changes (if desired) may cause more issues for developers. Debugging Struggles 🔍Stack traces now go through 3 layers for every API call: ImpactMay be harder to trace errors, longer stack traces, more cognitive overhead. Maintenance Commitment AmbiguitiesWe're promising to keep a "proxy layer" to enable backwards compatibility for the arch change, but the implication is that this is a bridge between the "old" and the "new". I'm concerned that the "new" isn't well thought out from the developer perspective, so we'll either end up using that proxy layer forever or changing the architecture again. (And if we keep the proxy layer, we get the added maintenance burden of maintaining the proxy layer.) Thanks for reading and considering, @IgorChvyrov-sm -- i know this PR has been weeks in the making. Let me know if there are any flaws in my reasoning, i'm still getting my footing here! |
Hey @nthmost-orkes! I agree with you that we should take the time to consider the experience of developers who will be using the SDK. I plan to conduct research on imports to make them less confusing in future versions and prepare a document that we can discuss to arrive at the best solution. At this stage, to maintain backward compatibility and avoid breaking changes, we will have to keep the architecture presented in this PR. |
nthmost-orkes
left a comment
There was a problem hiding this comment.
OK, approving on the basis that we'll be keeping the proxy layer in place for the sake of developer experience.
We can remove this proxy later if and only if we decide on an SDK-user-friendly vision for usage of the conductor API, since this new architecture has some usability issues.
Changes:
Generated Missing API endpoints:
Created Resource API adapters
Created Models adapters
Introduced proxy package to achieve backward compatibility
Added integration provider functionality to OrkesIntegrationClient
Added integration tests for Orkes clients