middlewarehq / middleware Goto Github PK
View Code? Open in Web Editor NEW✨ Open-source DORA metrics platform for engineering teams ✨
Home Page: https://middlewarehq.com
License: Apache License 2.0
✨ Open-source DORA metrics platform for engineering teams ✨
Home Page: https://middlewarehq.com
License: Apache License 2.0
cro :exclamation:️ tail: cannot open '/var/log/cron.log' for reading: No such file or directory
Added token but cant see any repos
Load personal repos or give option for mocking data.
no repos loaded to add to team
The Team Repos and Team Incidents Logic should have not been added to Incident Service, Refactor it to it's own service
Using Docker ARM build.
We need a way to get the devs to quick start with development using Gitpod. This would enable devs who dont have machines capable of supporting the setup.
Example: https://github.com/RocketChat/Rocket.Chat?tab=readme-ov-file#gitpod-setup
There are cases when a new column is added which is populated at the time of the sync. This change will not reflect in db existing data, but will be there in data synced after the version upgrade.
Example: We add a new url
column in Incident Table like we did in this PR #245 . This uses some logic to populate url column in the sync itself but the existing rows will have null url. We should have a mechanism to do such database migrations as the logic can be more complex than a db query and re-syncing all data can be a pain.
when fetching deployment PRs, API fails
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'
[2024-05-03 09:33:12,310] ERROR in app: Exception on /deployments/PR_MERGE|1054f54b-d19d-4ec2-8d6b-c2faeb633c30/prs [GET]
Traceback (most recent call last):
File "/opt/venv/lib/python3.9/site-packages/flask/app.py", line 1463, in wsgi_app
response = self.full_dispatch_request()
File "/opt/venv/lib/python3.9/site-packages/flask/app.py", line 872, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/opt/venv/lib/python3.9/site-packages/flask/app.py", line 870, in full_dispatch_request
rv = self.dispatch_request()
File "/opt/venv/lib/python3.9/site-packages/flask/app.py", line 855, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
File "/app/backend/analytics_server/mhq/api/deployment_analytics.py", line 135, in get_prs_included_in_deployment
return get_non_paginated_pr_response(
File "/app/backend/analytics_server/mhq/api/resources/code_resouces.py", line 70, in get_non_paginated_pr_response
"data": [
File "/app/backend/analytics_server/mhq/api/resources/code_resouces.py", line 82, in <listcomp>
"lead_time": _get_lead_time_for_pr(pr),
File "/app/backend/analytics_server/mhq/api/resources/code_resouces.py", line 10, in _get_lead_time_for_pr
(
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'
[2024-05-03 09:33:12,320] ERROR in app: Exception on /deployments/PR_MERGE|1054f54b-d19d-4ec2-8d6b-c2faeb633c30/prs [GET]
Traceback (most recent call last):
File "/opt/venv/lib/python3.9/site-packages/flask/app.py", line 1463, in wsgi_app
response = self.full_dispatch_request()
File "/opt/venv/lib/python3.9/site-packages/flask/app.py", line 872, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/opt/venv/lib/python3.9/site-packages/flask/app.py", line 870, in full_dispatch_request
rv = self.dispatch_request()
File "/opt/venv/lib/python3.9/site-packages/flask/app.py", line 855, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
File "/app/backend/analytics_server/mhq/api/deployment_analytics.py", line 135, in get_prs_included_in_deployment
return get_non_paginated_pr_response(
File "/app/backend/analytics_server/mhq/api/resources/code_resouces.py", line 70, in get_non_paginated_pr_response
"data": [
File "/app/backend/analytics_server/mhq/api/resources/code_resouces.py", line 82, in <listcomp>
"lead_time": _get_lead_time_for_pr(pr),
File "/app/backend/analytics_server/mhq/api/resources/code_resouces.py", line 10, in _get_lead_time_for_pr
(
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'
^C
^main
The code base is divided into two portions, the web-server (typescript/next js) and apiserver (python/flask). pytests and black workflows should only run when changes are made to python directory or apiserver as they are focused towards that.
At the moment these workflows run for all PRs and may be an overhead for devs contributing strictly to web-server.
Example: #223
Currently, the _set_unused_repos_as_inactive method defies the single responsibility, that a method should have.
Decouple it and create APIs for each small part.
should see branches as a key in payload
no branches in payload
./dev.sh
setupdora_metrics
API failsdora_metrics API gives 404
id column that is primary key in TeamIncidentService is not required, we can drop it and use (team_id, service_id) as primary key.
Using Docker ARM build.
The ARM build for docker images is taking an excessively long time (around 1 hour) and failing, while the AMD build is successful and takes only 5 minutes.
Both ARM and AMD builds should complete successfully within a reasonable time frame, without any significant difference in build times between the two platforms.
The ARM build takes around 1 hour and fails, while the AMD build completes successfully in just 5 minutes.
This issue seems to be related to the performance and compatibility of the ARM build process with the GitHub Actions runner environment. Additional investigation is needed to identify the root cause of the excessive build time and failure for the ARM platform. Potential factors to consider include:
It would be beneficial to review the build logs and error messages for the failed ARM builds to gain more insights into the specific issues encountered.
Pressing enter while pasting the linked token on the link-integration token closes the modal and does nothing
TeamRepos.prod_branch is no longer used in analytics, rather TeamRepos.prod_branches is used.
As we have kept interactive CLI for developer mode on hold hence, add command on how to access the logs of individual applications.
Running ./dev.sh shows that apiserver is loading a seeminly infinite amount of logs that causes the container storage to fill up and crash other things
It should not create so many logs as to fill up the disk.
Why is this required?
The lead time attribute in the PullRequests model is no longer cached and should be deprecated. This change was made to align with the new calculation method for merge to deploy, which now depends on the deployment type for TeamRepos being either PR_MERGE
or WORKFLOW
.
Remove lead_time
attribute usage from frontend system for pull requests.
The frontend system should no longer rely on the lead_time
attribute when displaying pull request data.
Remove lead_time
attribute usage from core backend APIs that return Pull requests data.
Update core backend APIs to no longer return the lead_time
attribute when fetching pull request data.
Drop lead_time column from the database.
Remove the lead_time
column from the database schema as it is no longer required.
./dev.sh
On the dora metrics page:
First repo should be auto-selected
No-repos are selected, also we get this:
Task 1, 2, 3 can be done in seperate PRs.
We currently have a single log stream for server and analytic server.
./dev.sh
Record<string, DB_OrgRepo[]>
to Record<string, BaseRepo[]>
the labels org-name/repo-name
is a frontend generated logic. hence searching for org-name/repo-name
yields no results. Currently only repo-names are used to search and fetch repos. it should also allow searching on the organization
Currently we create encryption secret keys on runtime, but if container is brought down and volumes persists then the next the container is spun up, it would lead to encryption decryption enconsistencies
The keys should also persist and not be created if they exists
New keys are created and leads to wrong decryption
When we use the dev CLI setup with ./dev.sh
which internally uses docker compose watch, the database is not persisted once we stop the setup container.
./dev.sh
./dev.sh
A user might be a part of multiple orgs and while selecting the repositories, it becomes confusing to find the right org.
It would be great to choose the orgs first. This will also help to reduce the clutter in the Add Repos option.
Today, it loads up a list of repos across my personal and from other orgs.
Whenever I run the product in dev mode, I am not able to switch logs between web server and api server.
./dev.sh
[w]
Can we also mention the system pre-requisites like yarn and python to be there to run this dev.sh
script?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.