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

Split JavaScript Agent in its own repo #958

Closed
16 tasks done
hansl opened this issue Aug 25, 2020 · 4 comments · Fixed by #981
Closed
16 tasks done

Split JavaScript Agent in its own repo #958

hansl opened this issue Aug 25, 2020 · 4 comments · Fixed by #981

Comments

@hansl
Copy link
Contributor

hansl commented Aug 25, 2020

Statuses:

  • 2020-09-02: Both PRs below ready for review and requsted from @hansl. [e2e/nix] is (I think) the only jobs broken, which I started digging into in rm-agent-js-build. But I need to pause and work on Create a project to prototype interactions between WebAuthn keys + ic replica. #989 today w/ @stanleygjones direction.
  • 2020-08-31: Spent a lot of time Thursday, Friday wrestling with trying to get nix/hydra to build the lerna parts of dfinity-lab/agent-js to no avail. I synced with Hans this morning, and we decided to not use lerna for now, since it's not strictly needed. At least initially, we don't need this to be a monorepo of many packages. We only need it to be a home for the @dfinity/agent package. Next: Remove lerna and see if that makes it ez to pull this in from sdk nix.

Pull Requests:


Subtasks

In Progress

This includes (might be out of order, also maintained by @gobengo):

  • use npm and lerna for managing multiple packages + versions
  • copy the agent code from dfinity-lab/sdk to a package in dfinity-lab/agent-js
    • Later, we'll want to do another pass to copypsta any changes to the agent that happen between now and when we're ready to do call this repo the source of truth. In service of this, it may be useful to enumerate any deviations between what we want to publish in this repo and what's happening in the sdk until now. So far the only differences are:
      • None, but I'm asking @hansl if I should maybe remove INTERNAL.adoc and default.nix
    • Later, we'll need to remove the js agent from the sdk, since it should now only live here
  • setup GitHub Workflows for tests of the new repo
  • setup GitHub Workflows to lint git commit messages of new repo
  • setup a local git commit hook to ensure linted commit messages
    • remove this. We don't need to enforce this on every single commit. @hansl says to only enforce it in PR titles, then ensure all commits to master are squashed PRs whose titles are conventionalcommit titles. (bengo: I kinda like having this so punting on removing this until the end, if i must).
  • Add Mergeify config file so it works (first working)
  • Add conventional PR checking like in agent-rust
  • move the bootstrap code from dfinity-lab/sdk to a package in dfinity-lab/agent-js: https://github.com/dfinity-lab/agent-js/tree/master/packages/bootstrap
    • We do not need to preserve git commit history for any code
  • updating sdk nix rules to use @dfinity/agent
    • in doing this, we realized it is very hard for our nix to build this repo if it uses lerna, so we decided to not use it for now
  • update js_agent_version variable in dfx new to reflect a github link instead of the dfx version
  • If possible, have the GitHub Actions check to make sure we use https://www.conventionalcommits.org/en/v1.0.0/
  • Add first draft of GitHub workflow to monorepo to do lerna publish to release to npm
    • do final pass of how we want this to work and drive releases

Maybe

bengo proposes punting these incomplete tasks to followup issues:

@chenyan-dfinity
Copy link
Contributor

dfinity-lab/agent-js or dfinity/agent-js? Does this also mean that we are open sourcing the repo?

Regarding the Candid stuff, the Candid UI in bootstrap can also move to Candid repo. Not sure if it's easy to do though. I think dfx still needs to bundle the boostrap code, because dfx start needs it.

@hansl
Copy link
Contributor Author

hansl commented Aug 25, 2020

Let's start with the candid core stuff first. Tell us where you'd like it to live.

For the repo it will be like agent-rust; private for now but open source ready so we can move it as soon as we can.

@chenyan-dfinity
Copy link
Contributor

Okay, I think it make sense to move everything to agent-js first. I can then move the candid related stuff out.

@gobengo
Copy link
Contributor

gobengo commented Aug 25, 2020

monorepo exists. https://github.com/dfinity-lab/agent-js/

Will be working on packages/agent in there initially, then others. Probably in a feature branch most of the time, probably 'agent' to start. Onboarding a lot this week, so will be moving slow between meetings at first.

@mergify mergify bot closed this as completed in #981 Sep 9, 2020
mergify bot pushed a commit that referenced this issue Sep 9, 2020
#981)

