Skip to content
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

fix(travis): Enable legacy log fetching #1075

Merged
merged 2 commits into from
Jan 26, 2023

Conversation

jervi
Copy link
Contributor

@jervi jervi commented Jan 19, 2023

We've had lots of trouble with the log_complete feature Travis added a while back on our request. It was supposed to solve our issues with figuring out when logs are actually available (which can be up to several minutes after the build is complete) - but basically it can't be trusted. We've seen cases where it turns to true even before the build was completed (how can the logs be done then? 😆), and also in the opposite case, it can return false for a long time even though the logs are in fact complete. So it's better to just fall back to the old way of checking log completion (with some improvements*). We've been running this internally in Schibsted for several months, and have not seen any issues with log fetching during that time - a huge improvement from earlier!

* The log complete check will now check that the log output contains one of two phrases that all Travis builds should always contain - either Done. Your build exited with or travis_terminate.

@spinnakerbot
Copy link
Contributor

The following commits need their title changed:

  • f832e38: Temporarily enable legacy log fetching

  • 3f23255: Add another log complete check. Gotta love the Travis API ❤️

  • 46cc9fe: Add another mitigation clause (for travis_terminate)

  • 9917850: Avoid a nullpointer

  • bdcee73: Fix formatting

Please format your commit title into the form:

<type>(<scope>): <subject>, e.g. fix(kubernetes): address NPE in status check

This allows us to easily generate changelogs & determine semantic version numbers when cutting releases. You can read more about commit conventions here.

@jervi
Copy link
Contributor Author

jervi commented Jan 20, 2023

@spinnaker/oss-reviewers PTAL 🙂

@@ -83,17 +82,22 @@ public Map<String, TravisService> travisMasters(
igorConfigurationProperties.getClient().getTimeout(),
objectMapper);

boolean useLegacyLogFetching = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the record, it looks like this came from #449.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, correct. We had high hopes for this feature 😢

@@ -62,7 +62,12 @@ public boolean isReady() {
}
int numberOfParts = logParts.size() - 1;
V3LogPart lastLogPart = logParts.get(numberOfParts);
return numberOfParts == lastLogPart.number && lastLogPart.isFinal();
String logContent = getContent();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a new change...not reverting part of #449 ... Is this at least sort of, a separate improvement?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, this is an improvement. Travis will always end a build (failed or not) like this.

We've had lots of trouble with the log_complete feature Travis added a while back on our request. It was supposed to solve our issues with figuring out when logs are actually available (which can be up to several minutes after the build is complete) - but basically it can't be trusted. We've seen cases where it turns to true even before the build was completed (how can the logs be done then? 😆), and also in the opposite case, it can return false for a long time even though the logs are in fact complete. So it's better to just fall back to the old way of checking log completion (with some improvements). We've been running this internally in Schibsted for several months, and have not seen any issues with log fetching during that time - a huge improvement from earlier!
@dbyron-sf dbyron-sf added the ready to merge Approved and ready for merge label Jan 26, 2023
@mergify mergify bot added the auto merged label Jan 26, 2023
@mergify mergify bot merged commit 90abea1 into spinnaker:master Jan 26, 2023
@jervi jervi deleted the enable_legacy_log_fetching branch January 26, 2023 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants