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

Stop polluting filesystem (replay) #57934

Closed
wants to merge 2 commits into from

Conversation

strk
Copy link
Contributor

@strk strk commented Jun 29, 2024

This is a re-proposition of PR GH-57606 after all commits in that PR were reverted

This PR addresses the problem reported by @nyalldawson in #57606 (review) (reportedly causing a segfault on his system)

@strk strk requested a review from nyalldawson June 29, 2024 04:52
@github-actions github-actions bot added this to the 3.40.0 milestone Jun 29, 2024
@strk strk requested a review from elpaso June 29, 2024 04:54
@strk strk added the testsuite Issue related to testsuite label Jun 29, 2024
Copy link
Collaborator

@nyalldawson nyalldawson left a comment

Choose a reason for hiding this comment

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

This still has issues @strk. You don't check to see if that folder exists anywhere, neither is it ever cleaned up. You're trading proper operating system temporary file handling for storing everything in some custom location which is NEVER cleaned up.

Copy link

github-actions bot commented Jun 29, 2024

🪟 Windows builds ready!

Windows builds of this PR are available for testing here. Debug symbols for this build are available here.

(Built from commit da12030)

@strk
Copy link
Contributor Author

strk commented Jun 30, 2024

This still has issues @strk. You don't check to see if that folder exists anywhere, neither is it ever cleaned up. You're trading proper operating system temporary file handling for storing everything in some custom location which is NEVER cleaned up.

Given CI is green, may I ask you to give more details about what fails ? Note I filed at least 14 tickets about non-working testsuite when run locally but most of the times those issues are disregarded because "CI works!". I'm happy to improve offline testsuite experience but I need more details about what is not working for you.

So: how exactly those missing checks break the run for you ? Could you see a way to encode those situations in the CI so I can get a red here instead of a green ?

Copy link

The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check

  • that all unit tests are passing

  • that all comments by reviewers have been addressed

  • that there is enough information for reviewers, in particular

    • link to any issues which this pull request fixes

    • add a description of workflows which this pull request fixes

    • add screenshots if applicable

  • that you have written unit tests where possible
    In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request.
    If there is no further activity on this pull request, it will be closed in a week.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Jul 15, 2024
@benoitdm-oslandia
Copy link
Contributor

Hi, as we are building qgis on a mutliuser basis on the same big-cpu-ram server, we encounter issues with the mixed up of temp files in the /tmp. As our different users build different branches, we cannot use the same user for everyone. And tests fail due to conflicts on the files generated by tests owned by different users.

Do you have some updates about the last remaining issues? Do some tests are still failing?

Regards

@github-actions github-actions bot removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Jul 19, 2024
Copy link

github-actions bot commented Aug 3, 2024

The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check

  • that all unit tests are passing

  • that all comments by reviewers have been addressed

  • that there is enough information for reviewers, in particular

    • link to any issues which this pull request fixes

    • add a description of workflows which this pull request fixes

    • add screenshots if applicable

  • that you have written unit tests where possible
    In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request.
    If there is no further activity on this pull request, it will be closed in a week.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Aug 3, 2024
Copy link

While we hate to see this happen, this PR has been automatically closed because it has not had any activity in the last 21 days. If this pull request should be reconsidered, please follow the guidelines in the previous comment and reopen this pull request. Or, if you have any further questions, just ask! We love to help, and if there's anything the QGIS project can do to help push this PR forward please let us know how we can assist.

@github-actions github-actions bot closed this Aug 10, 2024
@strk
Copy link
Contributor Author

strk commented Aug 11, 2024

It's a pity to close this PR only because neither @nyalldawson nor me found the time yet to provide a test showing the problem reported by Nyall. The CI is green while we want it to be RED to show the problem. Wasn't there a way to ask stalebot to not get in the way ?

@strk strk reopened this Aug 11, 2024
@github-actions github-actions bot removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Aug 11, 2024
@strk strk added the Requires Tests! Waiting on the submitter to add unit tests before eligible for merging label Aug 11, 2024
@strk
Copy link
Contributor Author

strk commented Aug 11, 2024

You don't check to see if that folder exists anywhere,

I believe the functions used to create temporary directory create the target if non-existing, wouldn't CI be red if this was not the case ?

