Buildbot: Move checksum to JSON #7
No reviewers
Labels
No Label
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: infrastructure/blender-buildbot-www#7
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "move-checksum-to-json"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A new version of the build directory listing JSON endpoint that skips listing the
.sha256
files and instead adds a checksum key-value pair to each entry.This pull request also introduces a Dockerfile and Docker compose file that makes local development trivial (docker compose up -d --build
).Initial issue: infrastructure/blender-projects-platform#90
@pablovazquez I know you develop relatively frequently within this repo, do these Docker changes conflict in any way with your workflow?
Also, @fsiddi at some point added instructions for using a
Dockerfile
but also added it to the.gitignore
and I'm not entirely sure what the reason for that is.@ -86,0 +90,4 @@
$this->sha256_checksum = trim(str_replace(["\r", "\n", "\t"], '', file_get_contents($sha256_file)));
} else {
// Compute SHA256 checksum.
$this->sha256_checksum = strtoupper(hash_file('sha256', $file_path));
Computing hash of files is not cheap, is not something we should be doing for an end-point which is considered fast.
If the checksum file is missing, it is an indication of some bigger problem, so might as well keep the field empty.
@ -32,0 +32,4 @@
if ($version == 2) {
// If version 2 is requested, skip any .sha256 files and add a checksum key-value entry
if (substr($build->file_name, -7) === '.sha256') {
We have
function endsWith(string $haystack, string $needle)
utility function, so can simply doif (endsWith($build->file_name, '.sha256'))
.The PR should target the
develop
branch.master
is theproduction
.One day would be cool to unity it with other web projects and make more clear, but until then it is what it is.
36e3ccdadb
to9551fd55cb
9551fd55cb
toa4a0900193
a4a0900193
to95cc2e7286
They don't, I always followed the instructions anyway so it's just a matter of removing my local Dockerfile. Thanks for asking!
Sergey did not accept having a Dockerfile in the repo at the time. Check with him if that's acceptable now. If so, add the Dockerfile in a separate commit.
@ -22,6 +22,7 @@ class Build {
public $file_size;
public $file_extension;
public $release_cycle;
public $sha256_checksum; // New property
Don't refer to a time-line type of a thing. The property is new from the perspective of this PR, but once it lands the property is not new, is kist there. Simplty
public $sha256_checksum;
.I suggest splitting Docker to a separate PR, so then we can review it separate and make a decision in the updated realities of who and how developers this site.
95cc2e7286
to54cf8534f4
54cf8534f4
to2a2868fd1b
2a2868fd1b
to0ac2ca0896
Moved any Docker-related changes to #8.