Skip to content

Remove new-year race condition from "baseline testing". #3723

Open
@aknrdureegaesr

Description

Requested Feature: (short description)

The baseline tests make innocent pull requests fail early each year. Kindly fix the race condition.

Related Area: (eg. tasks, compilers, configuration, templates…)

Tests.

Do you want to contribute this yourself as a pull request? (don’t worry about it if you don’t want to/can’t — someone else can take care of it)

Does this feature affect backwards compatibility? If yes, in what way?

No, it does not. This concerns only tests.

Rationale and full description: (why should it be added to Nikola?)

There is a race condition. The precise circumstances to trigger the race condition are believed to be:

  • The pull request is entered early in the year.
  • The repo maintainers have not yet adjusted the baseline test to the new year.

You can see that race condition at work in one early-2024 test run, wrongly blaming pull request #3722.

This is not super-critical, as the baseline test is not required of a pull request.

Implementation idea

Integrate a filter that automatically adjusts the year number at that precise place where the diff (wrongly) finds it.

Prospect: More stabilization. (Not necessarily part of this feature request.)

Nikola is a Python project. The test could be ported from shell to Python. subprocess.run is our friend.

It is notoriously difficult to get shell script error handling correct. The baseline test is no exception. E.g., when run from another working directory different from what was intended, the scripts/getpyver.py already fails, but the script continues undeterred as if nothing was wrong. The filtering could be done as part of a port of the script to Python.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions