Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-8760

[FROM] Add support for an UPDATE_CHECKER_ALLOW_DOWNGRADES env var to UpdateChecker

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: None
    • None
    • Not Needed
    • Developer Tools

      https://github.com/10gen/compass-mongodb-com/blob/f8ab0eb95db97295950e04456a9a06b50b579e56/src/update-checker.js#L70

       

       

        async checkForUpdates(channel, fromVersion) {
          // awaits the first refresh
          const latest = await this.getLatest(channel);
          if (!latest) {
            return;
          }
          if (process.env.UPDATE_CHECKER_ALLOW_DOWNGRADES === 'true') {
            if (fromVersion !== latest.version) {
              return latest;
            }
          }
          if (semver.lt(fromVersion, latest.version)) {
            return latest;
          }
        }
      

       

       

      This should allow us to test auto-update by downgrading from the version being built in the PR or beta or GA CI run to the latest dev, beta or stable release.

       

            Assignee:
            leroux.bodenstein@mongodb.com Le Roux Bodenstein
            Reporter:
            leroux.bodenstein@mongodb.com Le Roux Bodenstein
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: