-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dashboard: small enhancements #20
Conversation
a80d308
to
b396b29
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely some changes that need to be made, but they're all minor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some context on the changes in this file:
This allows for us to have a staging instance by hosting in another repo without constantly modifying the code
87e3b59
to
38c026b
Compare
f9ad24c
to
a82fb67
Compare
a82fb67
to
839eefc
Compare
4f9b1e5
to
fb38fc0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @afinn12! I left a few comments/questions.
For this PR, can you edit your commit message and list the same bullet points you listed in the PR description?
In future PRs (not this one), each such bullet point should be an individual commit (roughly, use your best judgement to split up into logical changes) to facilitate review. Potentially also split up into different PRs, as you'll notice that the review-correction cycle can delay merging: if you have multiple PRs, you can at least prioritize the features/PRs you want to get merged.
Crafting PRs is tricky! More info on this process here: https://github.com/kata-containers/community/blob/main/CONTRIBUTING.md#best-practices-for-patches
And some examples:
https://github.com/kata-containers/kata-containers/pull/10466/commits
https://github.com/kata-containers/kata-containers/pull/10038/commits
README.md
Outdated
Create the .env file: | ||
```bash | ||
NODE_ENV=development | ||
TOKEN=token <GITHUB_PAT_OR_OTHER_VALID_TOKEN> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you document or link to instructions on how to obtain this token?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know roughly how close we are to the new limit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Current fetch count is 22 when I ran the script (very below limit, will increase with reruns)
9dd9403
to
2613451
Compare
2613451
to
c33d2e6
Compare
scripts/fetch-ci-nightly-data.js
Outdated
|
||
// Set token used for making Authorized GitHub API calls. | ||
// In dev, set by .env file; in prod, set by GitHub Secret. | ||
require('dotenv').config(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to guard this for GHA
Updated fetch script to require access token, simplified/removed extra PR code, and added error message. Modified basePath, styling change to weatherTemplate/table, added default sort by most Fails. Added win-dev/localData, updated README/.gitignore. Fixes: kata-containers#25 Signed-off-by: Anna Finn <[email protected]>
c33d2e6
to
cea1d44
Compare
Create the folder /localData. Then, run: | ||
|
||
```bash | ||
node scripts/fetch-ci-nightly-data.js > localData/job_stats.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll do this in another PR.
node scripts/fetch-ci-nightly-data.js > localData/job_stats.json | |
node --require dotenv/config scripts/fetch-ci-nightly-data.js > localData/job_stats.json |
- name: Build with Next.js (No base path) | ||
if: ${{ env.NEXT_PUBLIC_BASE_PATH == '' }} | ||
run: ${{ steps.detect-package-manager.outputs.runner }} next build | ||
|
||
- name: Build with Next.js (With base path) | ||
if: ${{ env.NEXT_PUBLIC_BASE_PATH != '' }} | ||
run: NEXT_PUBLIC_BASE_PATH=${{ env.NEXT_PUBLIC_BASE_PATH }} ${{ steps.detect-package-manager.outputs.runner }} next build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need a condition here. I'll fix this in another PR.
Important
Description
Changed basePath in next.config.js/deploy.yml
Added win-dev for Windows development
Upgrade Next.js version/include dotenv for dev
Simplified weatherTemplate.js
index.js
Added files in /localData to .gitignore
fetch-ci-nighty-data.js
Updated readme with script/token instructions
Testing
Tested in dev
TODO: BUG: In windows, running:
node --require dotenv/config .\scripts\fetch-ci-nightly-data.js > localData\job_stats.json
Will produce the error:
![image](https://private-user-images.githubusercontent.com/113125490/383775674-565ea8d6-886a-4cd3-af6f-ee8f0881b7a9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMDIyNzIsIm5iZiI6MTczOTMwMTk3MiwicGF0aCI6Ii8xMTMxMjU0OTAvMzgzNzc1Njc0LTU2NWVhOGQ2LTg4NmEtNGNkMy1hZjZmLWVlOGYwODgxYjdhOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQxOTI2MTJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iMGU1OGFlYmU0NTFhNmI5ZDFmZDk4MzYwMTI1NzkwNTRhMDI2YWE2NGRhNzk5M2U3OTZjY2I1YmU3N2UyZjFkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.EftQ2skQEC-cyoKq41ic5wvnwUdeVNHMdWeG-vt4jPU)
This is caused by "> localData\job_stats.json" and has only been produced in windows dev
Instead of > localData\job_stats.json, doing CTRL + C and CTRL + V from tmp-data.json to job_stats.json is a temporary solution that avoids these unexpected tokens.
Tested in prod
![image](https://private-user-images.githubusercontent.com/113125490/384061565-63baa885-b128-4a46-8477-69869709398b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMDIyNzIsIm5iZiI6MTczOTMwMTk3MiwicGF0aCI6Ii8xMTMxMjU0OTAvMzg0MDYxNTY1LTYzYmFhODg1LWIxMjgtNGE0Ni04NDc3LTY5ODY5NzA5Mzk4Yi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQxOTI2MTJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04MjQ1ZTRlMzRmMmVkMzEzYjg3NGVhNzMzNTQ5N2E0MThmYzM3YTA2N2UxZGZiNWMzMGEyOTVlZmJhMGNkMmQwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.JnywV9Z01gUfYP-EIg06OPNtPM7eHnd_5FdjgCumzNI)
in prod (using build/start):
Automatic Filter Note
As seen above, the weather doesn't correlate with the number of fails (if a test was run more/less)
Sorting by weather produces:
![image](https://private-user-images.githubusercontent.com/113125490/384061156-fe803fd4-4704-495b-b4fc-40ac25969696.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMDIyNzIsIm5iZiI6MTczOTMwMTk3MiwicGF0aCI6Ii8xMTMxMjU0OTAvMzg0MDYxMTU2LWZlODAzZmQ0LTQ3MDQtNDk1Yi1iNGZjLTQwYWMyNTk2OTY5Ni5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQxOTI2MTJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00MzBmOTAxOTgxNDcxMDQxZDc3YzM5ODU5ZTJhYzE3MmRjZjExZDYzNGQ5MTU4OThjMjhkOTIxYjU1ZGU1ZWFlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.6o6qARnATu3Z4pjyE2d83Z4sF8FJsJX80QmoKvK7F2M)