Skip to content

[BUG]: markdown_equations workflow fail when (re)creating PR branch #13394

Description

@officiallyanee

Description

While checking package READMEs on npm, I noticed that some equation blocks appear to be missing their generated HTML/SVG fallback:
ex: https://www.npmjs.com/package/@stdlib/math-base-special-acovercosf
readme file:https://github.com/stdlib-js/stdlib/blob/develop/lib/node_modules/%40stdlib/math/base/special/acovercos/README.md?plain=1

The README contains the equation comment and Markdown math block, but appears to be missing the generated <div class="equation">...<img ...></div> fallback used for rendered package documentation.

From logs of failing workflow on job Create pull request:

Checking if remote branch exists...
  Remote branch exists.
  Checking for commits to push...
  No commits to push.
  
  error: failed to push some refs to 'https://github.com/stdlib-js/stdlib'
  Error: The process '/usr/bin/git' failed with exit code 1

I think, the cause stems from doing git fetch and deleting remote before pushing with lease.
This seems related to the general git push --force-with-lease warning about fetches changing lease expectations:

A general note on safety: supplying this option without an expected value, i.e. as --force-with-lease or --force-with-lease= interacts very badly with anything that implicitly runs git fetch on the remote to be pushed to in the background, e.g. git fetch origin on your repository in a cronjob.

ref: https://git-scm.com/docs/git-push#:~:text=A%20general%20note,in%20a%20cronjob.

Related Issues

Related PRs #13110 .

Questions

Since the workflow only processes Markdown files changed in the last 25 hours, existing READMEs with missing generated equation divs may not be repaired automatically. Should these be backfilled in a separate PR by running the existing Markdown equation tooling over the affected packages?

Checklist

  • Read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working.CIIssue or pull request specific to continuous integration environments.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions