-
Notifications
You must be signed in to change notification settings - Fork 65
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
Artifacts folder #827
Comments
Hi @lucacome This is working as designed, since we want to make sure the user clears out the artifacts folder for before each run to ensure we are using the latest information from the most recent run. Preflight by default writes to Preflight uses this folder to save off information gathered in the checks/policies that are then later used during the submission process to send to the backend system. |
Hi @acornett21 thanks for the explanation. Maybe I'm missing some context, but I'm not sure how the artifacts folder is useful to the end user (like me). So in the end I'm not sure what benefit I'm getting from the artifacts folder (given that the IMHO, a better experience (at least for me) is that if somebody uses |
I very strongly disagree with this design. There is nothing in the real documentation (I don't mean some random "readme.md" file in a GitHub folder, but here: [1]) that discusses how multiple runs of Preflight will require cleaning out an artifacts folder. You have changed the tool's behavior without the change being properly documented. This change is now creating support cases. I actually see no point in saving the artifacts folder; it should be created fresh each time, and any pre-existing one should be automatically deleted. The amount of time saved is minimal for most containers. Please rescind the change. An alternative way would be to only save the artifacts folder if the partner requests it via an |
@jfrancin if able, could you describe/paraphrase what the support case's reported issue is, and what the recommended resolution is (most commonly)? I ask simply because it would seem the issue preflight detects, and its resolution should be derived from the error message it returns. And so I'm having trouble placing exactly what's landing a support case, given that the problem/cause here is, at least, somewhat clear. Are there more aspects of this issue leading to/warranting the support case that I'm not seeing other than "I need to clean out the artifacts directory and I didn't need to do so before"?
You're right. I generally supported this change because it, in my opinion, led to less inconsistency. That is, working with a fresh directory, to me, is preferable. For what it's worth: with some upcoming changes in our code's organization, we will see similar collision issues with the artifacts directory that we'll look to resolve that will likely also resolve this issue. |
As a point of reference, I believe the issue is here: openshift-preflight/certification/artifacts/artifacts.go Lines 55 to 57 in 174eea6
|
The cases basically say that they hit failures due to the errors being thrown by the existence of files in the artifacts directory. The resolution was to remove the files prior to re-running Preflight. There are no other aspects other than what I reported. The problems are: a) it's a behaviour change that wasn't documented (already discussed above); b) it prevents doing an easy 'build-test-debug" workflow for partners working to weed out Preflight errors prior to running a final one with the Perhaps as an alternative the created filenames in the artifacts directory could be timestamped in some way so that each run's results are independent and can coexist in the same directory? That way the 'freshness' of the directory is irrelevant, as every run will generate a uniquely-named set of artifact files. |
I just want to clear up a miss conception here, it's not just the
So adding a timestamp wouldn't help, since we would not know which file to to pick for container/rpm/results. Having a clean/empty directory is ideal. Like @komish mentioned, we are working on a large refactor that will hopefully also remove this pain point. |
Hey folks, for the time being, we've gone ahead and rolled back the behavior and cut a beta release so that you have something you can use. Please check out https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/tag/1.5.0-beta2. |
I believe with the merging of #866 that we can close this issue. Please re-open or create a new issue if there is anything further. |
Bug Description
Every time I run
preflight check container
I need to change the artifacts folder with--artifacts=
.Version and Command Invocation
Steps to Reproduce:
(How can we reproduce this?)
preflight check container
with an imagepreflight check container
with an image a second timeError: could not write file to artifacts directory
Expected Result
The ideal would be for me to not have to specify the artifacts folder. I'm not even sure why that's needed.
Actual Result
I have to change the folder in the command line for every architecture of every image that I want to certify.
The text was updated successfully, but these errors were encountered: