-
Notifications
You must be signed in to change notification settings - Fork 457
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
Patch the baseline test new-year race condition. Fix #3723. #3724
Open
aknrdureegaesr
wants to merge
1
commit into
getnikola:master
Choose a base branch
from
aknrdureegaesr:baselinecheck_newyear
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,10 @@ | |
tmp/ | ||
cache/ | ||
output/ | ||
baseline/ | ||
nikola-baseline-build/ | ||
/tags | ||
v3.*.zip.* | ||
|
||
# GitHub token | ||
.pypt/gh-token | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 shouldn’t hardcode a list of files, it may change and cause the code to crash.
I would also prefer to use
sed
(with a slightly longer fragment to be sure we’re replacing the right thing) instead of doing it in Python via string manipulation.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 hard-coded list should or at least could be fixed. I agree to that.
Probably, the whole "patch" approach is not ideal.
What would you think about this idea: When the
--invariant
switch is given, the year should not be pulled fromtime.gmtime().tm_year
, but instead some fixed number is used.But then: Do you think this is worth it in the grand scheme of things?
It is sort of a reflex of mine to try to remove sources of change. My way of doing things: If Nikola version x.y.z once passed all the tests, I tend to fight hard so it will continue to pass all tests forever.
But that is only my preference. It does not seem to be this project's philosophy. For one, you do not pin dependencies, not even to major numbers.
So, what do you think? Is #3723 worth being fixed?
You seem to suggest, it's not.
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 think the solution with
--invariant
would be a good solution to #3723 and one I would accept. This could be done by exposing a function somewhere in Nikola (utils.py
?) and importing it in the sampleconf.py
file.Pinning dependencies makes things difficult for downstream distributors, and there are a handful. We generally don’t support versions beyond the latest, and we don’t run tests for things other than the
master
branch.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.
That makes sense.
TMI, in case you are interested: Now retired, I lived through the age of big enterprise software some 20 years ago, with a new production release every three months only, on a schedule. That official picture was only half-true in reality: We had production bug fixes much more frequently. In that world, it was very important that all automated tests that you ran at official release time would still pass at bug fix time 10 weeks later. The bug-fix build should only change the handful lines of sources we consciously had changed. You bet we fixed dependencies with all the nails and glue we could get our hands on! - 'twas a different world from what Nikola is facing today.