-
Notifications
You must be signed in to change notification settings - Fork 121
Continuous Benchmarking [Addendum] #1034
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
base: master
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
| git -C ../www add -A | ||
| git -C ../www restore documentation/data.js |
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.
Suggestion: Move the git restore command before git add -A to ensure changes to documentation/data.js are correctly discarded before being staged for commit. [possible issue, importance: 9]
| git -C ../www add -A | |
| git -C ../www restore documentation/data.js | |
| git -C ../www restore documentation/data.js | |
| git -C ../www add -A |
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.
Pull Request Overview
This PR adds a safeguard to preserve historic benchmark data (documentation/data.js) during automated documentation deployments. It's a follow-up to #1033 that implements continuous benchmarking functionality.
Key Changes:
- Adds a
git restorecommand to preventdocumentation/data.jsfrom being overwritten during documentation builds
| rm -rf ../www/* | ||
| mv build/install/docs/mfc/* ../www/ | ||
| git -C ../www add -A | ||
| git -C ../www restore documentation/data.js |
Copilot
AI
Nov 10, 2025
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.
The git restore command will fail if documentation/data.js doesn't exist in the git history of the ../www repository (e.g., during initial setup or if the file hasn't been pushed yet). Since set -e is enabled on line 65, this will cause the workflow to fail.
Consider adding error handling to gracefully handle the case where the file doesn't exist:
git -C ../www restore documentation/data.js || trueAlternatively, check if the file exists in the git history before attempting to restore it:
git -C ../www ls-files --error-unmatch documentation/data.js &>/dev/null && git -C ../www restore documentation/data.js || true| git -C ../www restore documentation/data.js | |
| git -C ../www restore documentation/data.js || true |
| git clone "${{ secrets.DOC_PUSH_URL }}" ../www | ||
| rm -rf ../www/* | ||
| mv build/install/docs/mfc/* ../www/ | ||
| git -C ../www add -A |
Copilot
AI
Nov 10, 2025
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.
[nitpick] Consider adding a comment to explain why documentation/data.js is being restored. Based on the PR description, this file contains historic benchmark data that should be preserved across documentation deployments. A brief comment would improve maintainability and help future developers understand this special handling.
Example:
# Preserve historic benchmark data from continuous benchmarking (see #1033)
git -C ../www restore documentation/data.js || true| git -C ../www add -A | |
| git -C ../www add -A | |
| # Preserve historic benchmark data from continuous benchmarking (see #1033) |
User description
Description
Following on #1033,
This PR should be merged after pushing a finalized
data.js(containing historic benchmark runs) to MFlowCode.github.io underdocumentationdir. Then #1033 will display whetherbench_diffworks as intended or not with the Self-Hosted Benchmark Tests (3 GT Phoenix, 1 ORNL Frontier).PR Type
Enhancement
Description
Preserve existing benchmark data during documentation deployment
Prevent overwriting historical
data.jsin documentation repositoryEnsure continuous benchmarking data persists across doc updates
Diagram Walkthrough
File Walkthrough
docs.yml
Restore benchmark data file during doc deployment.github/workflows/docs.yml
git restore documentation/data.jscommand after staging changesdeployment
data.jsfile is preserved from the remote repository