face palm
I'm really surprised that this discussion about what constitutes an attack is happening. Maybe it has been too long since it's come up, but that has been
extensively discussed. There is
no question as the the official rule or designer intent.
PHB page 194: "If there's ever a question whether something you're doing counts as an attack, the rule is simple: if you're making an attack roll, you're making an attack."
Here's where you start thinking, "Yes, but that doesn't say that if you're making an attack you're
necessarily making an attack roll!"
Here is a comment by the designer:
Here's where you start thinking, "Okay, but 'something the rules call an attack' seems vague. If the rules are clear that it's a hostile or damaging effect, that might qualify."
And here is a discussion where the designer completely clarifies that it works exactly way I mentioned in the OP:
Is Magic Missile an ‘attack’?
I'm really not interested in a debate about a settled question.