Merged
Conversation
55fdfdc to
3a96bdf
Compare
nesitor
reviewed
Jun 26, 2025
Member
nesitor
left a comment
There was a problem hiding this comment.
There are different things to fix, like the delete_ports logic that shouldn't work, and also take into account the REMOVING status also on messages as valid as PROCESSED. Also, the test should be useful that these tests are not testing anything indeed.
The other are only method renaming suggestions to improve the clarity.
…VERSION` `SCHEDULER_URL`
…egister_service` to add any service on top
…new method `register_authenticated_service` to add any service on top
…n getting instance allocations
24e9dc1 to
a275c89
Compare
nesitor
approved these changes
Jun 26, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR add missing services inside the SDK
crnschedulerdnsport_forwarderandutilsto simplify usage for instancesRelated ClickUp, GitHub or Jira tickets : ALEPH-XXX
Self proofreading checklist
Changes
This pull request introduces significant enhancements to the Aleph SDK client, primarily focusing on service modularization, authenticated service registration, and improved API interactions. Key changes include the addition of several service classes, the ability to register services dynamically, and updates to existing methods to use new models and validation techniques.
Service Modularization and API Enhancements:
Added new service classes: Introduced modular service classes such as
CrnService,DNSService,PortForwarder,AuthenticatedPortForwarder, andSchedulerServiceto encapsulate specific API interactions. These classes streamline operations like fetching CRN lists, managing DNS records, configuring port forwarding, and interacting with the scheduler API. (src/aleph/sdk/client/service/crn/http_crn.py- [1]src/aleph/sdk/client/service/dns/http_dns.py- [2]src/aleph/sdk/client/service/port_forwarder/http_port_forwarder.py- [3]src/aleph/sdk/client/service/port_forwarder/authenticated_port_forwarder.py- [4]src/aleph/sdk/client/service/scheduler/http_scheduler.py- [5]Introduced
BaseServiceandAggregateConfig: Added a generic base classBaseServiceand a container modelAggregateConfigto handle aggregate data and simplify service implementations. (src/aleph/sdk/client/service/base.py- src/aleph/sdk/client/service/base.pyR1-R47)Service Registration and Initialization:
Dynamic service registration: Added methods
register_serviceandregister_authenticated_serviceto dynamically register services for both authenticated and non-authenticated clients. This allows for flexible service instantiation during client initialization. (src/aleph/sdk/client/authenticated_http.py- [1]src/aleph/sdk/client/http.py- [2]Service initialization in
__aenter__: Enhanced the__aenter__method inAlephHttpClientandAuthenticatedAlephHttpClientto initialize default and registered services when the client is entered. (src/aleph/sdk/client/authenticated_http.py- [1]src/aleph/sdk/client/http.py- [2]Code Improvements:
parse_objwithmodel_validatefor improved validation in methods likecreate_store. (src/aleph/sdk/client/authenticated_http.py- src/aleph/sdk/client/authenticated_http.pyL395-R425)These changes collectively enhance the SDK's flexibility, maintainability, and ease of use for developers interacting with the Aleph network.