neither is it ever cleaned up.

This is already the case before this PR, the only difference is that all that mess is left in the system shared /tmp directory rather than in the build tree. I agree it is a problem but is a problem that needs to be addressed by each test leaving temp files behind (not all tests do).

You're trading proper operating system temporary file handling for storing everything in some custom location

It's the build directory, it is already used to store build artifacts. These temporary files are the same. I agree things could be further improved and it would be easy to wipe out the whole temporary directory at the end of the ctest run but as we're not talking about a problem introduced by this PR I'd rather merge the improvement and further improve later instead of letting this opposed by stalebot and letting it fade out.

@nyalldawson
Copy link
Collaborator

nyalldawson commented Aug 11, 2024

@strk you didn't actually fix any of the issues I've explicitly outlined in #57882 .👎 I'm out of patience and time for dealing with this, and am muting this issue now. I'll leave to others to carefully review and confirm that my issues have been resolved before they take the response to merge.

@benoitdm-oslandia
Copy link
Contributor

Hi @strk, to go forward on this issue I created a PR (but I forgot to mention this PR in mine). I fixed some of the hardcoded '/tmp/' but I did not changed the CMake build.

Now, it is possible to sandbox the test runs in a specific directory by modifying the TMPDIR env var.

Regards.

@benoitdm-oslandia
Copy link
Contributor

linked to qgis/QGIS-Documentation#9208

@strk
Copy link
Contributor Author

strk commented Aug 29, 2024

Thank you @benoitdm-oslandia

@strk strk force-pushed the stop-polluting-filesystem branch from e482323 to da12030 Compare August 29, 2024 13:36
@strk
Copy link
Contributor Author

strk commented Aug 29, 2024

So this PR changes are solely to change the default temporary directory from the system temporary directory to a 'tmp' directory under the build tree. We can see CI is still green so the target directory does not need seem to exist or the tests are broken (false successes?). It would help if @nyalldawson gave us a recipe to reproduce the problem he's having with these changes.

I've observed locally that the system /tmp dir is still polluted with files like /tmp/QGIS-PythonTestConfigPath-xxxxx directories, and I found still some hard-coded /tmp directories that could be further turned into using a tempdir function (ie: src/core/maprenderer/qgsmaprendererjob.cpp)

I could work on those hard-coded tmpdir in a separate PR if it's easier to accept

@strk strk requested a review from benoitdm-oslandia August 29, 2024 15:15
@benoitdm-oslandia
Copy link
Contributor

sorry @strk as said above the hard-coded tmpdir were already fixed here.

@strk
Copy link
Contributor Author

strk commented Aug 30, 2024

sorry @strk as said above the hard-coded tmpdir were already fixed here.

Yeah, on a closer look I found that the left-over hard-coded /tmp/ are protected by debug macros, probably not worth fixing them at the moment.

What do you think about using the build dir to store the temporary files ? If we do so we may wipe out the directory at test start (as a fixture). I don't see two concurrent builds using the same build dir, which should also resolve your multi-user issue

@benoitdm-oslandia
Copy link
Contributor

It seems it is better not to bother with the cmakelist ... so I started to prefix my command lines with TMPDIR=/tmp/my_test_dir to isolate my test runs. It is not as inconfortable as it looks and it does the job.

Copy link

The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check

  • that all unit tests are passing

  • that all comments by reviewers have been addressed

  • that there is enough information for reviewers, in particular

    • link to any issues which this pull request fixes

    • add a description of workflows which this pull request fixes

    • add screenshots if applicable

  • that you have written unit tests where possible
    In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request.
    If there is no further activity on this pull request, it will be closed in a week.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Sep 14, 2024
Copy link

While we hate to see this happen, this PR has been automatically closed because it has not had any activity in the last 21 days. If this pull request should be reconsidered, please follow the guidelines in the previous comment and reopen this pull request. Or, if you have any further questions, just ask! We love to help, and if there's anything the QGIS project can do to help push this PR forward please let us know how we can assist.

@github-actions github-actions bot closed this Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Requires Tests! Waiting on the submitter to add unit tests before eligible for merging stale Uh oh! Seems this work is abandoned, and the PR is about to close. testsuite Issue related to testsuite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants