Skip to content

Conversation

@dodo920306
Copy link
Contributor

@dodo920306 dodo920306 commented Jun 29, 2025

As an application which largely relies on modern microsvc deployment architecture as provided by tools like docker and k8s, Cello must be compatible with any of them, which means to be compatible with lots of components within an internal container network. Thus, the ability to accept internal URL references, like container and service names, compling with RFC-1123 is indeed necessary.

This commit introduces a new dependency FQDN in order to achieve this very goal. A hostname which is accepted by this tool should be seen as valid by Cello. Moreover, in order to introduce this customized validator, the urls field of Agent model is now changed into CharField to stop serializers of Django REST framework to use the default method to validate the field. An overriding in the serializers level can be done but must be done for all Agent serializers respectively. Therefore, to keep code simplicity, this commit directly changes the field type. Changing the validator of the field all at once. As a result, the URL of Agent should be fully compatible with an internal container network after this commit.

dodo920306 and others added 4 commits June 29, 2025 01:37
As an application which largely rely on modern microsvc deployment architecture as
provided by tools like docker and k8s, Cello must be able to be compatible with all of
them, which means to be compatible with lots of components within an internal
container network. Thus, the ability to accept internal URL references, like container
and service names, compling with RFC-1123
(https://www.rfc-editor.org/rfc/rfc1123.html) is indeed necessary.

This commit introduces a new dependency FQDN (https://github.com/ypcrts/fqdn) in
order to achieve this very goal. A hostname which is accepted by this tool should be
seen as valid by Cello. Moreover, in order to introduce this customized validator, the
urls field of `Agent` model is now changed into CharField to stop serializers of Django
REST framework to use the default method to validate the field. An overriding in the
serializers level can be done but must be done for all `Agent` serializers respectively.
Therefore, to keep code simplicity, this commit directly changes the field type.
Changing the validator of the field all at once. As a result, the URL of Agent should be
fully compatible with an internal container network after this commit.

Signed-off-by: dodo920306 <[email protected]>
@yeasy yeasy requested a review from YoungHypo June 30, 2025 05:13
@yeasy yeasy merged commit 93b0d54 into hyperledger-cello:main Jul 5, 2025
3 checks passed
@dodo920306 dodo920306 deleted the feature/enable-agent-url-to-be-internal-hostname branch July 5, 2025 00:39
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.

2 participants