Skip to content

Remove expected hints for shallow clone#54

Closed
leander-dsouza wants to merge 2 commits intomainfrom
leander-dsouza/update-test-hashes
Closed

Remove expected hints for shallow clone#54
leander-dsouza wants to merge 2 commits intomainfrom
leander-dsouza/update-test-hashes

Conversation

@leander-dsouza
Copy link
Member

@leander-dsouza leander-dsouza commented Sep 2, 2025

Basic Info

Info Please fill out this column
Ticket(s) this addresses N/A
Primary OS tested on Ubuntu
Is this a breaking change? No
Does this PR contain AI generated software? No

Description of contribution in a few bullet points

  • Adjusted the expected value of shallow clone to remove hints: before comparing with output.
    This is seen in newer versions of git, where the following message is printed:

    hint: Using 'master' as the name f"
        +  b'or the initial branch. This default branch name\nhint: is subject to chan'
        +  b'ge. To configure the initial branch name to use in all\nhint: of your new'
        +  b' repositories, which will suppress this warning, call:\nhint:\nhint: \tgit '
        +  b'config --global init.defaultBranch
  • This is motivated by Add Codecov testing workflow #53, as the disabling of the below messages is not possible when using a custom image with ros-infrastructure/ci/.github/workflows/pytest.yaml@main.

    git config --global --add init.defaultBranch main
    git config --global --add advice.detachedHead true
  • The hint messages are disabled only for the test_import_shallow test. This is because only this test fails under ubuntu-latest. If windows-2025 or macos-latest images are used, all of them fail, as the hints are forced for all the git commands.

    Since the codecov action is only run on ubuntu-latest, disabling the test_import_shallow test is sufficient.

  • Added the test_workspace to the .gitignore file to safely ignore the dummy folder during test runs.

Description of how this change was tested

  • Verified that the code passes all tests using pytest -s -v test

@leander-dsouza leander-dsouza marked this pull request as ready for review September 2, 2025 09:48
Signed-off-by: Leander Stephen D'Souza <leanderdsouza1234@gmail.com>
@leander-dsouza leander-dsouza force-pushed the leander-dsouza/update-test-hashes branch from b7484b7 to 61cc2e3 Compare September 2, 2025 11:04
@leander-dsouza leander-dsouza marked this pull request as draft September 2, 2025 11:05
@leander-dsouza leander-dsouza force-pushed the leander-dsouza/update-test-hashes branch 3 times, most recently from f5c60a9 to 6fcd3c8 Compare September 2, 2025 11:57
Signed-off-by: Leander Stephen D'Souza <leanderdsouza1234@gmail.com>
@leander-dsouza leander-dsouza force-pushed the leander-dsouza/update-test-hashes branch from 6fcd3c8 to 2f191be Compare September 2, 2025 12:00
@leander-dsouza leander-dsouza changed the title Update test repository hashes Remove expected hints for shallow clone Sep 2, 2025
@leander-dsouza leander-dsouza marked this pull request as ready for review September 2, 2025 12:07
@leander-dsouza
Copy link
Member Author

Closing this PR in favour of #58.

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.

1 participant