Skip to content
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

Fix broken build docs tests run with GitHub Actions #592

Merged
merged 2 commits into from
Jul 26, 2023

Conversation

bartlettroscoe
Copy link
Member

While working on PR #591, I ran into the failing GitHub Actions run tests TriBITS_build_docs and TriBITS_build_sphinx_docs as shown here for example. Looking at the failed tests here you see:

Generating git version

fatal: No names found, cannot describe anything.

and that leads to the failure of all of the documents:

Generating TribitsUsersGuide.html ...
TribitsUsersGuide.rst:7: (WARNING/2) Cannot extract empty bibliographic field "Version".
Cleaning intermediate files ...
/home/runner/work/TriBITS/TriBITS/tribits/doc/guides

and

Generating TribitsBuildReference.html ...
TribitsBuildReference.rst:8: (WARNING/2) Cannot extract empty bibliographic field "Version".

We see similar errors in nightly testing like here showing:

Generating TribitsUsersGuide.html ...
TribitsUsersGuide.rst:7: (WARNING/2) Cannot extract empty bibliographic field "Version".
Cleaning intermediate files ...

but somehow the tests still pass.

In any case, the changes in this PR makes those tests pass, but git describe is still not creating the correct version info and seems to be missing the tags. But at least the repo SHA1 will be provided in the generated document.

This commit contains changes to try to fix the tests TriBITS_build_docs and
TriBITS_build_sphinx_docs where the `git describe --match="<tag-base-name>*"`
command fails complaining there are not tags in the repo.

It seems that GitHub actions removed tag info with its git clone.  We have to
those tags back because they are used to generate the documentation which
includes the exact version.  A git fetch was done to bring back the tags.
However, that did not seem to work.

This commit also contains error handling for git describe command to produce a
dummy TribitsGitVersion.txt file in case the the git describe command fails.
This seems to have allowed the tests to pass.
This will at least provide the SHA1 in case there is no tag info for some
reason.  This seems to be the case with GitHub Actions recently.
@bartlettroscoe bartlettroscoe added component: documentation component: testing Dealing with automated testing not specific to any other component labels Jul 26, 2023
Copy link
Collaborator

@rabartlett1972 rabartlett1972 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build docs tests all pass and now show no error in generating the version info. For example, here shows:

Generating git version



We can't see what the TribitsGitVersion.txt file shows but hopefully it is okay. (We will see once the docs are deployed.)

@bartlettroscoe bartlettroscoe merged commit 8c1874c into master Jul 26, 2023
6 checks passed
@bartlettroscoe
Copy link
Member Author

bartlettroscoe commented Jul 27, 2023

FYI: Note that the GHA job to deploy the sphinx versions of the documents produced the correct version info:

  • Date: 2023-07-26
  • Version: tribits_start-3308-g8c1874ca

for all three documents:

So whatever is messing up the git describe command for the tests TriBITS_build_docs and TriBITS_build_sphinx_docs run under GitHub Actions, it does not seem to be impacting the GitHub Action that builds and deploys these documents.

Hum, but it seems that the older DocUtils deployment is not working. The most recent document:

is showing:

  • Date: 2023-06-30
  • Version: tribits_start-3304-g9111399

I will try to debug what is happening.

Update: With the loss of my Windows Laptop, I have lost my ability to log into the server that runs tribits.org. I can get back my access but I will wait until I get my new Windows laptop and then try to set this up again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: documentation component: testing Dealing with automated testing not specific to any other component
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants