-
Notifications
You must be signed in to change notification settings - Fork 548
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
Stable build dates #3828
Stable build dates #3828
Conversation
Aw... crap. I used the author commit timestamp ( ...Now I have to go edit all those files! 😭 |
Huh. Surprisingly enough, now that I've changed it everywhere, this doesn't actually seem to make a difference. At least locally on my system,
|
@ferdnyc Also, just FYI, I think the reason we based each daily build on the current time was to prevent collisions when uploading Artifacts to our Daily Build release on GitHub. I seem to recall lots of failures when trying to upload the same daily build again. So, fair warning. 👍 |
I also think those dates (i.e. commit date) is an ENV variable made available on GitLab for each build. But that might not be any better, since it's only available on the current branch/project. |
Well, in theory there shouldn't really be collisions — at least, I'm hoping not. In theory no two sets of build jobs should be generated with the same "fingerprint", since any new build will be triggered by some commit that changes one of the name components. I suppose if a successful job is manually restarted for the exact same set of commits, even after the first successful one has uploaded artifacts, then there might be an issue. Or... oh, hm. There is one situation I can think of where that might happen, and it's one I didn't account for. If a previous job partly succeeded, but had to be re-started, the re-builds on the jobs that succeeded the previous time might fail to upload, because the previous run already uploaded the same output file. Hmm. I wonder if there's a way to make "file already exists" a non-fatal condition, since in those cases it's actually fine for the job to succeed without uploading; it doesn't need to upload since there was already a successful build uploaded. |
I wouldn't actually mind the current timestamp, as long as all the files built from the same run used the same current timestamp, so that it was easier to determine which files "go together" and are built with the same contents. Maybe the right approach is to just have a script job in the pipeline, in between the |
The more I think about this, the more I think my last comment is the way to go, instead of the changes in this PR. What we need is a "basename generation" pipeline step that runs at the beginning of the openshot-qt CI pipeline. That way, all of the builds in any given pipeline will use the same filenames (with different extensions/suffixes), but that base filename can be generated using the current time so every pipeline is guaranteed to produce files that are named differently from any of the others. I'm just not 100% sure whether that can be done by just editing the |
Hmmm. Looking at the docs, another option would be to use the |
@ferdnyc Yes, I like the idea of tacking the CI_PIPELINE_ID onto the filename! Like you say, much shorter, and less emphasis than a full datetime epoch. |
I shall update the PR! |
853317f
to
6421aa2
Compare
Done, and I closed the two in the other repos. There's really no need to capture |
6421aa2
to
7bf3108
Compare
🙄 Random Travis failure is random. ("Couldn't get key" for the libopenshot-daily PPA, on some of the build jobs.) |
Merging this. The project Mac builder still isn't finished because it's waiting for Notarization, but all of the builds were successful. |
Me:
..Not intentional, but subconsciously my pensiveness is surprisingly linear in its progression. I guess the only thing to say regarding that is: "Hmmmm." |
This PR, along with OpenShot/libopenshot-audio#107 and OpenShot/libopenshot#588, implements an idea I had while discussing Daily Build versions with @rexdk in #3825:
By using the UNIX epoch date of the openshot-qt commit that the build is generated from, instead of the value of
time.time()
, we can ensure that the set of Daily Build files generated for a given build run all have the same version identifiers in their filename, and differ only by the specifics of the format/architecture targeted.Before, due to the use of
int(time.time())
to set the first part of the build identifier, each of the builders' files was named slightly differently.Now, instead of e.g. (from the most recent Daily Build run):
We'd instead have (based on the timestamp of the triggering commit):
Much nicer, IMHO.
This PR adds capture of the openshot-qt commit timestamp (as a UNIX epoch time), and storage in the
share/openshot-qt
metadata file.It also updates
build-server.py
to:COMMIT_DATE_UNIX
, when reading the metadata files for all three architecturesint(version_info['openshot-qt']['COMMIT_DATE_UNIX'])
as the source of the timestamp component of the build filename, although it will fall back toint(time.time())
if for some reason the commit date isn't available.This change may conceivably cause the Daily Build timestamps to initially go backwards slightly in time, if the most recent commit ends up being timestamped before the wall-clock timestamps of the previous set of builds. But even if that happens, it should hopefully be a one-time thing.