Continuous Benchmarking [Addendum]#1034
Continuous Benchmarking [Addendum]#1034Malmahrouqi3 wants to merge 1 commit intoMFlowCode:masterfrom
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.
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.
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 |
There was a problem hiding this comment.
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 |
| @@ -69,6 +69,7 @@ jobs: | |||
| rm -rf ../www/* | |||
| mv build/install/docs/mfc/* ../www/ | |||
| git -C ../www add -A | |||
There was a problem hiding this comment.
[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) |
|
due to inactivity |
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