netlify / delta-action Goto Github PK
View Code? Open in Web Editor NEWA GitHub Action for capturing benchmark data and tracking its variation against a baseline
License: MIT License
A GitHub Action for capturing benchmark data and tracking its variation against a baseline
License: MIT License
Describe the bug
When a previous commit does not yet have the comment from delta-actions, the action will just write the current deltas but no history. So basically starting from scratch.
Describe the bug
Package size is no longer reported on https://github.com/netlify/cli
See error https://github.com/netlify/cli/runs/2772791362#step:6:6
First off, thanks for this project, it's a great idea and so easy to use!
The graph rendering feature is very neat, but when you have a number of benchmarks it can take up several pages. I was hoping to have something more compact, so was surprised to see graphs the first time, because it doesn't match the screenshot in the README:
Could graph rendering be made into an optional feature, with the other option being the simpler increase/decrease text?
When running the action on a branch with a PR, I'm getting a HttpError: Not Found
error in GitHub Actions logs:
(node:2502) UnhandledPromiseRejectionWarning: HttpError: Not Found
at /home/runner/work/_actions/netlify/delta-action/v1/dist/index.js:2814:25
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Object.next (/home/runner/work/_actions/netlify/delta-action/v1/dist/index.js:4385:28)
at async processPullRequest (/home/runner/work/_actions/netlify/delta-action/v1/dist/index.js:4974:28)
at async run (/home/runner/work/_actions/netlify/delta-action/v1/dist/index.js:5013:3)
(node:2502) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2502) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
My configuration follows your examples:
- name: Get size
run: du -sk dist | cut -f1 > .delta.appSize && echo "kb (Total app size)" >> .delta.appSize
- name: Run Delta
uses: netlify/delta-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
base_branch: master
It looks like the error is coming from the octokit call to fetch comments.
The action worked on the default branch, went through and added a commit comment on the current head commit of the default branch.
Any ideas?
Love the idea for this action, thanks for sharing!
Which problem is this feature request solving?
Byte values are being truncated at the unit (e.g. netlify/cli#2169 (comment)). This creates a situation where we detect a change but the value doesn't have enough precision to show it.
Describe the solution you'd like
We could use the minimumFractionDigits
option of https://www.npmjs.com/package/pretty-bytes. Not sure whether to do that by default or to somehow make it configurable.
Can you submit a pull request?
Yes.
In pull request comments, the message about the variation (e.g. "x% increase vs. y") is comparing the latest result with the first (i.e. oldest) recorded commit, which by default is 30 commits behind. I would expect this comparison to be against the previous (i.e. most recent) recorded commit, and ideally against the mean value too.
When using delta-action
and a PR is opened from a fork, the workflow exits with the following error:
RequestError [HttpError]: Resource not accessible by integration
...
status: 403,
response: {
url: 'https://api.github.com/repos/cloudquery/plugin-sdk/issues/430/comments',
status: 403,
My simplified workflow file looks like this:
name: "Unit tests"
on:
push:
branches:
- main
pull_request:
branches: [main]
jobs:
unittests:
steps:
- name: Run benchmark
run: make benchmark-ci
- name: Delta
uses: netlify/[email protected]
with:
title: "⏱️ Benchmark results"
style: "text"
token: ${{ secrets.GITHUB_TOKEN }}
I think the only way to handle this is to use the pull_request_target
mode, but checking out the code to run benchmarks then becomes unsafe. How would a setup look that generates benchmark results using the (safe) pull_request
trigger, but then uses pull_request_target
to comment on the PR? Or is there another way to achieve this?
This issue is not really specific to delta-action
, but I have run into this while using it, and was hoping someone here could offer some advice on how to set it up correctly, which might also help future users.
This is an issue generated by (for-internal-use-only)github-tools
This repository has exceeded the development grace period, and the repo owner must decide if branch protections should be enforced.
If this repository houses code used in production in any capacity, branch protections must be enforced. Read (for-internal-use-only)here for more details
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
.github/workflows/fossa.yml
actions/checkout v3
.github/workflows/labeler.yml
netlify/pr-labeler-action v1.1.0
.github/workflows/prepare.yml
navikt/github-app-token-generator a3831f44404199df32d8f39f7c0ad9bb8fa18b1c
actions/checkout v3
actions/setup-node v3
stefanzweifel/git-auto-commit-action v4
.github/workflows/release-please.yml
navikt/github-app-token-generator a3831f44404199df32d8f39f7c0ad9bb8fa18b1c
GoogleCloudPlatform/release-please-action v3
.github/workflows/versioning.yml
.github/workflows/workflow.yml
actions/checkout v3
actions/setup-node v3
codecov/codecov-action v3
package.json
@actions/core ^1.9.0
@actions/github ^5.0.3
pretty-bytes ^5.6.0
pretty-ms ^8.0.0
regex-escape ^3.4.10
@netlify/eslint-config-node ^6.0.0
ava ^4.0.0
c8 ^7.11.0
esbuild ^0.17.0
husky ^8.0.0
node >=16.0.0
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Error type: undefined
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.