Skip to content

Conversation

@joegallo
Copy link
Contributor

The codebase is very trappy on this, which is unfortunate, but at present we have no way of preventing this from happening (at least in the broadest sense, I think some simple special cases are checked automatically) besides being really careful all the time.

I just happened to notice that this snuck in via #117575, so I'm chasing that PR (hence the wide list of backports). I'm also including @original-brownbear as a reviewer because of the snapshot code.

@joegallo joegallo added >bug :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP Team:Data Management Meta label for data/management team v9.0.0 v8.17.0 v8.16.2 v8.17.1 v8.18.0 labels Dec 10, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@elasticsearchmachine
Copy link
Collaborator

Hi @joegallo, I've created a changelog YAML for you.

Copy link
Contributor

@nielsbauman nielsbauman left a comment

Choose a reason for hiding this comment

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

Thanks, Joe!

@joegallo
Copy link
Contributor Author

Related to #104782, in that with the changing of the seasons, I sometimes get the urge to fly south for the winter grep the codebase for these problems. But maybe we should 'just' have the build fail if problems like this sneak in?

@joegallo joegallo added the auto-backport Automatically create backport pull requests when merged label Dec 10, 2024
Copy link
Contributor

@original-brownbear original-brownbear left a comment

Choose a reason for hiding this comment

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

LGTM one cleanup suggestion though :)

// A normally running shard snapshot should be in stage INIT or STARTED. And we know it's not in PAUSING or ABORTED because
// the ensureNotAborted() call above did not throw. The remaining options don't make sense, if they ever happen.
logger.error(
() -> Strings.format(
Copy link
Contributor

Choose a reason for hiding this comment

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

This one is kinda nonsense? :) Why use a lambda and String.format here when you're not logging an exception?
I know it was like that before but maybe just remove the format call and lambda? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure thing, 6a21cc9.

return (String) asMap.keySet().toArray()[0];
}
logger.warn("--> No matching rollup name for path [%s]", endpoint);
logger.warn("--> No matching rollup name for path [{}}]", endpoint);
Copy link
Contributor

Choose a reason for hiding this comment

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

Just dropping by, typo here {}} -> {}?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

YIKES! Great catch, Sam!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@joegallo joegallo requested a review from samxbr December 10, 2024 17:46
Copy link
Contributor

@samxbr samxbr left a comment

Choose a reason for hiding this comment

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

LGTM

@joegallo joegallo merged commit 537f4ce into elastic:main Dec 10, 2024
16 checks passed
@joegallo joegallo deleted the fix-log-message-format-bugs branch December 10, 2024 20:01
@joegallo joegallo removed the v8.17.0 label Dec 10, 2024
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.16 Commit could not be cherrypicked due to conflicts
8.17 Commit could not be cherrypicked due to conflicts
8.x Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 118354

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged >bug :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP Team:Data Management Meta label for data/management team v8.16.2 v8.17.1 v8.18.0 v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants