Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: merge staging to master #411

Merged
merged 195 commits into from
Sep 26, 2022
Merged

ci: merge staging to master #411

merged 195 commits into from
Sep 26, 2022

Conversation

MatrixAI-Bot
Copy link
Member

This is an automatic PR generated by the pipeline CI/CD. This will be automatically fast-forward merged if successful.

emmacasolin and others added 10 commits July 12, 2022 11:34
- Includes test suites that failed to run
- Adds separator between names of nested describes
Introduced sharding for macOS and Windows runners and test directory pipelines for Linux runner
Stopped Mac CI jobs from updating dependencies since this was increasing setup time
Optimised Windows CI/CD setup by internalising and caching chocolatey packages

Fixes #397
Test load balancing (migrating changes from TypeScript-Demo-Lib)
@MatrixAI-Bot MatrixAI-Bot self-assigned this Jul 12, 2022
@MatrixAI-Bot
Copy link
Member Author

@CMCDragonkai
Copy link
Member

CMCDragonkai commented Jul 12, 2022

…deGraphEmptyDatabase` with empty network

`getClosestGlobalNodes` was throwing `ErrorNodeGraphEmptyDatabase` when it failed to get new nodes during the search process. Now it just returns undefined as expected.

Related #398
@MatrixAI-Bot
Copy link
Member Author

@MatrixAI-Bot
Copy link
Member Author

@MatrixAI-Bot
Copy link
Member Author

@CMCDragonkai
Copy link
Member

Is there a way to also disable the CI when we have a wip or WIP as the prefix to the commit message?

@CMCDragonkai
Copy link
Member

CMCDragonkai commented Sep 26, 2022

The this.basePath used in side NodeManager should just use this.constructor.name.

And all public properties should be up top of the class. Try to give some spacing between the arrow function properties though especially since they are going to have docblocks subsequently.

@tegefaulkes
Copy link
Contributor

The scratch is passing.

INFO:NodeManager test:checking names
INFO:NodeManager test:NodeManager.refreshBucketHandler
INFO:NodeManager test:NodeManager.gcBucketHandler
INFO:NodeManager test:NodeManager.pingAndSetNodeHandler
INFO:NodeManager test:end of names

https://gitlab.com/MatrixAI/open-source/Polykey/-/jobs/3081733042

@tegefaulkes
Copy link
Contributor

BUT it's failing in the nodes domain.

  ● NodeManager test › Should have unique HandlerIds
    expect(received).not.toEqual(expected) // deep equality
    Expected: not "NodeManager."
      1052 |       logger,
      1053 |     });
    > 1054 |     expect(nodeManager.gcBucketHandlerId).not.toEqual(
           |                                               ^
      1055 |       nodeManager.refreshBucketHandlerId,
      1056 |     );
      1057 |     expect(nodeManager.gcBucketHandlerId).not.toEqual(
      at Object.<anonymous> (tests/nodes/NodeManager.test.ts:1054:47)

@CMCDragonkai
Copy link
Member

CMCDragonkai commented Sep 26, 2022

Ok investigating that later, move to the docker stuff.

It's interesting that basically the constructor name is fine, but the arrow function property name is not.

@MatrixAI-Bot
Copy link
Member Author

Pipeline Attempt on 650341300 for 724fd12

https://gitlab.com/MatrixAI/open-source/Polykey/-/pipelines/650341300

@tegefaulkes
Copy link
Contributor

The Docker integration tests should be passing now. it will take a while for the CI to confirm this.

@MatrixAI-Bot
Copy link
Member Author

Pipeline Attempt on 650368198 for 9a58452

https://gitlab.com/MatrixAI/open-source/Polykey/-/pipelines/650368198

@MatrixAI-Bot
Copy link
Member Author

Pipeline Attempt on 650409110 for ec5aa57

https://gitlab.com/MatrixAI/open-source/Polykey/-/pipelines/650409110

@MatrixAI-Bot
Copy link
Member Author

Pipeline Attempt on 650466358 for c918000

https://gitlab.com/MatrixAI/open-source/Polykey/-/pipelines/650466358

@MatrixAI-Bot
Copy link
Member Author

Pipeline Succeeded on 650466358 for c918000

https://gitlab.com/MatrixAI/open-source/Polykey/-/pipelines/650466358

@CMCDragonkai
Copy link
Member

Avoid wip commits on staging, one it is on staging, we generally don't squash history. We just roll forward.

@MatrixAI-Bot
Copy link
Member Author

Pipeline Attempt on 650511030 for de75773

https://gitlab.com/MatrixAI/open-source/Polykey/-/pipelines/650511030

@CMCDragonkai
Copy link
Member

To finish up 5. #411 (comment) we need to do a prerelease tag to observe the GH release page.

Remember the steps are:

npm version prerelease --preid alpha
git push --follow-tags

@CMCDragonkai
Copy link
Member

To finish 4. #411 (comment), make sure to only disable the discovery tests. Apparently you don't need to disable the tests/nat?

@CMCDragonkai
Copy link
Member

It looks like swc-jest is choking on decorator syntax: https://gitlab.com/MatrixAI/open-source/Polykey/-/jobs/3083242775

  ● Test suite failed to run
      x Unexpected token `@`. Expected this, import, async, function, [ for array literal, { for object literal, @ for decorator, function, class, null, true, false, number, bigint, string, regexp, `
      | for template literal, (, or an identifier
        ,-[/builds/MatrixAI/open-source/Polykey/src/acl/ACL.ts:22:1]
     22 | @CreateDestroyStartStop(
        : ^
        `----

@CMCDragonkai
Copy link
Member

CMCDragonkai commented Sep 26, 2022

Ok I think I remember what the problem was.

  1. ts-node uses swc, and properly fulfills the swc config
  2. swc by itself does not respect tsconfig.json
  3. which means swc needs its own configuration

Need to create something like this https://swc.rs/docs/configuration/swcrc

Map it from our current tsconfig.json. We could do this dynamically inside jest.config.js by putting it into the config parameter:

const fs = require('fs')

const config = JSON.parse(fs.readFileSync(`${__dirname}/.swcrc`, 'utf-8'))

module.exports = {
  transform: {
    '^.+\\.(t|j)sx?$': ['@swc/jest', { ...config, /* custom configuration in Jest */ }],
  },
}

@CMCDragonkai
Copy link
Member

@tegefaulkes please create an issue for the arrow function property names that occurred in the NodeManager.

Also can you keep track of all the tests that been disabled, this should be done in #441.

@MatrixAI-Bot
Copy link
Member Author

Pipeline Succeeded on 650511030 for de75773

https://gitlab.com/MatrixAI/open-source/Polykey/-/pipelines/650511030

@MatrixAI-Bot MatrixAI-Bot merged commit de75773 into master Sep 26, 2022
@CMCDragonkai
Copy link
Member

Ok this PR closed, all the remaining comments above, we will do on the next staging commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants