Git Product home page Git Product logo

microsoft / opensource-management-portal Goto Github PK

View Code? Open in Web Editor NEW
478.0 35.0 122.0 11.45 MB

Microsoft's monolithic, opinionated Open Source Management Portal enabling enterprise scale self-service powered by the GitHub API πŸ”πŸ§‘β€πŸ’»πŸ§°

Home Page: https://jeffwilcox.blog/2019/06/scaling-25k/

License: MIT License

JavaScript 1.26% CSS 0.42% Dockerfile 0.13% TypeScript 83.13% PLpgSQL 0.33% Less 0.27% SCSS 0.01% Pug 14.46% Shell 0.01%
portal github management github-app microsoft ospo

opensource-management-portal's Introduction

Open Source Management Portal

This application represents the home for open source engineering experiences at Microsoft. As a backend application it manages source of truth for many types of corporate open source metadata, historical intent of repos and projects, hosts a rich front-end, and also a set of APIs used by partner teams.

While we prefer native GitHub experiences, when it comes to displaying certain info and being more transparent about permissions and metadata, especially on GitHub, which has no extensible user interface, we end up using and driving people to this Open Source Management Portal to get the information they need.

At Microsoft, 50,000 engineers are using a version of this portal as part of their open source engineering experience. However, Microsoft does have a set of "company-specific" extensions, including a separate React frontend client, that are not currently part of this repository. And... yup, if we were to start over today, we'd probably make this a Next.js-or-similar project.

Core capabilities and features of this application:

  • Linking GitHub accounts ⛓️ for enterprise use
  • Self-service GitHub organization joining πŸ™‹ for engineers
  • Creating and managing GitHub open source repositories πŸ‘©β€πŸ’»
  • Displaying transparent information, metrics, and company-specific data about our GitHub open source presence around permissions, access, metadata, intent, and especially cross-organization views and search indexes
  • People inventory πŸ‘¨β€πŸ¦³πŸ§‘β€πŸš€πŸ§’πŸ½ to help people connect GitHub public logins with corporate identities
  • Intercepting forks and new repositories πŸ” to inject compliance and approval processes
  • Disable and enable πŸ”‘ experiences for GitHub repositories
  • Just-in-time (JIT) access πŸšͺ for open source repositories, teams, and organizations, aligning with the principle of least privilege access
  • Sudo ⚑️ capabilities for repos, teams, organizations to remove persistent broad ownership and admin permissions
  • Hosting APIs 🍽️ to create repos, large-scale orgs to access link data, and reports
  • Background jobs πŸ‘·β€β™‚οΈ to maintain eventual consistency, run tasks, gather metrics, and prepare OKRs
  • Team join requests/approvals with context πŸšͺ building beyond the GitHub experience
  • Automated offboarding πŸ›Ά when people take on new opportunities

At Microsoft, additional capabilities include:

  • Pre-release business and legal approvals to release projects πŸ§‘β€βš–οΈ
  • Requesting contribution reviews ✍🏾 within policy
  • Service Tree and Direct Owners inventory 🌳 for showing accountable ownership information for repos when available
  • Hosting internal docs πŸ“š at aka.ms/opensource
  • Hosting a subset of opensource.microsoft.com's APIs 🌍 to bring to life the Microsoft open source presence

The management portal is designed to be fast, efficient, and get out of the way of engineers to get their important work done, with an emphasis on relentless automation and delegation.

Most of the experience is eventually consistent; however, operational actions such as joining teams, orgs, sudo operations, etc., are fully consistent at the time they are requested.

Implementation Details and More Docs

Please see the docs/ sub-folder, including docs/index.md.

API

Please see the docs/api.md file for information about the current API.

Application stack for learning

As a TypeScript/Node.js backend application, with a React frontend, the management portal also serves as a learning opportunity for Microsoft's engineering systems teams to understand the experience that non-.NET stack applications may have. The 1ES+OSPO teams partner to ship the application based on essentially a fork of this open source repo.

As of 2022, the backend site is hosted by Azure App Service with Linux containers, while the background cronjobs and daemons run in Azure Kubernetes Service (AKS) clusters. All containers are built on top of the CBL Mariner distro.

The app started as a hackathon project in an ancient JavaScript era full of "callback hell", and has evolved through to third-party promise libraries to native ECMAScript promises and to TypeScript. So it both shows its age, and, is, interesting.

Web app authentication

The primary authentication for the site is Azure Active Directory for corporate users.

The secondary authentication is GitHub. This allows users not using GitHub to fully explore the site, link, and otherwise be productive.

In theory, open source friends, this project could be made a bit more extensible. In the past, we prototyped Google authentication, as an example, for the primary aspect. Contributions welcome!

APIs can use either JWTs or an active web app session in some cases, used by the React frontend.

Configuration ⛳️

Many feature flags exist.

Please see docs/configuration.md

Jobs πŸ’Ό

Please see docs/jobs.md

Service dependencies

  • GitHub organization(s)
  • Hosting environment
  • Background job environment for eventual consistency work and maintenance cronjobs
  • Daemon hosting for near-real-time process
  • Queue system
  • A cache system or multi-tiered cache implementation
  • Azure Active Directory and the Microsoft Graph
  • An email service to send mail
  • Optional insights or telemetry system

Source of truth store πŸ§‘β€βš–οΈ

The backend maintains in a data store of your choice key metadata for repositories, links, and general compliance info. The backend supports natively Azure Storage, Azure Table, Azure CosmosDB, and Postgres.

At Microsoft we currently use Postgres for source of truth including:

  • GitHub organization configuration
  • corporate GitHub repository metadata
  • corporate identity-to-GitHub login links
  • compliance metadata (enable/disabled repos)

Respecting the GitHub API

To be friendly to GitHub, we strive to be very efficient and fair in our use of the GitHub API. We cache as much as we can, and have a native concept of building on top of GitHub's Conditional Request best practice for GitHub Apps: whenever possible, we send the e-tag for a request, and we will use our cache for many types of operations.

For long multi-page GitHub REST API v3 responses, we will maintain a cache of those responses and rebuild them slowly in the background, as the site is eventually consistent for most views.

For operational work, a real-time API call is used to continue to be accurate and secure when working around granting access or managing access to superuser features.

Cache

The primary cache layer is backed by CosmosDB documents, in a hybrid approach where larger documents fallback to Azure Storage (blob). Redis is also supported for open source users of the site.

Background event processing firehose and cronjobs

There are at least 2 ongoing single-instance daemonsets and many cronjobs that also keep the site efficient, up-to-date, and gather important info.

The daemons:

  • Firehouse: webhook event processing from a queue for eventual consistency and reacting to GitHub events around compliance/audit/scale/management
  • Just-in-time: JIT revocations, audit log event gathering, and analysis

Example cronjobs:

  • Make sure caches are primed occasionally
  • Remind people to setup or delete repos
  • Automatically delete repos that are not setup in a time window
  • Disabling repos out of compliance
  • Collecting data and metrics for reports and user interface experiences
  • Backing up link data
  • Prepare stats for an OKR

About the firehose in detail

While the original portal works fine for very small GitHub presences, it was designed around the idea that the cache would fill, while respecting the GitHub REST API by using Conditional Requests, and being very eventually consistent.

However, the REST API v3 (non-GraphQL client) maximum size for a page of results is 100 entries, which ... is very painful if you have tens of thousands of anything.

The "firehose" is designed to be run either within the app itself, or as a secondary app processing results. At Microsoft, we use a service bus to process webhook events from GitHub, since we have a robust webhook ingestion mechanism elsewhere. The firehose runs as a daemon that pulls off the queue and works to keep the "query cache" primed with newer information than the REST API may have in some cases.

What this improves:

  • The user views of the orgs, repos, teams they are added to and have access to
  • Cross-organization views and querying

The firehose and query cache are not used for important or auth-style scenarios:

  • Query cache is not used to make permission decisions
  • Query cache is not used to authorize access to administrative functions

We did at one point design the idea of having a /webhook endpoint and validating the webhook signatures before processing hooks for simple app hosting, but it's slightly broken right now and disabled at Microsoft.

Dev prep, build, deploy

Install Node packages

Make sure to include dev dependencies.

The default assets package is a super ancient Bootstrap and jQuery app that in theory provides basic skin for the site, favicons, graphics, etc. However, it's ... really, really, really old. Microsoft discards the default-assets-package, using a different set of assets, so you've been mildly warned.

The main module of the defined default-assets-package should resolve to the path to serve content from. Since the default version uses [ancient] Grunt to build the assets, it returns the __dirname + /public, which is the output/built location for Grunt.

npm install
cd default-assets-package
npm install

Build

npm run build

You need to rebuild the default-assets-package if you change something. see Static Site Assets

Codespaces instructions

You will likely want to use a defined environment to save time spinning up many variables, follow one of the below paths:

  • GitHub Codespaces account-level secrets for your environment variables as well
  • use a .env file up a folder from the cloned repository in your Codespace environment
  • configure environment variables once the devcontainer boots
  • GitHub Codespaces repo-specific secrets

Whether as a secret or in the ../env from the root, set

  • CONFIGURATION_ENVIRONMENT: development (or similar)

Then, you'll also need to make sure authentication will work when redirecting to the running Codespaces environment.

GitHub authentication

You'll want to bring your own GitHub App and use its client ID and client secret for authentication. Configure your account-specific Codespace secrets.

  • CODESPACES_GITHUB_AUTHENTICATION_ENABLED: set to 1 to enable
  • CODESPACES_GITHUB_CLIENT_ID: the client ID
  • CODESPACES_GITHUB_CLIENT_SECRET: the client secret

Configure the secrets for your fork and/or this repository as necessary. The redirect URL will be dynamically generated and included in the startup debug output. Make sure that the hostname is an appropriate callback URL for the GitHub app.

Enterprise Managed Users impersonation/override

Since the underlying repository and the Codespace are likely hosted in GHEC EMU, you will also need to use the debug-time impersonation features to override the EMU user information after a GitHub callback with your GitHub.com account.

For ease of use, an initial impersonation override feature is available that only will override a GitHub EMU response:

  • CODESPACES_IMPERSONATE_OVERRIDE_EMU_ENABLED: set to 1 to allow in your environment
  • CODESPACES_IMPERSONATE_OVERRIDE_EMU_LOGIN: set to the login to use only when an EMU user authenticates. The primary impersonation feature will still be used after this.

AAD authentication

Configure your AAD application in an appropriate tenant.

  • CODESPACES_AAD_AUTHENTICATION_ENABLED: set to 1 to enable
  • Set the other AAD variables for your environment as necessary:
    • AAD_CLIENT_ID
    • AAD_CLIENT_SECRET
    • ...

Private artifacts

The Microsoft-internal fork of this project uses a private Azure Artifact feed to bring in additional components and libraries. These are not applicable to the open source upstream and should be excluded currently.

Building the Docker image

docker build -t opensource-management-portal .

Run (OSS instructions)

This section is from the open source community

The most easy way to run is by using the docker-compose setup. This will bootup the postgres and redis components as well. The docker-compose setup depends on 2 environment files and 1 json file:

  • .docker.env
  • .secrets.env
  • env-orgs.json

Make sure to copy the .secrets.env.example and env-orgs.json.example files and provide the configuration values.

cp .secrets.env.example .secrets.env
cp env-orgs.json.example env-orgs.json
# provide configuration values for .secrets.env and env-orgs.json
docker-compose up

If you desire to run all on your local machine (redis, postgres) you might want to use following approach.

# ensure redis and postgres is running on localhost
source .secrets.env
source .local.env
npm run start

Troubleshooting

If the docker image doesn't start you can debug the image using an interactive shell session. This allows you to browse the folders, update the files to test things and run the portal.

$ docker run --rm -it --env-file .secrets.env --env-file .docker.env --entrypoint /bin/sh opensource-management-portal
/usr/src/repos $ ls
app.js                   data                     lib                      package.json             tsconfig.tsbuildinfo     webhooks
app.js.map               entities                 localEnvironment.js      routes                   user
bin                      features                 localEnvironment.js.map  test                     utils.js
business                 github                   middleware               transitional.js          utils.js.map
config                   jobs                     node_modules             transitional.js.map      views
/usr/src/repos $ npm run start-in-container

Test

This project basically has very few tests, and aspirations to start using Jest better. Oops. Bad debt as multiple hackathons combine, along with production dependencies on GitHub...

Bare minimum local development environment

If you place a JSON file .env above the directory of your cloned repo (to prevent committing secrets to your repo by accident or in your editor), you can configure the following extreme minimum working set to use the app.

The central operations token is a personal access token that is a org owner of the GitHub org(s) being managed.

DEBUG_ALLOW_HTTP=1
GITHUB_CENTRAL_OPERATIONS_TOKEN=a github token for the app
GITHUB_ORGANIZATIONS_FILE=../../env-orgs.json
GITHUB_CLIENT_ID=your client id
GITHUB_CLIENT_SECRET=your client secret
GITHUB_CALLBACK_URL=http://localhost:3000/auth/github/callback
AAD_CLIENT_ID=your corporate app id
AAD_REDIRECT_URL=http://localhost:3000/auth/azure/callback
AAD_CLIENT_SECRET=a secret for the corporate app
AAD_TENANT_ID=your tenant id
AAD_ISSUER=https://sts.windows.net/your tenant id/

In this mode memory providers are used, including a mocked Redis client. Note that this does mean that a large GitHub organization configured with memory providers could become a token use nightmare, as each new execution of the app without a Redis Cache behind the scenes is going to have 100% cache misses for GitHub metadata. Consider configuring a development or local Redis server to keep cached data around.

The built-in Redis mock will likely be removed when we move to the next major semver of the Node Redis library.

Collaboration

This project began as a hackathon... so still has growing pains years later. Since this is technically a backend web application and includes some server-generated user interface, the project was not originally designed to be shared as something that runs out-of-the-box, but... it is possible.

To collaborate on extensibility and improvements, please sync in the issues first so we can come up with the best approach.

Again, since Microsoft strips most of the routes/ and uses a React frontend on this app, it's likely routes/ and the Pug rendering is... old. Very old.

Hopefully this monolith can at least be an interesting learning opportunity in crufty old ancient apps evolving on the JavaScript front!

Work to be done (OSS project)

  • Support more interesting cloud and data providers
  • Support other authentication technologies
  • Any tests
  • More tests
  • Ship the front-end UI to the world as open source
  • Continuing to refactor out Microsoft-specific things when possible

Project origin

An introduction to this project is available in a 2015 post by JWilcox and a 2019 follow-up post, "Scaling from 2,000 to 25,000".

An Open Source Hub concept was prototyped by a Microsoft subsidiary and the early Open Source Programs Office to make very clear the open source experiences, docs, and guides for Microsoft's culture change to working more in the open, releasing projects, and connecting everything together.

At the same time, GitHub was very basic, and it was necessary to automate and make self-service the GitHub engineering system to work at an enterprise scale. When Azure became the first approved organization to use GitHub at Microsoft, this portal scaled access and built guardrails around the GitHub environment.

LICENSE

MIT License

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

opensource-management-portal's People

Contributors

dependabot[bot] avatar dzsquared avatar eirslett avatar fernomac avatar garnertb avatar jcantosz avatar jeffwilcox avatar jonasscholl avatar klef-dev avatar marcofranssen avatar michaeltsenglz avatar mofury avatar nschonni avatar omerlh avatar rick-anderson avatar rneatherway avatar romanfritsch avatar sekkyo avatar shegox avatar ssaraswati avatar tarkatronic avatar timothystewart6 avatar vatsalyagoel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opensource-management-portal's Issues

No results for multiple tags in search query

Search Engine Issue

No results are found on multiple tags in search query for "Search Tags...."

image

The search query with multiple tags should give results for all the tags in the search query

BREAKING CHANGE: requiring organization IDs in configuration

We've taken some changes recently to essentially expect an organization to have an id (number) configured, after a few too many times of being bitten by re-casing or renaming of organizations. Using an ID especially helps with the new query cache implementation that is a big performance boost when paired with an ongoing webhook event ingestion bus.

To get an organization ID, you can go to https://api.github.com/orgs/orgname and you will find it in there.

Once the modern GitHub App installation work is ready, in theory configuration could move from static files to a dynamic version that removes extra work, if people wanted that.

This is just an early heads up for now to be referenced once merged.

Adding the ID now will have no impact.

(Yes, the configuration needs to be documented better)

Here's an example of the current configuration for a dev environment we have...

[
  {
    "name": "ContosoDev",
    "id": 20195765,
    "type": "public",
    "ownerToken": "keyvault://portalppe.vault.azure.net/secrets/dev-github-org-contosodev-repos-token",
    "description": "Contoso Public Development - Cloud",
    "teamAllMembers": "2063735",
    "teamPortalSudoers": "2063734",
    "preventLargeTeamPermissions": true,
    "teamAllReposRead": "2280089",
    "teamAllReposWrite": "2148455",
    "templates": ["mit", "microsoft.docs", "dnfmit", "dnfmit.docs", "other"]
  },
  {
    "name": "contoso-d",
    "id": 9669768,
    "type": "public",
    "ownerToken": "keyvault://portalppe.vault.azure.net/secrets/local-github-org-contosodev-repos-token",
    "description": "Classic contoso-d",
    "teamAllMembers": "1944235",
    "preventLargeTeamPermissions": true,
    "teamAllReposRead": "2275189",
    "teamAllReposWrite": "2275190",
    "teamAllReposAdmin": "2279870",
    "templates": ["mit", "dnfmit"]
  }
]

Refactor authentication to support additional providers

A provider model is needed to help abstract providers and enable other auth providers. We now know that reverse proxy auth, general OAuth2 auth, and AAD all work, for example.

A good design will help keep it simple and build on top of passport modules that are trusted and supported.

Query is too slow

Takes forever to "search" for a repo, and I wish there was a top level button labelled "My Repos". In fact, every interaction with the site at repos.opensource.microsoft.com seems really really slow right now...

Automate "pinning" awesome repositories for organizations

It would be great to be able to have an algorithm find new and interesting repositories in orgs and automatically pin up to 6 of those repos to the org page on GitHub.com.

This is blocked. At this time GitHub's API does not support pinning via an API call.

Where is configuration.js?

I'm trying to figure out how to run this project, and both the readme and the post refer to configuration.js, but I couldn't find this file...

Fix the default "create repo" experience

As implemented now, the 'new repo' page redirects to a non-existant client app. Inside Microsoft the client app is used to provide new repo capability vs the horrible Pug page.

Breakdown of current changes

There is a problem for 'breakdown of current changes' chart when actual value didn't pass 0.
image

As you can see on the left side of chart - all of the numbers are '0'. However the chart does not show any information about amount of money are exactly charged.

I can make a pull request for you if you tell me where can i find this functionality.

NPM audit reports security issues

(sorry, I didn't know how to report it - there is no security policy defined for the project)
I run npm install and noticed the following issues:

added 611 packages from 1050 contributors and audited 2771 packages in 38.025s
found 2 vulnerabilities (1 moderate, 1 high)
  run `npm audit fix` to fix them, or `npm audit` for details

Refactoring and removing corporate-specific expectations

There is work remaining before completing the merge from the internal version of the app to be neutral and up-to-date, working in the open going forward. Until then the churn will be impactful to some.

  • refactor the link provider to use the entity model if it helps simplify
  • continue to finish await/async/ES6 updates
  • additional typings
  • factor out Microsoft-specific content into optional NPM inclusions from elsewhere (i.e. email templates)
  • fix 'new repo' experience when the client is not in use
  • remove microsoft-specific business logic
  • remove the master or develop branch to have a single simple head node
  • consider re-shipping the issue-based workflow per open issue

Email notifications for new requests

GitHub notifications may get lost among the other hundred emails we get from GitHub. Please send email notifications to team maintainers or Org admins about requests that come in.

Reimplement site as a modern SPA (Ember.js? React? Other)

Looking for community input here. So many of the GitHub API calls have extreme latency in some situations that a single-page app will have a much more enjoyable experience.

A design will be needed to properly support company-specific functionality, ideas and designs.

Renew access token API

I can't find renew access token API, should I need to renew a token manually when token expired.

Unable to authenticate with GitHub

I think the GitHub configuration for my deployment is all correct. The app redirects me to GitHub and I authorize the login. Then the app gets into this redirection loop until GitHub invalidates my login due to too many redirections.

It think the core issue is that that after GitHub has redirected back to the portal, it doesn't recognize that I am authenticated and starts the process over again. Here is the response from the auth/github/callback as well as the root page.

HTTP/1.1 302 Found
Content-Length: 46
Content-Type: text/html; charset=utf-8
Location: /
Vary: Accept, Accept-Encoding
Server: Microsoft-IIS/8.0
Set-Cookie: sid=s%3ASr5Uvzu3hXwYlLS2u02Z4Q0VvmXqcsO-.Vi0vtu1q2tviNf9yWPhzYkwt0yrI3dL5m7z%2B7iRkoSM; Path=/; Expires=Sun, 14 May 2017 13:23:42 GMT; HttpOnly
X-Powered-By: Express
X-Powered-By: ASP.NET
Date: Sun, 07 May 2017 13:23:41 GMT

HTTP/1.1 302 Found
Content-Length: 68
Content-Type: text/html; charset=utf-8
Location: /auth/github
Vary: Accept, Accept-Encoding
Server: Microsoft-IIS/8.0
Set-Cookie: sid=s%3ASr5Uvzu3hXwYlLS2u02Z4Q0VvmXqcsO-.Vi0vtu1q2tviNf9yWPhzYkwt0yrI3dL5m7z%2B7iRkoSM; Path=/; Expires=Sun, 14 May 2017 13:23:42 GMT; HttpOnly
X-Powered-By: Express
X-Powered-By: ASP.NET
Date: Sun, 07 May 2017 13:23:41 GMT

ACOM Team - API Access/webhook for contributor signup

Hi Jeff,

I was decided to open an issue here instead of sending an e-mail. We need to access and synchronize contributors to our repo with their Microsoft UPN or alias or any other info you can provide us so we can automatically add them to internal systems and provide them access like Keyvault operations and similar.

What's the best way to achieve that?

How to best pivot this project?

Hi,
I wanted to update anyone following this repo...

Inside Microsoft, we’ve worked hard to try and get a majority of the code base as is public up-to-date. Every time we have a build, we also build an equivalent version of this open source site and host it, plus a version that has our Microsoft internal bits, so make sure they work.

I’m working to get to the point where instead we’ll just use the version here, working in the open. It will help so much to actually collaborate.

I’m struggling to figure out how to best manage the monolith problem - as we add features, we are now adding explicit opt-in feature flags, but it does mean additional bloat in some cases.

For quite some time we have had a unique UI on top of the site, other than what’s checked in, as we have custom β€œrelease” wizard and new repo experiences... we are actually going to just launch an updated UI that is more simple and is a React app, to no longer have to fight with various changes along the way.

Any thoughts? Opinions? Is it better to try and somehow break this into a core library and then one-off repos for specific capabilities? What would you like to get out out this - a turnkey solution you just run, or a base framework to work alongside GitHub Actions and other tech to land scenarios of note?

A glossary of terms would be very helpful

As I have started working in earnest to get an instance of this project up and running, I've found some of the terminology to be a bit confusing. It would be helpful to have a glossary to help out with this. Some of the confusion I have run into is:

  • What is a graph provider?
    • For that matter, what is a graph?
  • What is an entity provider?
    • Also, an entity?
    • Entity metadata provider?
  • What is a "corporate profile"?
  • What is a link provider?

Those are the ones I'm seeing immediately, but I'm sure there are more that would be helpful.

Remove dead code

A large previous implementation from v1, using octonode, is still present and can be removed.

"Error: Cannot find module 'documentdb'" when running "npm start"

Hi,

We're running an older version of this app and would like to keep it up to date.
However, we're getting the following error message when running npm start: Error: Cannot find module 'documentdb'

Here are the steps to repro β€” I ran this in a VSTS agent Docker container because I don't have Python installed on my machine, but ignore those first few steps if you do have it

# Grab the Docker image
Ξ» docker pull mcr.microsoft.com/azure-pipelines/vsts-agent:ubuntu-16.04-standard

# Start a new container based on that image
Ξ» docker run -it mcr.microsoft.com/azure-pipelines/vsts-agent:ubuntu-16.04-standard /bin/bash

# Misc software versions
Ξ» git --version
git version 2.20.1

Ξ» node --version
v10.15.0

Ξ» npm --version
6.6.0

# Clone the repo
Ξ» git clone https://github.com/Microsoft/opensource-portal/
Ξ» cd opensource-portal/

# Show master is up to date
Ξ» git log -1
commit 09382587127fe53f5cbc4cfb832d2d128d82e292 (HEAD -> develop, origin/master, origin/develop, origin/HEAD)
Author: Jeff Wilcox <[email protected]>
Date:   Wed May 2 11:32:31 2018 -0700

    Adding a project status update for May 2018 on the need to make some major changes

Ξ» npm install
[wait for eternity]

Ξ» npm run build
> [email protected] build /tmp/opensource-portal
> grunt

Running "copy:bootstrap" (copy) task
Created 3 directories, copied 16 files

Running "copy:typeaheadjs" (copy) task
Copied 6 files

Running "copy:typeaheadjsBootstrapPatch" (copy) task
Copied 1 file

Running "copy:octicons" (copy) task
Created 1 directory, copied 181 files

Running "copy:jquery" (copy) task
Copied 7 files

Running "copy:resources" (copy) task
Created 4 directories, copied 11 files

Running "copy:timeago" (copy) task
Copied 1 file

Running "copy:d3" (copy) task


Running "copy:c3" (copy) task
Copied 2 files

Running "build_less" task

Running "concat:dist" (concat) task

Running "less:dist" (less) task
>> 1 stylesheet created.

Running "clean:build" (clean) task
>> 0 paths cleaned.

Running "compress:<%=builddir%>/bootstrap.css:<%=builddir%>/bootstrap.min.css" (compress) task
compressing file <%=builddir%>/bootstrap.css

Running "less:dist" (less) task
>> 1 stylesheet created.

Done.

Ξ» npm start
> [email protected] start /tmp/opensource-portal
> node ./bin/www

internal/modules/cjs/loader.js:583
    throw err;
    ^

Error: Cannot find module 'documentdb'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/tmp/opensource-portal/middleware/initialize.js:14:26)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node ./bin/www`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-03-15T02_41_06_859Z-debug.log

It seems the documentdb package is used here: https://github.com/Microsoft/opensource-portal/blob/09382587127fe53f5cbc4cfb832d2d128d82e292/middleware/initialize.js#L14, but it's not listed as a dependency in the package.json file.

We got through this error by running npm install documentdb but I guess it'd be needed in that repo as well? If so, happy to open a PR for that.

Let me know if you need any more information.
Thanks πŸ‘

Implement team reports in the computed digests

Team reports should be designed to make it easier for teams to understand what's going on.

Key aspects:

  • Monthly report; weekly diff/changes report if technology exists to improve the time series lookup
  • Show team maintainers and members
  • Show any unlinked team members as a warning
  • List repositories and access levels

Now that nested teams have shipped, the design will need to take into consideration what to show in that case.

Missing config/containers.json

I think the file containers.json in the config directory is missing from the repository. I think it should contain at least this, but it probably needs something for the definition of healthCheck and deployment but I am not sure how they should be defined and how they should be used.

{
"docker": "env://IS_DOCKER?trueIf=1"
}

What should initialize req.oss in index-linked.js

After linking my accounts, when the app gets to line 29 of index-linked.js, the valued of req.oss is not defined and the app errors out because it is trying to access req.oss.entities.link.

What should be providing the value of req.oss?

Remove Microsoft-specific text and titles from views

Many Pug views still have "Microsoft" and company-specific information that should be abstracted away.

Almost any and all views in the app should be able to use config.brand.companyName to get the configured company name anyway.

Opt-in feature flags are needed

As a monolith, this project has a lot of capabilities that were bolted on. To make the product more useful, especially just a subset, it would be ideal to add a new file config/features.json or similar that would have a set of feature flags for the product.

By default most of the flags should be defined to be false, so an explicit environment variable will need to be set (in a Kubernetes deployment file, a Dockerfile, etc.) to opt-in to capabilities.

Things that come to mind include:

  • API
  • Extension APIs
  • "Personal Access Token" features

etc.

Add a repo requester as an admin collaborator to their repo

To help with people who wish to manage their new repos, a checkbox should be added that would let them say "I'd like to be the admin for this repo". OR just do it by default. Should add an org-level configuration element to enable this operation.

Consider external/outside collaborator registration

I have a desire to require outside collaborators to 'register' with our portal so that we know how to contact them, even if they have an e-mail address that is not exposed to the public via the GitHub API. To do this will take planning and work to help people find the right place. Not clear about the design yet.

Support nested GitHub teams

Feature shipped but is not yet accessible via any GitHub APIs. It'll be interesting to think through keeping the current flat team view or not, and also how this will impact automated computation of permissions via the operations.js and graphManager.js system.

Missing detailed instructions of how to configure the portal in microsoft azure or locally.

Information in the site http://www.jeff.wilcox.name/2015/11/azure-on-github is to much, could be confusing if want to do a quick deploy and start to test.

I deployed the Azure oss portal in Microsoft Azure service. After, trying to open the site, response with a an blank page.

I'm image is because missing configuration.

Could be great have an article just explain the configuration of Azure oss portal in Microsoft Azure and Locally.

Support Azure CosmosDB as a link backing store

DocDB/CosmosDB support for the link service would allow us to move away from the old Azure table-backed implementation. Should be implemented at the same time as refactoring into various service providers i.e. a link service.

Document the configuration system

The system is great but complicated like all good things; namely the various levels of inheritance available...

Environment variables always win
Painless configuration env.json file
Configuration as code environments configured via NPM package.json and/or environment

This should be documented to help people become more productive quicker, including a sample env.json file to help people get started immediately.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.