feat(fabric-x): Make the Fabric-X application organization configurable - #830
Open
HarK-github wants to merge 1 commit into
Open
HarK-github wants to merge 1 commit into
HarK-github wants to merge 1 commit into
Conversation
HarK-github
force-pushed
the
feat/fabric-x-configurable-org-818
branch
4 times, most recently
from
September 14, 2026 12:09
1ff5f64 to
4a9d9a7
Compare
umegbewe
reviewed
Sep 15, 2026
umegbewe
reviewed
Sep 15, 2026
Comment on lines
+604
to
+609
| if (channel.orgs.length !== 1) { | ||
| this.emit(validationErrorType.ERROR, { | ||
| category: validationCategories.CHANNEL, | ||
| message: `fabric-x requires exactly one organization in channel '${channel.name}', found ${channel.orgs.length}.`, | ||
| }); | ||
| } |
Contributor
There was a problem hiding this comment.
this is outside the scope of this PR
umegbewe
reviewed
Sep 15, 2026
Comment on lines
+623
to
+630
| orgs | ||
| .filter((o) => !isOrdererOrg(o) && !channelOrgNames.includes(o.organization.name)) | ||
| .forEach((o) => { | ||
| this.emit(validationErrorType.WARN, { | ||
| category: validationCategories.ORGS, | ||
| message: `Organization '${o.organization.name}' is declared but not joined to any channel.`, | ||
| }); | ||
| }); |
Contributor
There was a problem hiding this comment.
outside the scope of this PR
umegbewe
reviewed
Sep 15, 2026
Comment on lines
591
to
597
| if (channels.length !== 1) { | ||
| this.emit(validationErrorType.ERROR, { | ||
| category: validationCategories.CHANNEL, | ||
| message: `fabric-x requires exactly one channel found ${channels.length}.`, | ||
| message: `fabric-x requires exactly one channel, found ${channels.length}.`, | ||
| }); | ||
| return; | ||
| } |
Contributor
There was a problem hiding this comment.
Avoid returning early from validation unless absolutely necessary.
The validator usually tries to collect all relevant errors. this block can emit the channel-count error and still avoid unsafe indexing without cutting off unrelated validation
Contributor
|
Looks good for a first draft, expecting some tests too atleast for example name: "Bank"
mspName: "BankMSP"
domain: "bank.fablo.com"The test should assert generated output includes: localMspID: BankMSP
MSPDir: ./crypto/peerOrganizations/bank.fablo.com/msp
tlsca.bank.fablo.com-cert.pem
User1@bank.fablo.com
AND('BankMSP.member') |
…er-labs#818) Signed-off-by: Harshit Kandpal <kandpalhar@gmail.com>
HarK-github
force-pushed
the
feat/fabric-x-configurable-org-818
branch
from
September 16, 2026 20:39
4a9d9a7 to
63d15c1
Compare
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.
Parameterizes the Fabric-X generator so the primary application org drives all output. Networks with custom organization names, domains, and MSP IDs now generate and boot successfully.
Changes
fabricXDockerWriter.tsextractsprimaryOrgandprimaryOrgSlug(name.toLowerCase()) into template context.Org1,org1.example.com, andOrg1MSPwith dynamic variables across 9 config, compose, and script files.Bank,BankMSP,bank.fablo.com) into existinge2e/fabloCommands.test.ts.Note: Channel parameterization is intentionally excluded to avoid merge conflicts with PR #824.