biocro / biocro

https://biocro.github.io/
Other
41 stars 19 forks source link

Problems generating documentation for quantities #92

Closed eloch216 closed 6 months ago

eloch216 commented 7 months ago

There was an error in the recent automated workflow run related to the release of version 3.1.0:

https://github.com/biocro/biocro/actions/runs/8176197071/job/22355046093

It looks like another case where we have to provide a username and email address for git. I think this should probably addressed via a hotfix branch (?)

Update: maybe I misinterpreted the error message. I'm not totally sure what went wrong. For posterity, we have the following output from the "Commit updates and push to target (documentation) repository" step:

cd target

  # user.name and user.email are somewhat arbitrary but must be provided:
  git config user.name biocro-action
  git config user.email bogus@url.com
  git add .
  git commit -m "updated quantities documentation"
  git push
  shell: /usr/bin/bash -e {0}
  env:
    publish-to: biocro/BioCro-documentation
    R_LIBS_USER: /home/runner/work/_temp/Library
    TZ: UTC
    _R_CHECK_SYSTEM_CLOCK_: FALSE
    NOT_CRAN: true
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
Error: Process completed with exit code 1.
gsrohde commented 7 months ago

Update: maybe I misinterpreted the error message. I'm not totally sure what went wrong.

Judging from these two lines

nothing to commit, working tree clean
Error: Process completed with exit code 1.

I think the problem is that we are trying to commit changes when nothing has changed, because the script produced exactly the same result as it did when it was run on the source for the previous release. This will indeed produce an exit code of 1 from the commit command.

I suppose I could test this conjecture by running the script on the previous release version of BioCro and on this one and check that the results are exactly the same.

If this is indeed what is going on, then the main issue is that we get a reported run failure when there really is nothing wrong.

gsrohde commented 7 months ago

I suppose I could test this conjecture by running the script on the previous release version of BioCro and on this one and check that the results are exactly the same.

I did go ahead and run the script using the source versions of BioCro used for runs 2 through 4 of the Document quantities action. The result files are identical in all three cases.

I'm still thinking about what the best way is to avoid a workflow failing result in this case.

eloch216 commented 7 months ago

I guess it might not need to be a hotfix, since it seems this won't be an issue until there is another release.