lironer / bundlemon Goto Github PK
View Code? Open in Web Editor NEWA free open-source tool that helps you to monitor your bundle size on every commit and alerts you on changes.
Home Page: https://app.bundlemon.dev
License: MIT License
A free open-source tool that helps you to monitor your bundle size on every commit and alerts you on changes.
Home Page: https://app.bundlemon.dev
License: MIT License
Is your feature request related to a problem? Please describe.
Running monorepo with a large number of subprojects (thank you for your explicit support of this configuration btw π ), it can be difficult to remember the name of all subprojects associated with a parent project. Exposing this list as a dropdown would make it easy to quickly browse the status of each subproject.
Describe the solution you'd like
Change the "subproject" text input in the report viewer to a dropdown that contains a list of all subprojects associated with the parent project ID.
Describe alternatives you've considered
Being smarter and having a better memory.
The free hosted service looks great. I've been using https://buildtracker.dev/ but exploring alternatives.
Could you share some screenshots of what it looks like? For example I'd definitely love to spot the commit from X weeks ago that bumped up sizes.
and maybe put one of these screenshots in a readme?
Is your feature request related to a problem? Please describe.
I would like to process results gathered by bundlemon, I need an interface that would allow saving bundlemon results as a file or ability to attach custom output/reporter to process and save results. Application I am working with is build on a CI server and can't be build by Github Actions. This forces me to measure bundle sizes on the CI server and then process results further for example by sending them to some dashboard or github issue API.
Describe the solution you'd like
Ability to store result as json file. Optionally passing file name as parameter.
Describe alternatives you've considered
At the moment I could possibly scrap results from the console output but that's very hacky solution.
Additional context
I created a draft of a simple output that could possibly satisfy requirements of how bundlemon works, but I didn't test this solution yet. It's a raw draft for feature proposal.
import fs from 'fs';
import { Report } from 'bundlemon-utils';
import logger from '../../../common/logger';
import type { Output, OutputCreateParams, OutputInstance } from '../types';
const saveAsJson = (filename: string, payload: Report) => {
fs.writeFile(`${filename}`, JSON.stringify(payload), (error: any) => {
if (error) {
logger.log('There was an error when saving a file');
throw error;
}
logger.log(`${filename} saved.`);
});
};
const output: Output = {
name: 'json',
create: (params: OutputCreateParams): OutputInstance | Promise<OutputInstance | undefined> | undefined => {
const { filename } = params.options;
const name = filename ? filename : 'bundlemon-results.json';
return {
generate: (report: Report): void => saveAsJson(name, report),
};
},
};
export default output;
Describe the bug
I was trying to create a new project on https://app.bundlemon.dev/create-project and I get an error 500 with Failed to create project! Please try again in a few minutes
Describe the bug
Suddenly, we are getting error when bundlemon tries to commit its record (without any change on our end)
getting this:
[DEBUG] github-pr output: branch: "dependabot/npm_and_yarn/ssri-6.0.2" target branch: "master" PR number: "1483"
[INFO] Start analyzing
[INFO] Finished analyzing
[INFO] Start generating report
[INFO] Save commit record for branch "dependabot/npm_and_yarn/ssri-6.0.2"
[ERROR] create commit record: validation failed
[
{
message: '"query.branch" is required',
path: [ 'query', 'branch' ],
type: 'any.required',
context: { label: 'query.branch', key: 'branch' }
}
]
[ERROR] Failed to save commit record
Expected behavior
seems like bundlemon cant recognise the branch name when trying to push the record to storage,
but as you can see the branch name exist in the first line of the output, but under the query object somehow its not valid.
Environment
BundleMon version: ^0.3.0-rc.1
Please run this command inside your project and paste its contents here (it automatically copies to your clipboard)
npx envinfo --system --binaries --markdown | npx clipboard-cli
Additional context
Hello π
Describe the bug
We could not run bundlemon on master branch inside our project, because prNumber is false.
That makes createCommitRecord fail
Consequence to see in this PR : Total files change +3.96MB 0% in each PR.
Expected behavior
Same working process that in bundlemon project: inside Github Action last merge commit , it works.
Environment
BundleMon version: v1.3.0
The concerned .bundlemonrc :
https://github.com/cozy/cozy-drive/blob/master/.bundlemonrc
Additional context
Here is the Travis error:
[ERROR] create commit record: validation failed
{
"message": "A validation error occurred when validating the body",
"errors": [
{
"keyword": "pattern",
"dataPath": ".prNumber",
"schemaPath": "#/properties/prNumber/pattern",
"params": {
"pattern": "^[0-9]*$"
},
"message": "should match pattern \"^[0-9]*$\""
}
]
}
[ERROR] Failed to create commit record
[ERROR] Unhandled error
Error: Failed to generate report
Originally posted by goibon January 15, 2024
I'm using Bundlemon to keep track of my chunk sizes in a project that uses Vite which in turn uses Rollup to bundle. My chunks follow a naming convention of [name]-[hash].js
which used to mean that they would be named something like chunkNameA-5fdd3f1d.js
. After upgrading to Vite 5 which in turn upgraded Rollup from v3 to v4 the hashes are now different (as mentioned as a breaking change in Rollup release notes). The new hashes are no longer just hex characters but seem to include a-z
, 0-9
, _
and -
. The use of -
in hashes seems to cause some issues with file matching with bundlemon.
My bundlemon config uses a path
setting that looks like: "path": "assets/*-<hash>.js",
which ended up showing part of the hash in the bunldemon output, eg. assets/chunkNameA-Zxa-(hash).js
where Zxa-
is part of the hash but not recognized as such.
My initial first attempt at addressing this was to use a new chunk file naming in rollup [name].[hash].js
and a new path
in bundlemon: "path": "assets/*.<hash>.js",
but this also does not properly match the files so if a file has a -
in the hash then bundlemon reports it as being removed.
I realize that potentially I could also resolve this by finding a way of getting vite/rollup to output compatible hashes again but my initial attempts at figuring out how were unfruitful so I thought I'd ask here.
Is there any way I can get Bundlemon to properly match the new hashes?
Hey @LironEr , great library! Thanks!
Wondering if we can get this feature request:
Current Behaviour:
Expected:
Files which have not changed will be omitted, to save the comment from being huge
Originally posted by matt-franceschini-fw June 10, 2022
The history report feature would greatly benefit from having more information about the commit in the popover. It is very hard to pinpoint which commit lead to the increase/decrease in size. Can we pull information from the commit (ideally the message, as it is human readable)?
Is your feature request related to a problem? Please describe.
Sometimes, binary size increases are expected. How do we bypass the maxPercentIncrease limit for the PR that introduces such change?
Describe the solution you'd like
Specify a keyword in the PR description or a label to skip the failing bundlemon test.
Describe alternatives you've considered
Use maxSize
instead since we can update the bundlemon settings in the same PR. But maxPercentIncrease
shouldn't change
Additional context
It would also be great to have a way to report the output differently in case of "failures".
For example, the report as PR comment can be very noisy in a monorepo with multiple projects reporting as PR comments, but if we can set the PR comment to be only in case of "failure", that would already be a lot less noisy.
Originally posted by @tleunen in #115 (comment)
BundleMon CLI v2 introduced some breaking changes.
If you are using BundleMon in GitHub actions you don't need to set project ID anymore, BundleMon will automatically create a new project linked to your repo on GitHub.
The old way of using project ID without an API key will stop working in a few months so it's important to upgrade.
If you want to keep your current project history you can reply with your details to this issue or send me an email ([email protected]) with the owner, repo name, and your current project id.
Example:
Owner: lironer
Repo: bundlemon
Project ID: aaaaaaaaaaaa
Describe the bug
After adding the library "polyfill-library": "^4.0.0",
, when running the bundlemon analyzer it gives a Maximum call stack error and it breaks.
Expected behavior
It should not get this error.
Environment
BundleMon version: <1.3.0>
`
`
Additional context
Bundlemon config:
{ "files": [ { "maxPercentIncrease": 5, "maxSize": "200kb", "path": ".nuxt/dist/client/app.<hash>.js" }, { "maxPercentIncrease": 1, "maxSize": "160kb", "path": ".nuxt/dist/client/vendors/app.<hash>.js" } ] }
This also breaks in our CI/CD pipeline
Is your feature request related to a problem? Please describe.
Firstly, thank you so much for this awesome tool!!!
I have gone through a few similar tools and this is definitely exactly what I needed.
The issue I am facing:
master
/main
branch, which makes it look like the build is failingDescribe the solution you'd like
Potentially some sort of "Approve" or "Accept" facility on the check (or on the page that it leads to) that would allow for the status of
the check to no longer be marked as failing. This would be very useful for the case that I mentioned for a master commit, and for reviewing a PR.
I guess that this would only be available to a CODEOWNER or a moderator of the target repository.
Hopefully this auth aspect doesn't make things too difficult. One potential simple option here could be a configured approver list in the github app config, or some sort of secret key that could be shared with the relevant parties and they just copy paste after clicking the approve button.
I have seen this type of thing in CodeClimate: https://docs.codeclimate.com/docs/workflow#what-to-do-when-issues-are-found
Describe alternatives you've considered
I tried to use the github actions continue-on-error
feature with the approvals feature to facilitate this workflow, but the check still marks the build as failing. (See: ngxs/store#1886)
Potentially also the "Approve" could be done using a comment in the PR by a moderator using the comment /bundlemon approve
, but this doesn't solve the issue with the commit on master.
Additional context
Here is an example of a commit on master that fails after merging a PR with a bundle size change outside of the tolerances:
ngxs/store@80a3014
Alternatively, the ability to use an alternate config file from the GH action. Then, we could run bundlemon twice, one with compression and one without.
This is a feature request for docs
.
npm script start:service
is based on docker desktop
https://github.com/LironEr/bundlemon/blob/master/package.json#L10
On linux machines docker needs to be installed manually and it's not shipped with docker compose as one part. docker-compose needs to be installed manually and it's called with docker-compose
.
Expected behavior
Maybe there should be additional npm script for linux machines or some smarty if-else in the existing one π€
Main docker-compose config is using $PWD
variable https://github.com/LironEr/bundlemon/blob/master/docker-compose.dev.yml#L30
And as explained here https://stackoverflow.com/a/61905266/3636524
$PWD will not work if you are running using sudo. Try the recommended settings from Docker for Linux https://docs.docker.com/engine/install/linux-postinstall/.
Expected behavior
When docs are created, it would be nice to have a note somewhere for people who use linux environment so that they can run docker-compose up with no error about $PWD not being set.
Alternatively $PWD
may not be used at all so that project will work also on machines without post-installation steps done.
Environment
BundleMon version: master
branch
Client:
Version: 20.10.9
API version: 1.41
Go version: go1.17.1
Git commit: c2ea9bc90b
Built: Mon Oct 4 19:13:02 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Server:
Engine:
Version: 20.10.9
API version: 1.41 (minimum version 1.12)
Go version: go1.17.1
Git commit: 79ea9d3080
Built: Mon Oct 4 19:12:03 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.5.7
GitCommit: 8686ededfc90076914c5238eb96c883ea093a8ba.m
runc:
Version: 1.0.2
GitCommit: v1.0.2-0-g52b36a2d
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Hi there, thanks for this great service :)
I recently created an alternative client for the Scala.js ecosystem that integrates with the Scala build tool. I hope you don't mind about this π
https://github.com/armanbilge/sbt-bundlemon
However, somehow in the last 48 hours or so the /v1/projects/.../commit-records/.../outputs/github
endpoint has changed (?) and is 400-rejecting my requests.
Here is a log showing the failure:
[info] [info] HTTP/1.1 POST https://api.bundlemon.dev/v1/projects/id?authType=GITHUB_ACTIONS&runId=2811061031 Headers(Content-Length: 65, x-api-client-name: sbt-bundlemon, x-api-client-version: 0.1.1-4-a29c46c-SNAPSHOT, Content-Type: application/json, Accept: application/json) body="{"provider":"github","owner":"armanbilge","repo":"sbt-bundlemon"}"
[info] [info] HTTP/1.1 200 OK Headers(Content-Type: application/json; charset=utf-8, Connection: keep-alive, date: Sun, 07 Aug 2022 02:38:40 GMT, access-control-allow-origin: *, vary: Origin, content-length: 33, x-vercel-cache: MISS, server: Vercel, x-vercel-id: cle1::iad1::fgqt7-1659839919847-c014eb0553a1, strict-transport-security: max-age=63072000, cache-control: public, max-age=0, must-revalidate) body="{"id":"62d55e113fb165069416fa1b"}"
[info] [info] HTTP/1.1 POST https://api.bundlemon.dev/v1/projects/62d55e113fb165069416fa1b/commit-records?authType=GITHUB_ACTIONS&runId=2811061031 Headers(Content-Length: 247, x-api-client-name: sbt-bundlemon, x-api-client-version: 0.1.1-4-a29c46c-SNAPSHOT, Content-Type: application/json, Accept: application/json) body="{"subProject":"sbt-bundlemon-scripted-example_sjs1_2.12","files":[{"friendlyName":"main.js","pattern":"*.js","path":"main.js","size":2628,"compression":"brotli"}],"groups":[],"branch":"debug","commitSha":"a29c46c8dc26dcf75a0d029c8ba8526ecbaaa42f"}"
[info] [info] HTTP/1.1 200 OK Headers(Content-Type: application/json; charset=utf-8, Connection: keep-alive, date: Sun, 07 Aug 2022 02:38:40 GMT, access-control-allow-origin: *, vary: Origin, content-length: 481, x-vercel-cache: MISS, server: Vercel, x-vercel-id: cle1::iad1::fgqt7-1659839920319-e11a362da475, strict-transport-security: max-age=63072000, cache-control: public, max-age=0, must-revalidate) body="{"record":{"id":"62ef25b029bfb7ac0758962e","creationDate":"2022-08-07T02:38:40.849Z","subProject":"sbt-bundlemon-scripted-example_sjs1_2.12","files":[{"friendlyName":"main.js","pattern":"*.js","path":"main.js","size":2628,"compression":"brotli"}],"groups":[],"branch":"debug","commitSha":"a29c46c8dc26dcf75a0d029c8ba8526ecbaaa42f","projectId":"62d55e113fb165069416fa1b"},"linkToReport":"https://app.bundlemon.dev/projects/62d55e113fb165069416fa1b/reports/62ef25b029bfb7ac0758962e"}"
[info] [info] HTTP/1.1 POST https://api.bundlemon.dev/v1/projects/62d55e113fb165069416fa1b/commit-records/62ef25b029bfb7ac0758962e/outputs/github?authType=GITHUB_ACTIONS&runId=2811061031 Headers(Content-Length: 193, x-api-client-name: sbt-bundlemon, x-api-client-version: 0.1.1-4-a29c46c-SNAPSHOT, Content-Type: application/json, Accept: application/json) body="{"git":{"runId":"2811061031","owner":"armanbilge","repo":"sbt-bundlemon","commitSha":"a29c46c8dc26dcf75a0d029c8ba8526ecbaaa42f"},"output":{"checkRun":true,"commitStatus":true,"prComment":true}}"
[info] [info] HTTP/1.1 400 Bad Request Headers(Content-Type: application/json; charset=utf-8, Connection: keep-alive, date: Sun, 07 Aug 2022 02:38:41 GMT, access-control-allow-origin: *, vary: Origin, content-length: 227, x-vercel-cache: MISS, server: Vercel, x-vercel-id: cle1::iad1::fgqt7-1659839920932-cbdf63f64194, strict-transport-security: max-age=63072000, cache-control: public, max-age=0, must-revalidate) body=""
[info] [error] org.http4s.client.UnexpectedStatus: unexpected HTTP status: 400 Bad Request for request POST https://api.bundlemon.dev/v1/projects/62d55e113fb165069416fa1b/commit-records/62ef25b029bfb7ac0758962e/outputs/github?authType=GITHUB_ACTIONS&runId=2811061031
https://github.com/armanbilge/sbt-bundlemon/runs/7709128565
Here is a successful log from a couple weeks ago.
[info] [info] HTTP/1.1 POST https://api.bundlemon.dev/v1/projects/id?authType=GITHUB_ACTIONS&runId=2737290740 Headers(Content-Length: 65, x-api-client-name: sbt-bundlemon, x-api-client-version: 0.1.1-2-3d5e194-SNAPSHOT, Content-Type: application/json, Accept: application/json) body="{"provider":"github","owner":"armanbilge","repo":"sbt-bundlemon"}"
[info] [info] HTTP/1.1 200 OK Headers(Content-Type: application/json; charset=utf-8, Connection: keep-alive, date: Tue, 26 Jul 2022 05:53:31 GMT, access-control-allow-origin: *, vary: Origin, content-length: 33, x-vercel-cache: MISS, server: Vercel, x-vercel-id: cle1::iad1::cqdgl-1658814811188-2f34d3b69b0e, strict-transport-security: max-age=63072000, cache-control: public, max-age=0, must-revalidate) body="{"id":"62d55e113fb165069416fa1b"}"
[info] [info] HTTP/1.1 POST https://api.bundlemon.dev/v1/projects/62d55e113fb165069416fa1b/commit-records?authType=GITHUB_ACTIONS&runId=2737290740 Headers(Content-Length: 246, x-api-client-name: sbt-bundlemon, x-api-client-version: 0.1.1-2-3d5e194-SNAPSHOT, Content-Type: application/json, Accept: application/json) body="{"subProject":"sbt-bundlemon-scripted-example_sjs1_2.12","files":[{"friendlyName":"main.js","pattern":"*.js","path":"main.js","size":2628,"compression":"brotli"}],"groups":[],"branch":"main","commitSha":"3d5e1945bd6fc5d6a01513b37eafcab03fba0519"}"
[info] [info] HTTP/1.1 200 OK Headers(Content-Type: application/json; charset=utf-8, Connection: keep-alive, date: Tue, 26 Jul 2022 05:53:32 GMT, access-control-allow-origin: *, vary: Origin, content-length: 851, x-vercel-cache: MISS, server: Vercel, x-vercel-id: cle1::iad1::cqdgl-1658814811685-aa094d371b60, strict-transport-security: max-age=63072000, cache-control: public, max-age=0, must-revalidate) body="{"record":{"id":"62df815c3fb16506943958ad","creationDate":"2022-07-26T05:53:32.113Z","subProject":"sbt-bundlemon-scripted-example_sjs1_2.12","files":[{"friendlyName":"main.js","pattern":"*.js","path":"main.js","size":2628,"compression":"brotli"}],"groups":[],"branch":"main","commitSha":"3d5e1945bd6fc5d6a01513b37eafcab03fba0519","projectId":"62d55e113fb165069416fa1b"},"baseRecord":{"id":"62d5e8bc3fb165069457cd95","creationDate":"2022-07-18T23:11:56.487Z","subProject":"sbt-bundlemon-scripted-example_sjs1_2.12","files":[{"friendlyName":"main.js","pattern":"*.js","path":"main.js","size":2916,"compression":"gzip"}],"groups":[],"branch":"main","commitSha":"01fa4df681473a06307a0b89244590b5e95461f4","projectId":"62d55e113fb165069416fa1b"},"linkToReport":"https://app.bundlemon.dev/projects/62d55e113fb165069416fa1b/reports/62df815c3fb16506943958ad"}"
[info] [info] HTTP/1.1 POST https://api.bundlemon.dev/v1/projects/62d55e113fb165069416fa1b/commit-records/62df815c3fb16506943958ad/outputs/github?authType=GITHUB_ACTIONS&runId=2737290740 Headers(Content-Length: 193, x-api-client-name: sbt-bundlemon, x-api-client-version: 0.1.1-2-3d5e194-SNAPSHOT, Content-Type: application/json, Accept: application/json) body="{"git":{"runId":"2737290740","owner":"armanbilge","repo":"sbt-bundlemon","commitSha":"3d5e1945bd6fc5d6a01513b37eafcab03fba0519"},"output":{"checkRun":true,"commitStatus":true,"prComment":true}}"
[info] [info] HTTP/1.1 200 OK Headers(Content-Type: application/json; charset=utf-8, Connection: keep-alive, date: Tue, 26 Jul 2022 05:53:33 GMT, access-control-allow-origin: *, vary: Origin, content-length: 379, x-vercel-cache: MISS, server: Vercel, x-vercel-id: cle1::iad1::cqdgl-1658814812200-7a055da4e0f6, strict-transport-security: max-age=63072000, cache-control: public, max-age=0, must-revalidate) body="{"checkRun":{"result":"success","message":"Successfully created GitHub check run","metadata":{"id":7514154779,"url":"https://github.com/armanbilge/sbt-bundlemon/runs/7514154779"}},"commitStatus":{"result":"success","message":"Successfully created GitHub commit status","metadata":{"id":18493430976}},"prComment":{"result":"skipped","message":"Not a PR - ignore post PR comment"}}"
https://github.com/armanbilge/sbt-bundlemon/runs/7514135077
As far as I can tell the request is consistent with the relevant schema.
bundlemon/service/src/consts/schemas.ts
Line 853 in 240c30f
I don't see any recent commits that seem related so I'm not sure what changed. Thanks in advance for your help, much appreciated!
Originally posted by nuno-m May 9, 2022
Groups can sometimes have very complex glob patterns, which might make it harder for someone not familiar with the code base to correctly identify what it does/ is responsible for.
I had a case where I was grouping all my app JS files, with the exception of translations, third-party code and the main app.js
file. The glob works as expected, but the generated reports make it difficult to understand.
My proposal is to extend the File type to also support a "friendy name" kind of property where we can name each group. That could also apply to single files too.
Following #115, need to add an option to disapprove the record
Is your feature request related to a problem? Please describe.
I am working on custom notification process and notification channel for bundlemon results.
I would like to re-use existing code from
Describe the solution you'd like
Move
bundlemon-utils
package so that it can be added as dependency and reused by other projects :)
Describe alternatives you've considered
For now I will copy implementation inside my private repo and I will try to open PR with suggested changes.
Additional context
I work in a project that needs some custom approaches to how we gather bundlemon metrics and how we process notifications for it. I can't use bundlemon github actions app so I am creating custom notifications service for it.
It would make my work 10x easier if I could import markdownReportGenerator
from bundlemon-utils
and reuse it. This would also make sure that I am always in-sync with Bundlemon data structures.
Describe the bug
Failure in Groups throws unhandled exception: Cannot read 'failReasons' of undefined
Expected behavior
Graceful failure without unhandled exception.
Screenshot
Configuration
module.exports = {
baseDir: "./dist",
defaultCompression: "none",
files: [
{
path: "halo.js",
maxSize: "450 kB",
},
{
path: "halo.css",
maxSize: "70 kB",
}
],
groups: [
{
path: "*.module.*",
maxSize: "520 kB"
}
]
}
Environment
BundleMon version: 1.1.0
Describe the bug
Using glob patterns with the OR operator (|
) breaks the generated Markdown report.
These characters are not currently being escaped and when used on a glob pattern, they are interpreted as part of the Markdown syntax.
Expected behavior
Glob pattern should be escaped on Markdown report to prevent characters such as |
from breaking the table.
Additional context
Sidenote: I wanted to run this the project locally, and try to work on a fix for this issue, but I wasn't able to.
When running the yarn start:service
command I get open [...]/bundlemon/service/.env: no such file or directory
error.
When displaying pop for the last day on the history report, the table header is displayed over it (wrong z-index?) Found on Bundlemon history report.
Expected behaviour
Popup should be displayed above the table and its header.
Environment
BundleMon version: v1.1.1
https://app.bundlemon.dev/
Additional context
Looks like the issue is caused by table header cell having z-index: 2;
Describe the bug
I have a project which uses CircleCI to send the reports to BundleMon. Because of this, I added the github token for the tool. But now, it gives me this error with v2 rc1:
[ERROR] github output: Create GitHub "checkRun": failure - You must authenticate via a GitHub App.
With v1, everything worked fine using the github app, and without providing the token.
Environment
BundleMon version: 2.0.0-rc1
- when a PR fails the bundle checks, then the check is marked as failed for the PR (which is obviously the correct behavior)
- if this is an optional check then, as a reviewer, even though it has failed I can approve and merge the PR
- BUT now, the check fails on the
master
/main
branch, which makes it look like the build is failing
Originally posted by @markwhitfeld in #115
Hey,
BUT now, the check fails on the master/main branch, which makes it look like the build is failing
If the target branch doesn't exist (meaning we are not in PR), BundleMon will compare your current commit to a previous commit in the same branch you currently are. This was implemented to show the correct message at the end of the run and in the commit status. But I think you are right and there is no need to fail the run if we are comparing commits in the same branch.
What do you think about adding a new flag to ignore fails in the same branch?
ignoreFailuresInSameBranch: true / false (default true)
The flag will only change the result to success
Originally posted by @LironEr in #115 (comment)
Super! Thank you so much for the response. Regarding the master branch, I don't know what is possible with checks, but potentially they could be represented as warnings and not failures? And for the setting name, I think that the terminology could potentially be "base" branch, because some might interpret commits within the PR branch as the "same" branch. Potentially the setting could be called:
warnForFailuresOnBaseBranch
: true/false Potentially making the defaulttrue
might be an unexpected behaviour change (currently it would behave as if it was set tofalse
). But it is up to you if you see the current failure on the base branch as a bug or a feature, so it is up to you πJust jotting down the progression of my thoughts here.....
An alternative setting name could be:
baseBranchFailureHandling: 'error'/'warn'/'ignore'
orbaseBranchFailureStrategy: 'error'/'warn'/'ignore'
orbaseBranchCommitValidation: 'error'/'warn'/'ignore'
or even
ignoreFailuresOnBranches: [ 'master', 'main', 'release' ]
orwarnOnlyForFailureOnBranches: [ 'master', 'main', 'release' ]
orsoftFailureOnBranches: [ 'master', 'main', 'release' ]
or even this could be in the
github
reporter options like this"reportOutput": [ [ "github", { "checkRun": false, "commitStatus": true, "prComment": true, "branchCheckHandling": { "master": { "reportFailureAs": "warning" }, "dev": { "reportFailureAs": "error" }, "release": { "reportFailureAs": "information" }, } } ] ]
I think I like the configurable aspect of the last one. Obviously whether or not we can do warnings would affect the design.
Haha, really over-engineering now, Imagine if we could even have
"reportFailureAs": [ "warning", "email" ]
, which would email the code owners. Hahaha, I think there is some serious scope creep here π€£ .
Originally posted by @markwhitfeld in #115 (comment)
npm script start:service
is based on docker desktop
https://github.com/LironEr/bundlemon/blob/master/package.json#L10
On linux machines docker needs to be installed manually and it's not shipped with docker compose as one part. docker-compose needs to be installed manually and it's called with docker-compose
.
Expected behavior
Maybe there should be additional npm script for linux machines or some smarty if-else in the existing one π€
Main docker-compose config is using $PWD
variable https://github.com/LironEr/bundlemon/blob/master/docker-compose.dev.yml#L30
And as explained here https://stackoverflow.com/a/61905266/3636524
$PWD will not work if you are running using sudo. Try the recommended settings from Docker for Linux https://docs.docker.com/engine/install/linux-postinstall/.
Expected behavior
When docs are created, it would be nice to have a note somewhere for people who use linux environment so that they can run docker-compose up with no error about $PWD not being set.
Alternatively $PWD
may not be used at all so that project will work also on machines without post-installation steps done.
Environment
BundleMon version: master
branch
Client:
Version: 20.10.9
API version: 1.41
Go version: go1.17.1
Git commit: c2ea9bc90b
Built: Mon Oct 4 19:13:02 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Server:
Engine:
Version: 20.10.9
API version: 1.41 (minimum version 1.12)
Go version: go1.17.1
Git commit: 79ea9d3080
Built: Mon Oct 4 19:12:03 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.5.7
GitCommit: 8686ededfc90076914c5238eb96c883ea093a8ba.m
runc:
Version: 1.0.2
GitCommit: v1.0.2-0-g52b36a2d
docker-init:
Version: 0.19.0
GitCommit: de40ad0
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.