Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-2007

Improve mongosh build helpers dependency injection

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.4.2
    • Affects Version/s: None
    • Component/s: None
    • None
    • 1
    • Iteration Venus, Iteration Wormhole
    • Not Needed
    • Developer Tools

      A lot of the helper do dependency injection by using some of its arguments to optionally pass other (stubbed) helpers. This is getting out of hand and now we have things like

       

      export async function publishMongosh(
        config: Config,
        mongoshGithubRepo: GithubRepo,
        mongodbHomebrewForkGithubRepo: GithubRepo,
        homebrewCoreGithubRepo: GithubRepo,
        barque: Barque,
        createAndPublishDownloadCenterConfig: typeof createAndPublishDownloadCenterConfigFn,
        publishToNpm: typeof publishToNpmType,
        pushTags: typeof pushTagsType,
        writeBuildInfo: typeof writeBuildInfoType,
        publishToHomebrew: typeof publishToHomebrewType,
        shouldDoPublicRelease: typeof shouldDoPublicReleaseFn = shouldDoPublicReleaseFn,
        getEvergreenArtifactUrl: typeof getArtifactUrlFn = getArtifactUrlFn,
        bumpMongoshReleasePackages: typeof bumpMongoshReleasePackagesFn = bumpMongoshReleasePackagesFn,
        bumpAuxiliaryPackages: typeof bumpAuxiliaryPackagesFn = bumpAuxiliaryPackagesFn,
        spawnSync: typeof spawnSyncFn = spawnSyncFn 

      We should restructure this, perhaps to use something more object oriented and not require so much back and forth when adding and using new helpers.

       

            Assignee:
            gagik.amaryan@mongodb.com Gagik Amaryan
            Reporter:
            gagik.amaryan@mongodb.com Gagik Amaryan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: