vishesh-baghel / glide Goto Github PK
View Code? Open in Web Editor NEWYou can see how Glidee-bot works by installing it from here
Home Page: https://github.com/apps/glidee-bot
License: ISC License
You can see how Glidee-bot works by installing it from here
Home Page: https://github.com/apps/glidee-bot
License: ISC License
It is important to handle removed repositories because it may happen that the bot won't be able to fetch the details of the removed repository.
use response.repositories_added to get the list. same for removed repos.
`
"repositories_added": [
{
"id": 732309770,
"node_id": "R_kgDOK6YpCg",
"name": "lombok",
"full_name": "vishesh-baghel/lombok",
"private": false
}
],
"repositories_removed": [
],
`
The score is not bounded between 0 and 1. check the algorithm again as well as the logistics function
This is needed because the native query in the mindsdb editor is not working as expected. I am continuously getting errors while training the model. Fortunately I understood the reason why I was getting the errors.
I was trying to run the MongoDB native query as db.collection.find({}, {commits: 0})
but the commits array was not being excluded. I finally decided to keep the query as db.collection.find({})
and to make a new model which doesn't have the commits array.
The model's training completed successfully. I think the mindsdb's lightwood
ai model doesn't process the dictionaries or arrays as a datatype for a column while training a regression model.
Currently on executing a batch query on mindsDB with only installationId as a parameter is returning the same set of files which is expected behaviour from the DB point of view.
But, the bot is overriding the updated predicted scores on the files which is unexpected behaviour. Their should be something to identify in the mindsDB table to make sure the bot gets new rows.
Check if pagination feature is present in mindsdb javascript sdk to solve this issue
Todo:
Currently, if the predicted scores stored in the db are shown in the PR comment, then it will show the first two decimals places. for eg-
if this is stored in db: 1.3621763272908538e-8, then 1.36 would be shown in the comment which is wrong
Add an handler for this scenario in the pull request closed listener to delete the old files which are renamed
This scheduler will be responsible for all the retraining of the predictor model. This scheduler will run every 10 minutes to update any residual job in the DB.
The jobs collection schema would be like this:
{
installationId,
owner,
repoName,
filePath,
status: completed, not-completed.
}
Every 10 minutes, the scheduler will query the DB with the jobs with the status as not-completed. It will fetch the mindsDB with parameters given in the schema to get the unique filePath predicted score and then finally it will update the predicted risk score in the File
model.
After investigating this issue. I found this behavior:
On adding this event listener, the bot will follow the below-given steps:
This issue was first discovered from the logs tracks on sentry. It is not a blocker for the workflow but still needs to be properly handled
Tasks:
This is important to make the app more reliable in case the processing fails in between a job
Tasks:
Tasks:
Feature: risk scores would be more refined: The bot will follow these steps after every new installation
It needs to prepare all the files with associated risk scores beforehand to react to PR events.
To do so, it needs to fetch all repositories on which the bot has been installed.
Then, iterate on each repository and get all files.
For each file, first calculate the risk score and then save it.
Now, the bot can give the files with their respective scores in every PR.
Tasks:
Make a normalized interface for the app and map the external apis to the central interface of the app
INFO (probot): Total 37602 files fetched from repository: vishesh-baghel/Chat-app for installation id: 45484616
INFO (probot): Received Total 37602 files for processing from repository: vishesh-baghel/Chat-app with installation id: 45484616
<--- Last few GCs --->
[109427:0x5b03790] 116166 ms: Scavenge 1967.3 (2068.1) -> 1966.9 (2078.6) MB, 4.93 / 0.00 ms (average mu = 0.882, current mu = 0.440) allocation failure;
[109427:0x5b03790] 116175 ms: Scavenge 1973.7 (2078.6) -> 1972.7 (2079.6) MB, 5.18 / 0.00 ms (average mu = 0.882, current mu = 0.440) allocation failure;
[109427:0x5b03790] 116184 ms: Scavenge 1974.6 (2079.6) -> 1973.8 (2101.4) MB, 8.34 / 0.00 ms (average mu = 0.882, current mu = 0.440) allocation failure;
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
1: 0xc9e850 node::Abort() [/home/vishesh.baghel/Documents/workspace/personal-projects/glide/node_modules/node/bin/node]
2: 0xb720ff [/home/vishesh.baghel/Documents/workspace/personal-projects/glide/node_modules/node/bin/node]
3: 0xec1a70 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/home/vishesh.baghel/Documents/workspace/personal-projects/glide/node_modules/node/bin/node]
check this solution: probot/smee-client#179
WARN (probot): Commit date not specified
ERROR (probot): a.date.getTime is not a function
TypeError: a.date.getTime is not a function
at /home/vishesh.baghel/Documents/workspace/personal-projects/glide/lib/services/riskScoreService.js:7:54
at Array.sort ()
at calculateRiskScore (/home/vishesh.baghel/Documents/workspace/personal-projects/glide/lib/services/riskScoreService.js:7:17)
at /home/vishesh.baghel/Documents/workspace/personal-projects/glide/lib/services/repositoryService.js:129:98
at Array.map ()
at /home/vishesh.baghel/Documents/workspace/personal-projects/glide/lib/services/repositoryService.js:121:60
at step (/home/vishesh.baghel/Documents/workspace/personal-projects/glide/lib/services/repositoryService.js:33:23)
at Object.next (/home/vishesh.baghel/Documents/workspace/personal-projects/glide/lib/services/repositoryService.js:14:53)
at fulfilled (/home/vishesh.baghel/Documents/workspace/personal-projects/glide/lib/services/repositoryService.js:5:58)
ERROR (probot): Error while fetching resource details for resource url: GET /repos/{owner}/{repo}/git/trees/{tree_sha}
ERROR (probot): Error occurred while fetching all files for vishesh-baghel/codespace-demo and installation id: 45484616
ERROR (HttpError): Not Found
HttpError: Not Found
at /home/vishesh.baghel/Documents/workspace/personal-projects/glide/node_modules/octokit/node_modules/@octokit/request/dist-node/index.js:124:21
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async sendRequestWithRetries (/home/vishesh.baghel/Documents/workspace/personal-projects/glide/node_modules/@octokit/auth-app/dist-node/index.js:398:12)
at async requestWithGraphqlErrorHandling (/home/vishesh.baghel/Documents/workspace/personal-projects/glide/node_modules/octokit/node_modules/@octokit/plugin-retry/dist-node/index.js:71:20)
at async Job.doExecute (/home/vishesh.baghel/Documents/workspace/personal-projects/glide/node_modules/bottleneck/light.js:405:18)
status: 404
request: {
method: "GET"
url: "https://api.github.com/repos/vishesh-baghel/codespace-demo/git/trees/main?recursive=true"
headers: {
"accept": "application/vnd.github.v3+json",
"user-agent": "octokit.js/3.1.2 octokit-core.js/5.0.2 Node.js/20.10.0 (linux; x64)",
"authorization": "token [REDACTED]"
}
request: {}
}
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.