When did the Nazi Soviet pact stopped being in effect?

It stopped when Germany launched Operation Barbarossa, which was the Nazi invasion of the Soviet Union.