It wasn't very good.
In 1929, the first sound film to win the Best Picture Oscar was a musical, The Broadway Melody.
I haven't seen it.
The first great series of musicals started in 1929, with Ernst Lubitsch directing Maurice Chevalier and Jeannette MacDonald in The Love Parade.
The three of them went on to make three more musicals together: Monte Carlo, One Hour With You and (the best of them) The Merry Widow. Early sound films are notably for their staginess, as recording equipment made camera movements (and/or actor movements) extremely difficult. The song at the end of the scene above is typical: Chevalier and MacDonald standing facing the camera and not looking at each other, being sure to sing clearly into the microphone hidden somewhere between them.
Lubitsch brought a unique comic style to the film's dialogue (fast-paced, full of word-playing puns and double entendres, imported from Broadway plays and comedians like the Marx Brothers), something that would become the dominant mode of comedy in the 1930s, whether in standard romantic or screwball comedies, or in musical comedies like the Astaire-Rogers films.
By the early 1930s, the camera movement limitations had largely been overcome and directors were once again able to experiment as freely as they had done in the late silent period. The most experimental of musical directors was Busby Berkeley, whose obsessions with geometry and women's legs became synonymous with the genre.
The above scene from 1933's Footlight Parade is a typical example of Berkeley's delirious excess. The plots for most of these films (the Gold Diggers films, Dames, 42nd Street) usually involve a group of struggling actors producing a play on Broadway. Unlike in the Lubitsch films, the musical bits are ostensibly from their performances (as opposed to naturalish outgrowths of the characters' dialogue), though no stage ever built could contain a Busby Berkeley musical number, and the film is shot in such a way that no theatre-goer could have the same experience as the film-viewer. This is a radical shift from the presentational, stand-and-sing style of the stagey films of the late 20s toward a type of uniquely cinematic musical.
And he didn't get any saner as time went on. Here's a sequence with Carmen Miranda from 1943's The Gang's All Here:
The Astaire-Rogers films of the mid-30s present a kind of fusion of these two styles, the screwball dialogue, unmotivated singing and straight-ahead, realistic framing of Lubitsch with the Broadway settings and elaborate dance sequences of Busby Berkeley.
The plots usually involve mistaken identities. In Swing Time, Rogers is a dancing instructor and Astaire pretends to need lessons, then he shows her boss what she's taught him:
In Top Hat, Rogers thinks Astaire is married to her best friend:
Astaire's films during the 1930s are very much about what the human body in motion is capable of doing. This is why he insisted that all his dance sequences be framed head-to-toe, such that the entirety of their two bodies were on-screen all the time, with as few edits as possible. The Astaire-Rogers musicals shot for a Bazinian ontology that Berkeley was not the least bit interested in.
The Astaire-Rogers films generally ended with a big production number, just like the Berkeley films. Sometimes it would include a lot of extras ("The Piccolino" in Top Hat), sometimes just Fred and Ginger ("Let's Face The Music And Dance" from Follow The Fleet). The important thing is that by the time of this last dance sequence, pretty much everything has been resolved and the rest of the film is just clearing up any remaining plot points as quickly as possible.
Musicals continued to evolve throughout the 1940s, most notably with the films of Vincente Minnelli and Judy Garland (Meet Me In St. Louis, The Pirate). Garland starred in a series of films with Mickey Rooney in the late 30s that were essentially a teen version of the backstage musicals of the early 30s. Instead of putting on a Broadway play, the kids would end up putting on a show in a local barn. Here they are in Busby Berkeley's Babes In Arms:
And here's Garland with Gene Kelly in The Pirate:
The next truly radical shift in what was considered possible in a musical film didn't come until 1948's The Red Shoes (directed by Michael Powell & Emeric Pressburger), with its elaborate, hallucinatory ballet sequence.
Minnelli and star Gene Kelly tried to top that with an 18 minute ballet sequence at the end of An American In Paris.
Unlike in The Red Shoes, where the dance sequence is a version of a stage performance, filtered through the artistic delirium of the dancer while she's performing, the An American In Paris ballet is presented as a (day)dream sequence, one in which the main character relives and attempts to come to terms with his romance gone wrong. The sequence comes at the emotional climax of the film and resolves the main characters feelings. All that's left for the movie when it is over is the happy ending.
Which brings us to Singin' In The Rain. The film was conceived by producer Arthur Freed as a way to utilize a bunch of old songs he'd used in musical films in the 1930s. Here's the title song from the end of the first film it appeared in, The Hollywood Revue Of 1929:
As such, screenwriters Betty Comden and Adolph Green conceived the film around the time when the songs were originally written and popular. Singin' In The Rain is structured as a tribute to the 1930s musical, incorporating all the developments the genre had seen in its first 20+years. The musical sequences throughout the movie build on the methods of older films in addition to co-opting their songs. "Beautiful Girls" is totally unrelated to the plot of the film and involves none of the major characters in any significant way, but it would not look out of place sung by William Powell in a Golddiggers film. "Make 'Em Laugh" (a new song for this film, based on Cole Porter's "Be A Clown" from The Pirate) is filmed Astaire-style, in order to show off Donald O'Connor's ridiculous stunts. The "Fit As A Fiddle" montage from early in the film shows Kelly and O'Connor evolving through the different classes of musical vaudeville and theatre. Seen in this light, the "Broadway Melody" sequence near the end of the film makes perfect sense.
I've heard an irritating number of times that that sequence doesn't fit in the film, that it has nothing to do with the plot, is pointless and the movie would be better if it was removed. Of course, these people are philistines, but they are also factually incorrect: the sequence is essential to what the film is really about. Gene Kelly's character in Singin' In The Rain, Don Lockwood, is attempting to salvage his early talkie swashbuckler by turning it into a musical (The Dancing Cavalier). The plot of Singin' In The Rain revolves around the making of The Dancing Cavalier, just as the plot of 42nd Street revolves around putting on a Broadway play. Of course we're going to have to, at some point, see the finished product, it is what the film has been leading up to for ninety minutes.
But what does Kelly show us? Not a period-appropriate musical number, stage-bound with chubby chorus girls and a static camera. Nope, he Berkeley-izes his film, throwing out any semblance of realism and giving his late-20s movie an elaborate extended sequence matched in length and imagination only by Minnelli and Powell & Pressburger.
The sequence ostensibly is the story of a young dancer coming to Broadway and trying to make it big on stage. He falls in love with a girl and is chased off by her gangster boyfriend. The plot of The Dancing Cavalier is apparently that, after landing a role, this dancer gets hit on the head and dreams he's a musketeer or something. The footage left over from The Dueling Cavalier (the pre-musical version of the film) is inserted here as a dream sequence, after which we can speculate that the young dancer wakes from his dream newly emboldened to rescue the girl of his dreams from the gangster (this is my guess at least; Kelly only shows us the opening musical number, not the closing). The fusion of musical and gangster film (another genre that got rolling in the early sound era) presages Fred Astaire and Vincente Minnelli's fusion of musical and film noir in the "Girl Hunt" sequence in The Band Wagon, released a year after Singin' In the Rain and also starring Cyd Charisse.
Because Singin' In The Rain is first and foremost a film about film (and one that has compelling characters as a bonus), the resolution of how Kelly saves his film within the film is a vital part of the story. Because it's also a musical about the making of a musical, it is essential that what we see of that film in its ideal form should be a musical sequence (everything else we've seen of The Dancing Cavalier has been disastrous). And because this is the final sequence of the film, a film made in 1952 after The Red Shoes and An American In Paris, that sequence had better be spectacular. And it is. Once it's over, there's nothing left for the film to do but resolve its plot as quickly as possible. This takes a bit longer than it did in Follow The Fleet, or An American In Paris, but that's one of the things that makes it a great movie: the best part of it ends, but there's still enough there to keep us in our seats for another ten minutes. To reference a musical made 70 years after The Jazz Singer, that sure sounds like Jack Horner's definition of a great film, doesn't it?