The book of Jonah is often cited as an example of how prophecy is contingent; in this volume, God relents against the promise of destruction of Nineveh, a Gentile city, after their repentance, notwithstanding no contingencies being provided in his decree against the city (see this page from Russell Ashdown against Eric Johnson's pathetic attempt to downplay the significance of this). On this theme, Jewish OT scholar, Uriel Simon, wrote the following on this issue:
Prophecy: Realization versus Compliance. The third reading, which focuses on Jonah’s stubborn refusal to prophesy against Nineveh and his anger at its deliverance, grounds the story on Jonah’s jealous concern for the veracity of prophecy and his apprehension lest his credibility be undermined. The midrash illuminates Jonah’s expectations by recalling his success in Samaria and his forebodings by a hypothetical reconstruction of his failure in Jerusalem:
Why did he run away? The first time, God sent him to restore the territory of Israel and His word was fulfilled, as it is stated: “He [Jeroboam II] restored the territory of Israel from Lebo-hamath [in accordance with the promise that the Lord … made through His servant, … Jonah son of Amittai]” (2 Kings 14:25). The second time, He sent him to Jerusalem to destroy it. Because [its people] repented, the Holy One Blessed be He acted in accordance with His great mercy and repented of His fatal intention and did not destroy it. Thus Israel called him a “false prophet.” The third time, He sent him to Nineveh. Jonah reasoned with himself, saying, “I know that this nation is quick to repent. Now they will repent, and the Holy One Blessed be He will dispatch his anger against Israel. Is it not enough that Israel calls me a false prophet, but idol-worshippers will do so as well! I shall run away instead.…” (Pirkei de-Rabbi Eliezer 10)
According to this view—which was adopted by Daniel al-Kumissi the Karaite, Saadiah Gaon (Beliefs and Opinions 3, 5), Rashi, Joseph Kara, and David Kimḥi (who combined it with the second theme reviewed above), Abraham bar Ḥiyya, Abravanel, and many modern scholars—the Book of Jonah seeks to teach us about the educational purpose of prophecies of doom (cf. Ezek. 3:16–21 and 33:1–9) through the medium of a story that criticizes a prophet who viewed announcing future events as his role and full realization of the prophecy as his only test. Jonah runs away because he cannot resolve two contradictions: between the categorization of prophecies that do not come to pass as “false prophecies” (Deut. 18:21–22) and the revocation of the verdict against Nineveh, in response to its repentance; and between the concept of God as unchanging and resolute (cf. Num. 23:19) and His attributes of compassion and forgiveness. Nevertheless the Lord compelled him to prophesy against Nineveh to teach him the paradoxical nature of true prophets, who “foretell punishment to make it unnecessary” (St. Jerome in his commentary on Ezek. 33:1, cited by Bickerman, p. 40).
Such a definition of the prophet’s role is undoubtedly an appropriate and weighty theme for a prophetic narrative, but there is no real sign in the Book of Jonah of the prophet’s anguish that his prediction did not come to pass, nor anything like this elsewhere in the Bible. This is why the author of the midrash quoted above had to assume that Jonah had previously been mocked by the people of Jerusalem, while Bickerman (p. 38) is forced to rely on a strained comparison with Jeremiah’s distress (20:7–8) when he is ridiculed by the sinful inhabitants of Jerusalem, who, seeing that the word of the Lord is slow to be realized, persist in their transgressions. Hence it is not surprising that most commentators who consider contingent prophecy to be the theme of the book combine it with some other theme. (Simon, Uriel (1999). Jonah (pp. x-xi). Philadelphia: Jewish Publication Society.)