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

Cut the test result directory shorter when its length is more than 255 #2307

Merged
merged 1 commit into from
Sep 5, 2019

Conversation

Amrysliu
Copy link
Contributor

@Amrysliu Amrysliu commented Sep 4, 2019

The job will fail when the length of the test result directory is more than 255. Because there is a limit in creating directory that the directory name length cannot exceed 255.

See: https://progress.opensuse.org/issues/56405

Copy link
Contributor

@coolo coolo left a comment

Choose a reason for hiding this comment

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

please change your commit log - that you fixed a ticket is mostly obvious. Just explain your solution

@codecov
Copy link

codecov bot commented Sep 4, 2019

Codecov Report

Merging #2307 into master will decrease coverage by 54.07%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #2307       +/-   ##
===========================================
- Coverage   83.59%   29.51%   -54.08%     
===========================================
  Files         165      117       -48     
  Lines       10788     7538     -3250     
===========================================
- Hits         9018     2225     -6793     
- Misses       1770     5313     +3543
Impacted Files Coverage Δ
lib/OpenQA/Schema/Result/Jobs.pm 43.37% <0%> (-42.24%) ⬇️
lib/OpenQA/File.pm 6.81% <0%> (-93.19%) ⬇️
lib/OpenQA/Schema/Result/ScheduledProducts.pm 5.64% <0%> (-91.54%) ⬇️
lib/OpenQA/Schema/ResultSet/Assets.pm 8.2% <0%> (-90.3%) ⬇️
lib/OpenQA/Git.pm 6.12% <0%> (-89.8%) ⬇️
lib/OpenQA/Worker/Isotovideo/Client.pm 10.34% <0%> (-89.66%) ⬇️
lib/OpenQA/Worker.pm 5.49% <0%> (-89.01%) ⬇️
lib/OpenQA/ExpandPlaceholder.pm 11.11% <0%> (-88.89%) ⬇️
lib/OpenQA/Client/Upload.pm 11.62% <0%> (-88.38%) ⬇️
lib/OpenQA/Files.pm 12.5% <0%> (-87.5%) ⬇️
... and 120 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 87f158e...45c96e7. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 4, 2019

Codecov Report

Merging #2307 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2307      +/-   ##
==========================================
+ Coverage   86.04%   86.04%   +<.01%     
==========================================
  Files         168      168              
  Lines       10883    10884       +1     
==========================================
+ Hits         9364     9365       +1     
  Misses       1519     1519
Impacted Files Coverage Δ
lib/OpenQA/Schema/Result/Jobs.pm 85.98% <100%> (+0.01%) ⬆️
lib/OpenQA/Worker/Settings.pm 84.9% <0%> (-13.21%) ⬇️
lib/OpenQA/Worker/Engines/isotovideo.pm 94.58% <0%> (+0.49%) ⬆️
lib/OpenQA/Worker/WebUIConnection.pm 80.95% <0%> (+2.85%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 94a2b98...7b67a5f. Read the comment docs.

@Amrysliu Amrysliu changed the title Fix the ticket that job fails when result directory is too long Cut the test result directory shorter when its length is more than 255 Sep 4, 2019
Copy link
Contributor

@Martchus Martchus left a comment

Choose a reason for hiding this comment

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

Have you actually tried to clone and run https://openqa.suse.de/tests/3300015? Because I'm not sure whether the limit of 255 is only for the directory name or for the entire path. If the limit is for the entire path it won't work to truncate only the result directory name.

@coolo
Copy link
Contributor

coolo commented Sep 4, 2019

the directory entry is limited to 256 chars, the full path to 4096 - so we should be good

@Amrysliu
Copy link
Contributor Author

Amrysliu commented Sep 4, 2019

Have you actually tried to clone and run https://openqa.suse.de/tests/3300015? Because I'm not sure whether the limit of 255 is only for the directory name or for the entire path. If the limit is for the entire path it won't work to truncate only the result directory name.

I have not tried to clone this job. I did test which just like it. Here is http://10.161.8.44/tests/575 This is the test result after I modified the code.

@okurz okurz merged commit 5c2b878 into os-autoinst:master Sep 5, 2019
coolo pushed a commit that referenced this pull request Sep 5, 2019
commit 5c2b878
Merge: 94a2b98 7b67a5f
Author:     Oliver Kurz <okurz@suse.de>
AuthorDate: Thu Sep 5 07:41:27 2019 +0200
Commit:     GitHub <noreply@github.com>
CommitDate: Thu Sep 5 07:41:27 2019 +0200

    Merge pull request #2307 from Amrysliu/fix_56405

    Cut the test result directory shorter when its length is more than 255
@Amrysliu Amrysliu deleted the fix_56405 branch April 14, 2020 07:45
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.

4 participants