Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate domain creation #622

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

Morendil
Copy link
Collaborator

@Morendil Morendil commented Jan 6, 2025

Purpose

Completing #583, ensure users from communes can do something meaningful upon onboarding: create a default domaine for them, so that they can create mailboxes

Proposal

  • Introduce ApiCall object, to avoid mocking and anticipating task queuing
  • Call Scaleway API upon organization creation to provision subzone and email-related DNS entries

Laurent Bossavit added 3 commits January 3, 2025 23:02
ANCT-specific extraction of organization names for communes, front
end changes to match.
Introduce ApiCall object to avoid mocking and anticipating task queuing
Test and implement ApiCall execution, bare bones version for now
@Morendil
Copy link
Collaborator Author

Morendil commented Jan 6, 2025

@qbey Let me know when we could discuss this, even in draft status: this takes advantage of the plugin idea but aims it in a somewhat different direction, perhaps, than what your original PR implied.

I'm thinking that the plugins system could be a nice place to locate the responsibility for business rules such as attributing the admin role to a user automatically (what I have in mind for the communes use case, but that may not generalize to other kinds of orgs). For this to work we'd have to introduce additional "seams" corresponding to further points in the lifecycle, such as upon attributing the admin access.

@Morendil Morendil requested a review from qbey January 7, 2025 14:05
Copy link
Collaborator

@qbey qbey left a comment

Choose a reason for hiding this comment

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

@Morendil

The plugin system was designed for this, yes :) This first implementation does not respect the concern of genericity:

  • NameFromSiretOrganizationPlugin must not be replaced, the CommuneCreation must be another plugin.
  • We may add a field to the Organization like extra which would be a generic JSON field to store if the organization is a "commune", information we can get from NameFromSiretOrganizationPlugin with few modifications.
  • Then the CommuneCreation would check if the Organization is a "commune", in which case it could trigger the domain creation (and maybe other stuffs).

I don't like the ApiCall object, it adds an overhead on something already simple. If you like, we can think about a small "Request" override to simplify the "retry", but I would prefer to keep this for later.

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