Implement sdk parts of #958:
* Move `./src/agent/javascript` to https://github.com/dfinity-lab/agent-js/tree/master/packages/agent
* Move `./src/bootstrap` to https://github.com/dfinity-lab/agent-js/tree/master/packages/bootstrap
* Add [./nix/agent-js/agent-js-monorepo.nix](./nix/agent-js/agent-js-monorepo.nix) that knows how to build the monorepo using nix
dfinity-bot added a commit that referenced this issue Jul 9, 2021
## Changelog for advisory-db:
Branch: main
Commits: [rustsec/advisory-db@cbeaf18e...4792a373](rustsec/advisory-db@cbeaf18...4792a37)

* [`1889bffd`](rustsec/advisory-db@1889bff) prost-types: Timestamp conversion overflow ([RustSec/advisory-db⁠#954](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/954))
* [`76294321`](rustsec/advisory-db@7629432) Assigned RUSTSEC-2021-0073 to prost-types ([RustSec/advisory-db⁠#955](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/955))
* [`a9c31a6e`](rustsec/advisory-db@a9c31a6) Hotfix [RustSec/advisory-db⁠#957](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/957) until we figure out what to do with it ([RustSec/advisory-db⁠#958](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/958))
* [`3533e434`](rustsec/advisory-db@3533e43) Add rust-ammonia/ammonia[RustSec/advisory-db⁠#142](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/142) ([RustSec/advisory-db⁠#956](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/956))
* [`2d60adf5`](rustsec/advisory-db@2d60adf) Assigned RUSTSEC-2021-0074 to ammonia ([RustSec/advisory-db⁠#959](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/959))
* [`730c1e81`](rustsec/advisory-db@730c1e8) Revert "Hotfix [RustSec/advisory-db⁠#957](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/957) until we figure out what to do with it ([RustSec/advisory-db⁠#958](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/958))" ([RustSec/advisory-db⁠#960](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/960))
* [`674daf6f`](rustsec/advisory-db@674daf6) `ark_r1cs_std::mul_by_inverse` generated unsound constraints in versions below `0.3.1` ([RustSec/advisory-db⁠#961](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/961))
* [`4792a373`](rustsec/advisory-db@4792a37) Assigned RUSTSEC-2021-0075 to ark-r1cs-std ([RustSec/advisory-db⁠#962](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/962))
mergify bot pushed a commit that referenced this issue Jul 21, 2021
## Changelog for advisory-db:
Branch: main
Commits: [rustsec/advisory-db@cbeaf18e...4792a373](rustsec/advisory-db@cbeaf18...4792a37)

* [`1889bffd`](rustsec/advisory-db@1889bff) prost-types: Timestamp conversion overflow ([RustSec/advisory-db⁠#954](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/954))
* [`76294321`](rustsec/advisory-db@7629432) Assigned RUSTSEC-2021-0073 to prost-types ([RustSec/advisory-db⁠#955](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/955))
* [`a9c31a6e`](rustsec/advisory-db@a9c31a6) Hotfix [RustSec/advisory-db⁠#957](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/957) until we figure out what to do with it ([RustSec/advisory-db⁠#958](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/958))
* [`3533e434`](rustsec/advisory-db@3533e43) Add rust-ammonia/ammonia[RustSec/advisory-db⁠#142](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/142) ([RustSec/advisory-db⁠#956](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/956))
* [`2d60adf5`](rustsec/advisory-db@2d60adf) Assigned RUSTSEC-2021-0074 to ammonia ([RustSec/advisory-db⁠#959](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/959))
* [`730c1e81`](rustsec/advisory-db@730c1e8) Revert "Hotfix [RustSec/advisory-db⁠#957](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/957) until we figure out what to do with it ([RustSec/advisory-db⁠#958](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/958))" ([RustSec/advisory-db⁠#960](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/960))
* [`674daf6f`](rustsec/advisory-db@674daf6) `ark_r1cs_std::mul_by_inverse` generated unsound constraints in versions below `0.3.1` ([RustSec/advisory-db⁠#961](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/961))
* [`4792a373`](rustsec/advisory-db@4792a37) Assigned RUSTSEC-2021-0075 to ark-r1cs-std ([RustSec/advisory-db⁠#962](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/962))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants