[Nitro CLI] Consume composition settings stored in Nitro - #9931
Conversation
372548e to
9d689de
Compare
There was a problem hiding this comment.
Pull request overview
This PR extends the Nitro CLI/client to read Fusion composition settings stored on a stage in Nitro and apply them during fusion publish, ensuring stage-level composition configuration can override (or fall back to) archive-embedded settings.
Changes:
- Added GraphQL schema + persisted operation to fetch
Stage.compositionSettingsand exposed it viaIFusionConfigurationClient.GetStageCompositionSettingsAsync. - Updated Fusion publish flow to download stage composition settings and merge them into the effective composition settings used for composition.
- Added/updated CLI tests to validate merging semantics (null/partial stage settings) and error handling when downloading stage settings fails.
Reviewed changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Nitro/Common/src/ChilliCream.Nitro.Client/schema.graphql | Adds schema fields/types for stage composition settings and related operations. |
| src/Nitro/Common/src/ChilliCream.Nitro.Client/persisted/operations.json | Registers a new persisted query for fetching stage composition settings. |
| src/Nitro/Common/src/ChilliCream.Nitro.Client/FusionConfiguration/StageCompositionSettings.cs | Introduces a client-side model for stage composition settings. |
| src/Nitro/Common/src/ChilliCream.Nitro.Client/FusionConfiguration/Operations/FusionStageCompositionSettingsQuery.graphql | Adds the operation to fetch compositionSettings for a stage. |
| src/Nitro/Common/src/ChilliCream.Nitro.Client/FusionConfiguration/IFusionConfigurationClient.cs | Adds the new API surface to retrieve stage composition settings. |
| src/Nitro/Common/src/ChilliCream.Nitro.Client/FusionConfiguration/FusionConfigurationClient.cs | Implements the new stage composition settings fetch and mapping. |
| src/Nitro/CommandLine/src/CommandLine/Messages.cs | Adds a CLI error message for failures when downloading stage composition settings. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/FusionPublishHelpers.cs | Fetches/merges stage composition settings into the compose pipeline. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionCommandTestBase.cs | Adds test helpers for stage settings + archives with embedded composition settings. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionPublishCommandTests.cs | Adds coverage for null/partial stage settings merge behavior and failure handling. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9d689de to
f467045
Compare
Code Coverage OverviewLanguages: C# C# / code-coverage/dotnetThe overall coverage in the Show a code coverage summary of the most impacted files.
Updated |
Patch coverage4.3% of changed lines covered (120/2797)
Uncovered changed lines (JSON){
"sha": "7f3849d2e58674efd36a74ce1ca47effa9896f47",
"files": [
{ "path": "src/Nitro/Common/src/ChilliCream.Nitro.Client/FusionConfiguration/FusionConfigurationClient.cs", "ranges": [[215, 216], [218, 218], [220, 222], [225, 227], [230, 239]] },
{ "path": "src/Nitro/Common/src/ChilliCream.Nitro.Client/Generated/ApiClient.Client.cs", "ranges": [[66707, 66707], [66709, 66709], [66715, 66715], [66734, 66734], [66754, 66754], [66762, 66765], [66776, 66776], [66778, 66778], [66781, 66781], [66800, 66800], [66820, 66820], [66828, 66828], [66830, 66830], [66842, 66842], [66863, 66863], [66883, 66883], [66903, 66903], [66924, 66924], [66944, 66944], [66961, 66961], [66982, 66982], [67002, 67002], [67019, 67019], [67040, 67040], [67060, 67060], [67077, 67077], [67098, 67098], [67118, 67118], [67135, 67135], [67156, 67156], [67176, 67176], [67193, 67193], [67214, 67214], [67234, 67234], [67251, 67251], [67272, 67272], [67292, 67292], [67309, 67309], [67330, 67330], [67350, 67350], [67367, 67367], [67388, 67388], [67408, 67408], [67425, 67425], [67446, 67446], [67466, 67466], [67483, 67483], [67504, 67504], [67524, 67524], [67541, 67541], [67562, 67562], [67582, 67582], [67599, 67599], [67620, 67620], [67640, 67640], [67657, 67657], [67678, 67678], [67698, 67698], [67715, 67715], [67736, 67736], [67756, 67756], [67773, 67773], [67794, 67794], [67814, 67814], [67831, 67831], [67852, 67852], [67872, 67872], [67889, 67889], [67910, 67910], [67930, 67930], [67947, 67947], [67968, 67968], [67988, 67988], [68005, 68005], [68026, 68026], [68046, 68046], [68063, 68063], [68084, 68084], [68104, 68104], [68121, 68121], [68142, 68142], [68162, 68162], [68179, 68179], [68200, 68200], [68220, 68220], [68237, 68237], [68258, 68258], [68278, 68278], [68295, 68295], [68316, 68316], [68336, 68336], [68353, 68353], [68374, 68374], [68394, 68394], [68411, 68411], [68432, 68432], [68452, 68452], [68469, 68469], [68490, 68490], [68510, 68510], [68527, 68527], [68548, 68548], [68568, 68568], [68585, 68585], [68606, 68606], [68626, 68626], [68643, 68643], [68648, 68651], [68654, 68656], [68659, 68661], [68664, 68665], [68668, 68671], [68674, 68676], [68679, 68681], [68684, 68685], [68688, 68688], [68690, 68692], [68694, 68694], [68701, 68703], [68706, 68709], [68712, 68714], [68717, 68719], [68722, 68723], [68726, 68729], [68732, 68734], [68737, 68739], [68742, 68743], [68746, 68746], [68748, 68750], [68752, 68752], [68759, 68761], [68764, 68767], [68770, 68772], [68775, 68777], [68780, 68781], [68784, 68787], [68790, 68792], [68795, 68797], [68800, 68801], [68804, 68804], [68806, 68808], [68810, 68810], [68817, 68819], [68822, 68825], [68828, 68830], [68833, 68835], [68838, 68839], [68842, 68845], [68848, 68850], [68853, 68855], [68858, 68859], [68862, 68862], [68864, 68866], [68868, 68868], [68875, 68877], [68880, 68883], [68886, 68888], [68891, 68893], [68896, 68897], [68900, 68903], [68906, 68908], [68911, 68913], [68916, 68917], [68920, 68920], [68922, 68924], [68926, 68926], [68933, 68935], [68938, 68941], [68944, 68946], [68949, 68951], [68954, 68955], [68958, 68961], [68964, 68966], [68969, 68971], [68974, 68975], [68978, 68978], [68980, 68982], [68984, 68984], [68991, 68993], [68996, 68999], [69002, 69004], [69007, 69009], [69012, 69013], [69016, 69019], [69022, 69024], [69027, 69029], [69032, 69033], [69036, 69036], [69038, 69040], [69042, 69042], [69049, 69051], [69054, 69057], [69060, 69062], [69065, 69067], [69070, 69071], [69074, 69077], [69080, 69082], [69085, 69087], [69090, 69091], [69094, 69094], [69096, 69098], [69100, 69100], [69107, 69109], [69112, 69115], [69118, 69120], [69123, 69125], [69128, 69129], [69132, 69135], [69138, 69140], [69143, 69145], [69148, 69149], [69152, 69152], [69154, 69156], [69158, 69158], [69165, 69167], [69170, 69173], [69176, 69178], [69181, 69183], [69186, 69187], [69190, 69193], [69196, 69198], [69201, 69203], [69206, 69207], [69210, 69210], [69212, 69214], [69216, 69216], [69223, 69225], [69228, 69231], [69234, 69236], [69239, 69241], [69244, 69245], [69248, 69251], [69254, 69256], [69259, 69261], [69264, 69265], [69268, 69268], [69270, 69272], [69274, 69274], [69281, 69283], [69286, 69289], [69292, 69294], [69297, 69299], [69302, 69303], [69306, 69309], [69312, 69314], [69317, 69319], [69322, 69323], [69326, 69326], [69328, 69330], [69332, 69332], [69339, 69341], [69344, 69347], [69350, 69352], [69355, 69357], [69360, 69361], [69364, 69367], [69370, 69372], [69375, 69377], [69380, 69381], [69384, 69384], [69386, 69388], [69390, 69390], [69397, 69399], [69402, 69405], [69408, 69410], [69413, 69415], [69418, 69419], [69422, 69425], [69428, 69430], [69433, 69435], [69438, 69439], [69442, 69442], [69444, 69446], [69448, 69448], [69455, 69457], [69460, 69463], [69466, 69468], [69471, 69473], [69476, 69477], [69480, 69483], [69486, 69488], [69491, 69493], [69496, 69497], [69500, 69500], [69502, 69504], [69506, 69506], [69513, 69515], [69518, 69521], [69524, 69526], [69529, 69531], [69534, 69535], [69538, 69541], [69544, 69546], [69549, 69551], [69554, 69555], [69558, 69558], [69560, 69562], [69564, 69564], [69571, 69573], [69576, 69579], [69582, 69584], [69587, 69589], [69592, 69593], [69596, 69599], [69602, 69604], [69607, 69609], [69612, 69613], [69616, 69616], [69618, 69620], [69622, 69622], [69629, 69632], [69634, 69634], [69637, 69640], [69643, 69645], [69648, 69650], [69653, 69654], [69657, 69660], [69663, 69665], [69668, 69670], [69673, 69674], [69677, 69677], [69679, 69684], [69686, 69686], [69688, 69688], [69695, 69703], [69705, 69710], [69713, 69716], [69719, 69721], [69724, 69726], [69729, 69730], [69733, 69736], [69739, 69741], [69744, 69746], [69749, 69750], [69753, 69753], [69755, 69760], [69762, 69765], [69767, 69773], [69775, 69778], [69780, 69783], [69785, 69788], [69790, 69790], [69792, 69792], [70147, 70150], [70152, 70152], [70155, 70158], [70161, 70163], [70166, 70168], [70171, 70172], [70175, 70178], [70181, 70183], [70186, 70188], [70191, 70192], [70195, 70195], [70197, 70200], [70202, 70202], [70209, 70212], [70214, 70214], [70217, 70220], [70223, 70225], [70228, 70230], [70233, 70234], [70237, 70240], [70243, 70245], [70248, 70250], [70253, 70254], [70257, 70257], [70259, 70267], [70269, 70269], [70271, 70271], [70278, 70282], [70287, 70288], [70291, 70294], [70297, 70299], [70302, 70304], [70307, 70308], [70311, 70314], [70317, 70319], [70322, 70324], [70327, 70328], [70331, 70331], [70333, 70337], [70339, 70339], [70346, 70350], [70355, 70356], [70359, 70362], [70365, 70367], [70370, 70372], [70375, 70376], [70379, 70382], [70385, 70387], [70390, 70392], [70395, 70396], [70399, 70399], [70401, 70405], [70407, 70407], [70414, 70418], [70423, 70424], [70427, 70430], [70433, 70435], [70438, 70440], [70443, 70444], [70447, 70450], [70453, 70455], [70458, 70460], [70463, 70464], [70467, 70467], [70469, 70473], [70475, 70475], [70526, 70529], [70531, 70531], [70534, 70537], [70540, 70542], [70545, 70547], [70550, 70551], [70554, 70557], [70560, 70562], [70565, 70567], [70570, 70571], [70574, 70574], [70576, 70579], [70581, 70581], [70588, 70592], [70594, 70595], [70598, 70601], [70604, 70606], [70609, 70611], [70614, 70615], [70618, 70621], [70624, 70626], [70629, 70631], [70634, 70635], [70638, 70638], [70640, 70645], [70647, 70653], [70655, 70655], [70657, 70657], [70664, 70667], [70669, 70669], [70672, 70675], [70678, 70680], [70683, 70685], [70688, 70689], [70692, 70695], [70698, 70700], [70703, 70705], [70708, 70709], [70712, 70712], [70714, 70719], [70721, 70721], [70723, 70723], [70741, 70742], [70745, 70748], [70751, 70753], [70756, 70758], [70761, 70762], [70765, 70768], [70771, 70773], [70776, 70778], [70781, 70782], [70785, 70785], [70787, 70792], [70794, 70794], [70812, 70813], [70816, 70819], [70822, 70824], [70827, 70829], [70832, 70833], [70836, 70839], [70842, 70844], [70847, 70849], [70852, 70853], [70856, 70856], [70858, 70863], [70865, 70865], [70885, 70888], [70891, 70893], [70896, 70898], [70901, 70902], [70905, 70908], [70911, 70913], [70916, 70918], [70921, 70922], [70925, 70925], [70927, 70931], [70933, 70933], [70940, 70946], [70948, 70951], [70954, 70957], [70960, 70962], [70965, 70967], [70970, 70971], [70974, 70977], [70980, 70982], [70985, 70987], [70990, 70991], [70994, 70994], [70996, 71004], [71006, 71006], [71008, 71008], [71015, 71018], [71020, 71020], [71023, 71026], [71029, 71031], [71034, 71036], [71039, 71040], [71043, 71046], [71049, 71051], [71054, 71056], [71059, 71060], [71063, 71063], [71065, 71070], [71072, 71072], [71074, 71074], [71081, 71084], [71086, 71086], [71089, 71092], [71095, 71097], [71100, 71102], [71105, 71106], [71109, 71112], [71115, 71117], [71120, 71122], [71125, 71126], [71129, 71129], [71131, 71134], [71136, 71136], [71261, 71264], [71266, 71266], [71269, 71272], [71275, 71277], [71280, 71282], [71285, 71286], [71289, 71292], [71295, 71297], [71300, 71302], [71305, 71306], [71309, 71309], [71311, 71314], [71316, 71316], [71323, 71327], [71329, 71330], [71333, 71336], [71339, 71341], [71344, 71346], [71349, 71350], [71353, 71356], [71359, 71361], [71364, 71366], [71369, 71370], [71373, 71373], [71375, 71380], [71382, 71388], [71390, 71390], [71392, 71392], [71399, 71402], [71404, 71404], [71407, 71410], [71413, 71415], [71418, 71420], [71423, 71424], [71427, 71430], [71433, 71435], [71438, 71440], [71443, 71444], [71447, 71447], [71449, 71454], [71456, 71456], [71458, 71458], [71475, 71475], [71477, 71477], [71480, 71483], [71486, 71488], [71491, 71493], [71496, 71497], [71500, 71503], [71506, 71508], [71511, 71513], [71516, 71517], [71520, 71520], [71522, 71527], [71529, 71529], [71546, 71546], [71548, 71548], [71551, 71554], [71557, 71559], [71562, 71564], [71567, 71568], [71571, 71574], [71577, 71579], [71582, 71584], [71587, 71588], [71591, 71591], [71593, 71598], [71600, 71600], [71622, 71625], [71628, 71630], [71633, 71635], [71638, 71639], [71642, 71645], [71648, 71650], [71653, 71655], [71658, 71659], [71662, 71662], [71664, 71671], [71673, 71673], [71675, 71675], [71695, 71698], [71701, 71703], [71706, 71708], [71711, 71712], [71715, 71718], [71721, 71723], [71726, 71728], [71731, 71732], [71735, 71735], [71737, 71741], [71743, 71743], [71750, 71756], [71758, 71761], [71764, 71767], [71770, 71772], [71775, 71777], [71780, 71781], [71784, 71787], [71790, 71792], [71795, 71797], [71800, 71801], [71804, 71804], [71806, 71814], [71816, 71816], [71818, 71818], [71825, 71830], [71832, 71834], [71837, 71840], [71843, 71845], [71848, 71850], [71853, 71854], [71857, 71860], [71863, 71865], [71868, 71870], [71873, 71874], [71877, 71877], [71879, 71885], [71887, 71890], [71892, 71892], [71894, 71894], [71901, 71904], [71906, 71906], [71909, 71912], [71915, 71917], [71920, 71922], [71925, 71926], [71929, 71932], [71935, 71937], [71940, 71942], [71945, 71946], [71949, 71949], [71951, 71956], [71958, 71958], [71960, 71960], [71967, 71970], [71972, 71972], [71975, 71978], [71981, 71983], [71986, 71988], [71991, 71992], [71995, 71998], [72001, 72003], [72006, 72008], [72011, 72012], [72015, 72015], [72017, 72022], [72024, 72024], [72026, 72026], [72033, 72037], [72039, 72040], [72043, 72046], [72049, 72051], [72054, 72056], [72059, 72060], [72063, 72066], [72069, 72071], [72074, 72076], [72079, 72080], [72083, 72083], [72085, 72091], [72093, 72093], [72095, 72095], [72102, 72105], [72107, 72107], [72110, 72113], [72116, 72118], [72121, 72123], [72126, 72127], [72130, 72133], [72136, 72138], [72141, 72143], [72146, 72147], [72150, 72150], [72152, 72155], [72157, 72157], [72164, 72167], [72169, 72169], [72172, 72175], [72178, 72180], [72183, 72185], [72188, 72189], [72192, 72195], [72198, 72200], [72203, 72205], [72208, 72209], [72212, 72212], [72214, 72217], [72219, 72219], [72226, 72229], [72231, 72231], [72234, 72237], [72240, 72242], [72245, 72247], [72250, 72251], [72254, 72257], [72260, 72262], [72265, 72267], [72270, 72271], [72274, 72274], [72276, 72279], [72281, 72281], [72288, 72291], [72293, 72293], [72296, 72299], [72302, 72304], [72307, 72309], [72312, 72313], [72316, 72319], [72322, 72324], [72327, 72329], [72332, 72333], [72336, 72336], [72338, 72343], [72345, 72345], [72347, 72347], [72354, 72357], [72359, 72359], [72362, 72365], [72368, 72370], [72373, 72375], [72378, 72379], [72382, 72385], [72388, 72390], [72393, 72395], [72398, 72399], [72402, 72402], [72404, 72407], [72409, 72409], [72633, 72636], [72641, 72641], [72644, 72647], [72650, 72652], [72655, 72657], [72660, 72661], [72664, 72667], [72670, 72672], [72675, 72677], [72680, 72681], [72684, 72684], [72686, 72691], [72693, 72693], [72695, 72695], [72702, 72705], [72707, 72707], [72710, 72713], [72716, 72718], [72721, 72723], [72726, 72727], [72730, 72733], [72736, 72738], [72741, 72743], [72746, 72747], [72750, 72750], [72752, 72757], [72759, 72759], [72761, 72761], [72768, 72770], [158610, 158610], [158613, 158620], [158623, 158630], [158645, 158645], [158648, 158654], [158657, 158663], [171133, 171135], [171137, 171140], [171143, 171143], [171145, 171145], [171149, 171149], [171183, 171189], [171191, 171197], [171199, 171199], [171202, 171204], [171207, 171209], [171212, 171214], [171217, 171222], [171224, 171225], [171228, 171231], [171234, 171239], [171242, 171244], [171247, 171250], [171253, 171254], [171257, 171260], [171263, 171264], [171267, 171269], [189136, 189136], [189168, 189168], [189242, 189242], [199221, 199223], [199225, 199225], [199228, 199231], [199234, 199235], [199238, 199241], [199245, 199440], [199442, 199443], [199446, 199447], [199450, 199453], [199456, 199460], [199462, 199463], [199466, 199467], [199470, 199473], [199476, 199480], [199482, 199483], [199486, 199487], [199490, 199492], [199499, 199502], [199507, 199509], [199512, 199514], [225082, 225090], [225092, 225092], [225095, 225097], [225100, 225103], [225106, 225108], [225111, 225114], [225117, 225119], [225122, 225124], [225127, 225129], [225132, 225134], [225137, 225139], [225142, 225144], [225147, 225149], [225152, 225154], [225157, 225159], [225162, 225164], [225167, 225169], [225172, 225174], [225177, 225179], [225182, 225184], [225187, 225189], [225192, 225194], [225197, 225199], [225202, 225204], [225207, 225209], [225212, 225214], [225217, 225219], [225222, 225224], [225227, 225229], [225232, 225234], [225237, 225239], [225242, 225244], [225247, 225249], [225252, 225254], [225257, 225259], [225262, 225264], [225267, 225269], [225272, 225274], [225277, 225279], [225282, 225284], [225287, 225289], [225292, 225294], [225297, 225299], [225302, 225304], [225307, 225309], [225312, 225314], [225317, 225319], [225322, 225324], [225327, 225329], [225332, 225334], [225337, 225339], [225342, 225344], [225347, 225349], [225352, 225354], [225357, 225358], [225361, 225364], [225367, 225369], [225372, 225375], [225378, 225379], [225382, 225385], [225388, 225390], [225393, 225396], [225399, 225400], [225403, 225406], [225409, 225411], [225414, 225415], [225418, 225421], [225424, 225426], [225429, 225430], [225433, 225436], [225439, 225441], [225444, 225448], [225450, 225451], [225454, 225457], [225460, 225462], [225465, 225466], [225469, 225472], [225475, 225477], [225480, 225481], [241080, 241080], [241091, 241091], [241106, 241106], [241819, 241819], [241823, 241823], [241833, 241833], [244152, 244152], [244154, 244163], [244165, 244171], [245366, 245366], [245437, 245437], [245495, 245496], [245809, 245816]] },
{ "path": "src/Nitro/Common/src/ChilliCream.Nitro.Client/FusionConfiguration/StageCompositionSettings.cs", "ranges": [[6, 6]] },
{ "path": "src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/FusionPublishHelpers.cs", "ranges": [[701, 701], [703, 703], [706, 706], [713, 715]] }
]
}Project coverage: 54.0% (237325/439537 lines) |
No description provided.