-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implement analyze
mode for embed-code-go
.
#35
Conversation
…Engine/embed-code into embed-code-go-analyze
…Engine/embed-code into embed-code-go-analyze
…Engine/embed-code into embed-code-go-analyze
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with the respect of some comments to address first.
…Engine/embed-code into embed-code-go-analyze
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vb-td LGTM with some minor comments
if err != nil { | ||
problemEmbeddingsLines = append(problemEmbeddingsLines, err.Error()) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have continue
here or maybe else if
since it take time to understand why we need to check changedEmbeddings
even in case of errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is confusing, but it can be many embeddings in one file, some of them can cause an error and some of them can be changed. So it is made by intention. I can comment this part or just don't check the file for changed embeddings if any error occurs.
…Engine/embed-code into embed-code-go-analyze
In this PR, the
analyze
mode was added.Now, it is possible to run program to find the code embeddings which don't have corresponding code fragments for them. All corresponding information is written to the
build/analytics/embeddings-not-found-files.txt
file.Here is example of the typical record in this file:
Also, the information about changed embeddings collected as well. All corresponding information is written to the
build/analytics/embeddings-changed-files.txt
file.Here is example of some typical records in this file:
Additionally, the error-handling flow has been modified. Previously, if any error occurred during the processing, the entire flow would stop. This behavior made it impossible to scan all embeddings and collect comprehensive analytics. Now, if any error occurs, the flow continues, the encountered errors are collected as artifacts, and no embeddings are performed as a result.