The big problems in the Russia-China relationship can't be solved by a gas deal
On Wednesday, Russia and China signed a $400 billion dollar natural gas deal. According to Vladimir Putin, Russia's agreement to sell 38 billion cubic meters of gas to China is "the biggest contract in the history of the gas sector of the former USSR." Putin's Soviet reference can't help but remind observers of the days when Russia and China were both real Communist powers, on the same side against America and its Western allies.
Russia and China have a marriage of convenience
The deal does get to American fears that Russia, pushing away from Europe after the Ukraine crisis, could team up with China against the Western world. Moscow may want to communicate that as well: Russia Today, the Kremlin's English-language propaganda channel, ran a piece calling the deal "the beginning of the de-dollarization and de-Americanization of the world."
But the idea of a world-changing Russia-China alliance is poppycock. The natural gas deal doesn't augur an anti-American alliance in the near term. Even in the long term, no such alliance is likely. Russia and China have a marriage of convenience, not any kind of more durable partnership. And sometimes, that turns into conflict: the two nations see each others as both potential partners and potential threats.
Beyond the propaganda value of talking about an anti-American alliance, it turns out that neither China nor Russia really has it in their interests to form a military alliance. A non-aggression pact, mutual defense treaty, or any other kind of alliance would only be useful if either country was at imminent risk of invasion (they're not), or if they wanted to work together in some act of aggression abroad. But neither has shown any interest in helping out with the other's border conflicts.
Again, both state medias like to talk about challenging the world order, but there's little evidence either China or Russia wants that.
The gas deal doesn't alter these fundamental realities. It makes much more sense as a pragmatic step on both sides, one that furthers the concrete interests of both sides without committing them to a broader strategic relationship.
Russia, for its part, gets money. It also gets to show the US and Europe that it has an alternative to European gas sales, an important stick in the ongoing conflict over Ukraine.
China gets natural gas at a good price. That $400 billion price tag may seem high, but the per-cubic meter rate is pretty good by global standards. So China gets to diversify its heavily coal-dependent energy sector at a bargain rate, which isn't thrilling news for Russia's rapidly worsening economy. If the gas wasn't at such a good price, China probably would have scuttled the deal.
In other words, short term political and economic motivations explain everything that needs explaining here. Russia and China sometimes have overlapping interests, but they're not allies. And it's hard to see how they ever could be.