microsoft / AzureTRE

An accelerator to help organizations build Trusted Research Environments on Azure.
https://microsoft.github.io/AzureTRE
MIT License
169 stars 133 forks source link

Revert "Weak hashes" #4012

Closed tim-allen-ck closed 1 week ago

tim-allen-ck commented 1 week ago

Reverts microsoft/AzureTRE#3963

currently getting these errors:

Setting output 'ciGitRef: refs/pull/4011/merge
Error: Digest method not supported
    at new Hash (node:internal/crypto/hash:79:19)
    at createHash (node:crypto:139:10)
    at createShortHash (/home/runner/work/AzureTRE/AzureTRE/.github/scripts/build.js:295:16)
    at getRefIdForPr (/home/runner/work/AzureTRE/AzureTRE/.github/scripts/build.js:288:10)
    at Object.getCommandFromComment (/home/runner/work/AzureTRE/AzureTRE/.github/scripts/build.js:24:19)
    at eval (eval at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35424:16), <anonymous>:4:14)
    at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35425:12)
    at main (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35522:26)
    at /home/runner/work/_actions/actions/github-script/v7/dist/index.js:35497:1
    at /home/runner/work/_actions/actions/github-script/v7/dist/index.js:35553:3
github-actions[bot] commented 1 week ago

Unit Test Results

0 tests   0 :white_check_mark:  0s :stopwatch: 0 suites  0 :zzz: 0 files    0 :x:

Results for commit f2c95a83.

tim-allen-ck commented 1 week ago

/test

marrobi commented 1 week ago

I've reproduced this locally adding

  describe('createShortHash creates a short hash from a long hash', () => {
    test('should return the first 8 characters of the hash', () => {
      const longHash = '0123456789abcdef';
      const shortHash = 'fe5567e8';
      expect(createShortHash(longHash)).toBe(shortHash);
    }
    );
  });

to build.test.js . Will try resolve.