I always found it odd that Reagan's "tear down this wall" speech was only 4 years before the collapse. At that point was the USSR still running strong to an outside observer?
This question can go for both the West and to Soviets themselves.
It depends on who you're asking about, but it seems to have taken most people by surprise. Authors like Tom Clancy were writing books with the Soviet Union as an antagonist as late as 1990/91 (eg The Sum of All Fears).
Various sources predicted the demise of the USSR throughout the Cold War but they tended to be more general "Communism is doomed to fail because of x, y and z" treatises, rather than people specifically looking at Gorbachev's reforms and saying "this is what's going to bring down the system. There may have been some people saying that, but the received wisdom was that Glasnost and Perestroika and even the fall of communism in Eastern Europe would lead to reforms in the USSR at most, and I remember there being an expectation that they may have decided to let the other nations go, but if the protests spread to Russia the tanks would be on the streets quick-smart.