feat: Replace deprecated Doppler recentLogs with Log Cache client 5.X.X#1348
Open
jorbaum wants to merge 24 commits intocloudfoundry:5.x.xfrom
Open
feat: Replace deprecated Doppler recentLogs with Log Cache client 5.X.X#1348jorbaum wants to merge 24 commits intocloudfoundry:5.x.xfrom
jorbaum wants to merge 24 commits intocloudfoundry:5.x.xfrom
Conversation
* because of the findFirst() on the envelopes, it could be type OUT or ERR, so we don't really care, as long as the payload is the same. Also, we don't care about the precise argument to the recentLogs call
The old "Applications.logs" method is keept for compatibility and when a log stream is needed. Adding new "logsRecent" method to access the logCache. integration-tests "ApplicationTest.logs" and "ApplicationTest.logsRecent" work. Minor changes in DefaultApplicationsTest in other JUnit tests to make them execute in Eclipse.
Use LogCacheClient.read() for recent logs (the default), fall back to Doppler streaming when recent is explicitly false. Remove logCacheLogs() integration test — it was a temporary reference for the direct LogCache API, now redundant since logs() exercises the same path. Remove logsRecent() and its helpers likewise.
LogCache has been available since cf-deployment v3.0.0 (July 2018). Lower the version gate from PCF_4_v2 to PCF_2_3 and update the javadoc to reflect that the test now exercises the LogCache-backed path.
logs(ApplicationLogsRequest) now uses Log Cache internally, so Operations API users do not need to migrate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Rebases #1237 on top of the 5.x.x branch.
All feedback of #1237 and ZPascal#2 should be addressed:
Optionalsimplification (discussed in cloudfoundry#1237 bleeding edge jorbaum ZPascal/cf-java-client#2)recentLogswith Log Cache client #1237 )logs(ApplicationLogsRequest)from Doppler to LogCache (discussed in feat: Replace deprecated DopplerrecentLogswith Log Cache client #1237 )logs()integration test javadoc and version gate (discussed in feat: Replace deprecated DopplerrecentLogswith Log Cache client #1237 )Integrationtest results
I did not rerun the integration tests successfully on my dev environment for this 5.x.x branch so far as I ran into UAA rate limiting issues.
Previous runs with main as base
LogCacheTest
ApplicationsTest