Do not request the same log line from Registry on every iteration #1385
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the change
Turns out the Registry understands the
sincefield as "greater or equal", so that sending the last line's timestamp on the next request results in returning that same last line again.To fix, I'm adding a millisecond to the timestamp, so that the same line doesn't qualify anymore.
Another option could be to patch the registry to change the meaning of the
sincefield to just "greater". But since milliseconds are integer anyway, 1 is the smallest difference, so the result would be the same.I tested the change manually by publishing a package. But there is no automated test. Turns out, there are no tests for non-offline publishing at all. Adding them would require mocking the Registry API, and I didn't think it was warranted for such small and largely insignificant change.
Fixes #1381
Checklist:
Added some example of the new feature to theREADMEAdded a test for the contribution (if applicable)P.S.: the above checks are not compulsory to get a change merged, so you may skip them. However, taking care of them will result in less work for the maintainers and will be much appreciated 😊