-
Notifications
You must be signed in to change notification settings - Fork 4
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 #379
Conversation
Pipeline Attempt on 556276084 for 36ebf1e https://gitlab.com/MatrixAI/open-source/js-polykey/-/pipelines/556276084 |
@emmacasolin You will need to merge #374 into this first. Then afterwards rebase your CI/CD changes on top. There's more changes that depend on #374, so you'll need to sync up the |
Also I haven't added all the branch and tag protection for this, but we can do this afterwards, this allows you force push to the staging branch while making it work. Afterwards staging will be protected so no force pushing allowed. Tag releases can be tested later. I'd suggest disabling the auto merge into master job: The codesee bot won't work until it's been merged to master branch and I configure codesee service to use this repo. |
@emmacasolin please change the
We will have to continue using child pipelines. As for macos and windows runners, those ones will not be able to use child pipelines atm, they have to use 58 and 55. Since running the tests may run out of memory or take too long, you should just disable those tests for now as in comment out So merge #374 first, then rebase CI/CD integration work as a single commit on top, so that #378 can be merged on top too. |
Pipeline Attempt on 557054250 for 03ef425 https://gitlab.com/MatrixAI/open-source/js-polykey/-/pipelines/557054250 |
Pipeline Attempt on 557140769 for 1948a2e https://gitlab.com/MatrixAI/open-source/js-polykey/-/pipelines/557140769 |
Pipeline Attempt on 557153112 for 5357ef2 https://gitlab.com/MatrixAI/open-source/js-polykey/-/pipelines/557153112 |
Pipeline Attempt on 557159326 for 8302080 https://gitlab.com/MatrixAI/open-source/js-polykey/-/pipelines/557159326 |
Pipeline Attempt on 557187293 for 64a2bee https://gitlab.com/MatrixAI/open-source/js-polykey/-/pipelines/557187293 |
Our "postbuild": "cp -fR src/proto dist; cp src/notifications/*.json dist/notifications/; cp src/claims/*.json dist/claims/; cp src/status/*.json dist/status/;", |
You might need to replace the Actually I just found https://github.com/shelljs/shx. Perhaps we can swap over our commands to using |
It only needs to be a dev dependency, and then you should be able to do Furthermore we would have to keep using The |
Are child pipelines working again? It should be the same as before in |
Yeah they look like they are. I've taken tests out of all of the build stages for now and made it so that |
The It's just we want the 2 incremental testing and test load balancing resolved so that we can apply the full tests for all platforms. |
The |
I know, but I don't think there's a nice way to have |
Oh yea building a distribution for each child test job would be unnecessary. In that case, once we have load balancing, we'd just have a separate job just to do building vs the load balanced test jobs. Ok once you're think it can proceed, you should squash, then allow @tegefaulkes to rebase again, and then you can attempt the conditional testing or test load balancing. The issue has more details: MatrixAI/TypeScript-Demo-Lib#58 They both would involve getting into the guts of jest. |
Pipeline Attempt on 557211847 for 2de65ac https://gitlab.com/MatrixAI/open-source/js-polykey/-/pipelines/557211847 |
Do note that gitlab has a CI/CD linter. You can always check if your syntax is correct by going to https://gitlab.com/MatrixAI/open-source/js-polykey/-/ci/editor?branch_name=master. Also instead of letting bad jobs run to completion, just force cancel them on the CI/CD control panel. |
Pipeline Attempt on 557223234 for b076c77 https://gitlab.com/MatrixAI/open-source/js-polykey/-/pipelines/557223234 |
Pipeline Attempt on 557243759 for 3e53a38 https://gitlab.com/MatrixAI/open-source/js-polykey/-/pipelines/557243759 |
I wasn't able to replace
|
I believe |
Pipeline Attempt on 558227681 for 64edb1b https://gitlab.com/MatrixAI/open-source/js-polykey/-/pipelines/558227681 |
Pipeline Attempt on 558242987 for a8b70a7 https://gitlab.com/MatrixAI/open-source/js-polykey/-/pipelines/558242987 |
Pipeline Attempt on 558261667 for 114e9c1 https://gitlab.com/MatrixAI/open-source/js-polykey/-/pipelines/558261667 |
@@ -50,6 +50,7 @@ | |||
"types": "dist/index.d.ts", | |||
"pkg": { | |||
"assets": [ | |||
"node_modules/jose/**/*", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't know why jose
is needed. But you won't be able to tell until you actually run the final program. I recommend leaving it here until we verify why jose
as an asset is required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't find any native addons or JSON files except for package.json
in jose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will require a manual check until we have integration testing for the built binaries.
Now that nodes add the details of a node that contacts them, we no longer need the `edmSimple` configuration to do this manually.
General linting, using capitals for constants in NAT utils, and lowercase test descriptions
A relay node for a hole punch message was previously not modifying the proxy address in the message (which is the "return address" used to contact the source node). For nodes behind a NAT, who do not know their own public address, they rely on this overwriting so that nodes do not try to contact them on their private, inaccessible address.
This will allow us to disable the queue for testing.
the composed flag was set at the beginning of the compose function causing another function to throw an error due to an undefined property if it was called at the same time.
Tests for NAT-Traversal and Hole-Punching
Pipeline Attempt on 571929881 for d60ab44 https://gitlab.com/MatrixAI/open-source/js-polykey/-/pipelines/571929881 |
Now that we have NAT testing merged, we focus on the top priority tasks in the PR description. I'll reference the long term tasks #381 (comment) to figure out after testnet is deployed.
|
Ok, so the problem with the application build is that the shebang for the So the question is, why is this not getting patched? I've seen that the scripts in the scripts directory are getting patched. but this is happening before the main script within The application build is slightly different from the other builds. Where the other builds are using I'm digging into it further. |
The solution is to make chmod u+x,g+x ./src/bin/polykey.ts
chmod u+x,g+x ./src/bin/polykey-agent.ts Any files that have the shebang, would need to be made executable at the source-level in order to ensure that they get rewritten. It's a bit roundabout, since one would expect the This is because due to nodev16 and the new npmv8, the node2nix doesn't understand how to generate the executables anymore. So I worked around it, and generated the bin symlinks myself in the And I must have missed this, because TS demo lib already had their executable files made executable at source-level. Remember
There's a related issue which is: microsoft/TypeScript#26060, and that's why we cannot just directly execute the |
That fixed it. And I was thinking it was a problem with the nix build files... More fuel for disliking side effects I guess. I'll push up the fix in a sec. |
Can you also expand the todo list above with these fixes. |
Problem was to do with the `nix-build` process not patching the shebangs of the `polykey.js` script. this resulted in it failing to run due to not finding node in it's environment. The fix was to make `src/bin/polykey.js` and `src/bin/polykey-agent.ts` executable.
Pipeline Attempt on 574480988 for 0bc3af5 https://gitlab.com/MatrixAI/open-source/js-polykey/-/pipelines/574480988 |
Pipeline Succeeded on 574480988 for 0bc3af5 https://gitlab.com/MatrixAI/open-source/js-polykey/-/pipelines/574480988 |
So the |
I feel that |
|
Yea that would be part of #194. As for fixing up integration build job involving
This does require a separate issue. |
Now that this is merged, I'm going to do #5 (comment) tonight. @emmacasolin @tegefaulkes beware of repo URL and repo name change. |
This is an automatic PR generated by the pipeline CI/CD. This will be automatically fast-forward merged if successful.
@tegefaulkes @emmacasolin some todos left here:
build:mac
job to evaluate the homebrew shell environment - @tegefaulkes[ ] test load balancing and fixing up coverage reports again in the CI/CD- @emmacasolin has already made some progress on this - to be done in Test load balancing - parallelize jest tests TypeScript-Demo-Lib#58 and Test load balancing using jest's--shard
option TypeScript-Demo-Lib#65 (new PR to be created by @emmacasolin)pkg.js
, use the debug log and find out why pkg is failing to package PK - @tegefaulkestslib
, later issue to investigate and work out integration ofesbuild
or similar bundlerpkg
bundling so that it is not bundling useless markdown files (combine with esbuild?) Polykey-CLI#23[ ] add in integration tests for windows/macos/ubuntu- to be done in Integration tests for deploy targets on all deployment platforms (docker, linux/ubuntu, windows, macos) Polykey-CLI#10leveldown
is causing segfaults, but it's being replaced in js-dbintegration:nix
job. The shebangs forbin/polykey.js
was not getting patched during thenix-build
process. The fix was to makebin/polykey.ts
andbin/polykey-agent.ts
executable.integration:docker
. This was the same problem as above.[ ] deployment jobs - AWS - testnet deployment needs me involved- @tegefaulkes - to be done in Testnet Node Deployment (testnet.polykey.io) #194[ ] release jobs - check prerelease and release jobs are working by pushing up a tag with- @tegefaulkes - to be done in Verify that pre-release and release jobs work #390git push --follow-tags
As long as we can deploy to testnet, then we want to merge this into master branch, so we can start new feature branches from the new features.
Once merged to master branch, it's time to do rename this to
Polykey
to match #5 (comment). Then to update the CI/CD mirror repository links and integrate codesee.Some side-issues to be addresses if they help us achieve the primary goals above:
ts-node
withswc
to speed up ourts-node
executions and remove the typescript node cacheesbuild
to workaround issues with usingpkg
as a bundlernpm link
on our native addons to enable debug builds when debugging