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

Build directories in the cache are ignored #10

Closed
jeremyfowers opened this issue Dec 1, 2023 · 0 comments · Fixed by #48 or #65
Closed

Build directories in the cache are ignored #10

jeremyfowers opened this issue Dec 1, 2023 · 0 comments · Fixed by #48 or #65
Assignees
Labels
bug Something isn't working p1 Medium priority
Milestone

Comments

@jeremyfowers
Copy link
Collaborator

filesystem.get_available_builds() looks for a .turnkey_build file marker to assess whether a directory is a build directory. There are a variety of situations where .turnkey_build is excluded, which then causes issues. For example, turnkey cache report doesn't care about .turnkey_build but turnkey cache delete --all does check for it.

The call to create_build_directory() was placed where it was, in analyze/script.py because we were under code freeze for the build tool at the time. As you can see in the comment, this was not the right long-term home for it.

The placement of that call lead to a bug: if the process doing the build is killed for any reason (e.g., a timeout), then that finally block will never execute and the directory will not count as a build because it doesn't have a .turnkey_build marker in it. In turn, this impacts functions like filesystem.get_available_builds() that check for that marker (ie, such a build shouldn't show up in turnkey cache list).

Solution: move the LoC to the right long term home: the moment the build is actually being created: build/ignition/py::_begin_fresh_build()

@jeremyfowers jeremyfowers added bug Something isn't working p1 Medium priority labels Dec 1, 2023
@jeremyfowers jeremyfowers added this to the Version 1.0 milestone Dec 2, 2023
@jeremyfowers jeremyfowers self-assigned this Dec 2, 2023
@jeremyfowers jeremyfowers reopened this Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working p1 Medium priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant