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

Build a better picture of our dependency graph #2649

Closed
humphd opened this issue Jan 6, 2022 · 6 comments
Closed

Build a better picture of our dependency graph #2649

humphd opened this issue Jan 6, 2022 · 6 comments
Labels
dependencies Pull requests that update a dependency file type: enhancement New feature or request

Comments

@humphd
Copy link
Contributor

humphd commented Jan 6, 2022

One of the 3.0 goals is to start being better stewards of the ecosystems we depend upon. Telescope has lots of its own code, but if you consider all of the things we use (npm modules, docker images, command line tools, libraries, frameworks, etc.), it's massive. However, we have very little visibility into it. I'd like to change that.

Students often want help finding projects to work on in OSD600/DPS909, and it would be good if we could point at a giant (dynamic) list of Issues marked bug, good first issue, help wanted`, etc.

In addition, I'd like to see us contributing fixes and features to some of these upstream projects in 2022, and helping to maintain the open source we need.

Let's begin to build this graph. At first, it could be a manual thing we create. Later, once we understand it a bit more, we can try to automate it.

Google has a neat tool for helping to find and visualize your dependencies: https://deps.dev. Here is Satellite for example: https://deps.dev/npm/%40senecacdot%2Fsatellite.

@humphd humphd added type: enhancement New feature or request dependencies Pull requests that update a dependency file labels Jan 6, 2022
@menghif
Copy link
Contributor

menghif commented Jan 13, 2022

The "Insights" tab also provides a list of GitHub links to all the dependencies we use.
https://github.com/Seneca-CDOT/telescope/network/dependencies

@humphd
Copy link
Contributor Author

humphd commented Jan 14, 2022

I really want to do this in an automated way.

Because we're now using pnpm we can use the list command to help us:

$ pnpm list --recursive --depth 2 --parseable

/Users/humphd/repos/telescope/tools/autodeployment/node_modules/.pnpm/[email protected]
/Users/humphd/repos/telescope/tools/autodeployment/node_modules/.pnpm/[email protected]
/Users/humphd/repos/telescope/tools/autodeployment/node_modules/.pnpm/[email protected]
/Users/humphd/repos/telescope/tools/autodeployment/node_modules/.pnpm/[email protected]
/Users/humphd/repos/telescope/tools/autodeployment/node_modules/.pnpm/[email protected]
/Users/humphd/repos/telescope/tools/autodeployment/node_modules/.pnpm/[email protected]
/Users/humphd/repos/telescope/tools/autodeployment/node_modules/.pnpm/[email protected]
/Users/humphd/repos/telescope/tools/autodeployment/node_modules/.pnpm/[email protected]
/Users/humphd/repos/telescope/tools/autodeployment/node_modules/.pnpm/[email protected]
/Users/humphd/repos/telescope/tools/autodeployment/node_modules/.pnpm/[email protected]
...

This gives us our dependencies, and their dependencies, up to a depth of 2 (we can go deeper if we want). With a bit of regex parsing, we can extract the package names, and then use that to query the GitHub API for bugs we could fix.

We could probably extend https://github.com/mjswensen/shoulders to do this for pnpm, since it already does most of what we need.

@JerryHue
Copy link
Contributor

I am aware that this might be a little bit too early to ask about this question, but I am wondering how the end application is going to be like.

Do we want a CLI like shoulders, which you invoke at the root of your project and extract the information from the package.json file? Or do we want a CLI that accepts a link to a GitHub repository?

@humphd
Copy link
Contributor Author

humphd commented Jan 14, 2022

I think that since Telescope is a web service and web app, we should think in those terms. Imagine a little microservice that does periodic querying of our dependencies and gets GitHub data, caches it in Redis, then uses that to create some dashboard views that users can look through.

A cool first prototype might be a list of Issues labelled "good first issue" in any of our dependencies, or their dependencies, that you can scroll though, and click to go see them on GitHub.

@JerryHue
Copy link
Contributor

I think that since Telescope is a web service and web app, we should think in those terms. Imagine a little microservice that does periodic querying of our dependencies and gets GitHub data, caches it in Redis, then uses that to create some dashboard views that users can look through.

This sounds promising! I will try to see if I can come up with anything during the weekend. If anybody else is up for this prototype, you may contact me. I'd love to discuss it further.

@TDDR
Copy link
Contributor

TDDR commented Jan 20, 2022

Related discussion #2666

@TDDR TDDR closed this as completed Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants