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(agent): SHA256SUMS being looked up in the parent directory #842

Merged
merged 2 commits into from
Jul 18, 2024

Conversation

CarlosNihelton
Copy link
Contributor

@CarlosNihelton CarlosNihelton commented Jul 18, 2024

We didn't notice this behaviour in tests because our mocked file server was serving files in the root directory (since the parent of / is / everything just worked).

Changing tests to serve and search files inside a subdirectory reveal the problem: we're not looking for the checksums file beside the rootfs but rather in the parent directory. We see log lines like below:

time="2024-07-18T10:42:53-03:00" level=debug msg="Landscape: received command Install. Target: testDistro_UP4W_TestInstall_Error_when_the_checksum_entry_is_missing_for_the_rootfs_5721719220902747386"
time="2024-07-18T10:42:53-03:00" level=info msg="checksums file http://127.0.0.1:57850/releases/SHA256SUM" not found"


UDENG-3669

We see log lines like below:

time="2024-07-18T10:42:53-03:00" level=debug msg="Landscape: received command Install. Target: testDistro_UP4W_TestInstall_Error_when_the_checksum_entry_is_missing_for_the_rootfs_5721719220902747386"
time="2024-07-18T10:42:53-03:00" level=info msg="checksums file \"http://127.0.0.1:57850/releases/SHA256SUMS\" not found"

Notice the path to the checksums file (one dir above the expected - it should be /releases/theone/SHA256SUMS)
Copy link

codecov bot commented Jul 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.28%. Comparing base (ca2716b) to head (b75c5f5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #842      +/-   ##
==========================================
- Coverage   88.36%   88.28%   -0.09%     
==========================================
  Files         105      105              
  Lines        6758     6758              
==========================================
- Hits         5972     5966       -6     
- Misses        612      617       +5     
- Partials      174      175       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@CarlosNihelton CarlosNihelton marked this pull request as ready for review July 18, 2024 14:02
@CarlosNihelton CarlosNihelton requested a review from a team as a code owner July 18, 2024 14:02
@CarlosNihelton CarlosNihelton self-assigned this Jul 18, 2024
Copy link
Collaborator

@didrocks didrocks left a comment

Choose a reason for hiding this comment

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

Excellent! Glad this is fixed and that we have a clear understanding why the tests were wrongly passing before :)

@CarlosNihelton CarlosNihelton merged commit 524a934 into main Jul 18, 2024
37 checks passed
@CarlosNihelton CarlosNihelton deleted the fix-sha256sums-path branch July 18, 2024 15:55
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