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

Change to GIX_TEST_IGNORE_ARCHIVES on CI and docs to match code #1360

Merged
merged 1 commit into from
May 7, 2024

Conversation

EliahKagan
Copy link
Member

@EliahKagan EliahKagan commented May 7, 2024

The test suite checks for GIX_TEST_IGNORE_ARCHIVES and not for GITOXIDE_TEST_IGNORE_ARCHIVES. But the main test workflow ci.yml, as well as in the instructions in DEVELOPMENT.md, had given GITOXIDE_TEST_IGNORE_ARCHIVES. This fixes that.

I'm unsure what the effect was in practice of this disparity. Experimentation with modified workflows in my fork has not revealed any messages indicating that generated archives are skipped, before or after this change. The explanation in DEVELOPMENT.md says that they are absent on CI for Linux because they are never checked out from Git LFS, but running git lfs ls-files doesn't show anything on any systems, even after running git lfs install and git lfs pull (the latter of which entails git lfs checkout, but I have also tried running that just in case). In addition, I think I recall your having said that archives that were formerly stored in Git LFS are now stored normally in the repository (due to limitations of Git LFS in GitHub).

However, at least the documentation fix is important. In #1345 (comment) I had mentioned that I had thought I'd run the tests with GIX_TEST_IGNORE_ARCHIVES=1 before and found them to pass, yet that is not the case (#1358). I now believe what I had set was instead GITOXIDE_TEST_IGNORE_ARCHIVES=1, based on the instructions in DEVELOPMENT.md. I have since verified again that GIX_TEST_IGNORE_ARCHIVES=1 produces the failures documented in #1358, while GITOXIDE_TEST_IGNORE_ARCHIVES=1 has no effect compared to not setting any environment variables and does not produce any failures (presumably due to not causing archives to be ignored).

An alternative to these changes could be to modify the code so GITOXIDE_TEST_IGNORE_ARCHIVES is recognized, or so that both names are recognized.

I suggest reviewing this to ensure that, at least after this PR (if not before), CI tests without using generated archives in at least one job at least on Ubuntu, so that changes to shell scripts are being validated. As mentioned above, based on the (admittedly nonequivalent) CI results within my fork, I am not confident of this.

The test suite checks for `GIX_TEST_IGNORE_ARCHIVES` and not for
`GITOXIDE_TEST_IGNORE_ARCHIVES`. But the main test workflow
`ci.yml`, as well as in the instructions in `DEVELOPMENT.md`, had
given `GITOXIDE_TEST_IGNORE_ARCHIVES`. This fixes that.
@EliahKagan EliahKagan marked this pull request as ready for review May 7, 2024 08:06
Copy link
Member

@Byron Byron left a comment

Choose a reason for hiding this comment

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

This…is a great catch!

Indeed, previously this environment variable wasn't as important for the test job, one simply wouldn't checkout git lfs. Now that these archives are integrated into the repository, they are always present though and thus the variable should be set correctly.

Now, I believe, this is once again the case.

This also means that for quite some time now, the test-scripts weren't run and thus never re-validated on unix where they are definitely expected to work.

There is no test-output as the test-runner by default captures all output, which will only be displayed in case of an error. cargo test -- --nocapture would do the trick, maybe that helps to locally see the messages you were expecting.

@Byron Byron merged commit 452e2b7 into GitoxideLabs:main May 7, 2024
19 checks passed
@EliahKagan EliahKagan deleted the archives-env-var branch May 7, 2024 19:24
EliahKagan added a commit to EliahKagan/gitoxide that referenced this pull request May 8, 2024
This replaces the old reason why it's not necessry to test locally
on Linux-based systems with `GIX_TEST_IGNORE_ARCHIVES`, which has
not been current for quite some time since the generated archives
are no longer in LFS, with the current reason.

This builds on the documentation part of GitoxideLabs#1360.
EliahKagan added a commit to EliahKagan/gitoxide that referenced this pull request May 8, 2024
This modifies the readme and one source code file to no longer say
that Git LFS is required to get generated archives, because they
are checked in as regular blobs instead these days, ever since
35439de (GitoxideLabs#1176). This may simplfy onboarding since readers are no
longer told they must do anything with `git lfs` to get started.

It also removes the LFS step from a CI test job definition that had
it, for the same reason: the generated archives are no longer
stored in LFS, so the only current expected effects of that step
are to make the job slightly more complicated and very slightly
slower. See also 7b3104d (GitoxideLabs#1360) and c60f270.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants