-
Notifications
You must be signed in to change notification settings - Fork 198
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
Disable Etag #321
Milestone
Comments
Thanks for (1) ! The current implementation is so crude. All other points make 100% sense to me, except (6) . Since only way to know whether the data is new, is to check it against what we have in the db one to one. We can't just skip a file. Hence metadata like etag is used. Any other way to do this ? |
Maybe adding a flag, to skip interpretting etag would help ? |
pombredanne
added
Priority: medium
Data collection
import-improver-migration
and removed
Data collection
labels
Jan 24, 2022
Hritik14
added a commit
to Hritik14/vulnerablecode
that referenced
this issue
Jan 26, 2022
Etags are meant for transient usage in browsers and are not meant for any long term usage. Fixes: aboutcode-org#321 Signed-off-by: Hritik Vijay <hritikxx8@gmail.com>
Hritik14
added a commit
to Hritik14/vulnerablecode
that referenced
this issue
Jan 26, 2022
Etags are meant for transient usage in browsers and are not meant for any long term usage. Fixes: aboutcode-org#321 Signed-off-by: Hritik Vijay <hritikxx8@gmail.com>
Hritik14
added a commit
to Hritik14/vulnerablecode
that referenced
this issue
Jan 26, 2022
Etags are meant for transient usage in browsers and are not meant for any long term usage. Fixes: aboutcode-org#321 Signed-off-by: Hritik Vijay <hritikxx8@gmail.com>
Hritik14
added a commit
to Hritik14/vulnerablecode
that referenced
this issue
Feb 5, 2022
Etags are meant for transient usage in browsers and are not meant for any long term usage. Fixes: aboutcode-org#321 Signed-off-by: Hritik Vijay <hritikxx8@gmail.com>
Hritik14
added a commit
to Hritik14/vulnerablecode
that referenced
this issue
Feb 5, 2022
Etags are meant for transient usage in browsers and are not meant for any long term usage. Fixes: aboutcode-org#321 Signed-off-by: Hritik Vijay <hritikxx8@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The current Etag handling IMHO are more problematic than helpful at this stage, especially when there is a failure during import. See 255b7f9#diff-938a299f8406c1d3defaec48838bc4f6f1307635f5d2ba36e9777227cedbb383R46
We are not using Etag correctly: Etags are designed to be passed back in HTTP headers. We should instead send the proper HTTP header as per https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match and integrate this finely in the processing as this typically needs to use streaming=True requests, and proper handling of the HTTP return code. In all cases this should end up being a single request, not a HEAD followed by another GET request
Etag are unlikely meant to stored long term in the DB like we are now
the
create_etag
function name is misleading as we are creating, checking and saving the Etag in thiscreate_etag
functionIf some import fails, we have to manually delete the records in the DB to restart an import
the time it takes to download data seems to be very small when compared with the time to perform the import
Once the initial import is done, incremental import should be much smaller, making Etgas even less relevant
Therefore, I think we need to reconsider using Etag.
The text was updated successfully, but these errors were encountered: