Conservatives are understandably frustrated by the $1.3 trillion omnibus spending bill that President Donald Trump signed into law, under protest, on Friday.

The massive size of the bill makes a mockery of Republican promises since 2009 to restrain spending and return to balanced budget once they returned to power.

The large number of giveaways to Democratic Party projects and special interests is a sign that the Swamp is still alive and festering in the Trump era.

The fact that the 2,232-page bill was jammed down legislators’ throats with literally no time to read it shows how little has changed in Washington even after the Tea Party.

And the lack of real funding for the border wall — Trump’s core campaign promise in 2016 — suggests that Trump is “getting rolled” by both parties.

But the omnibus is not a disaster. In fact, Republicans scored many important wins.

One is the fact that the bill provides massive new spending for defense — “the largest year-to-year increase in base funding for the Department of Defense in 15 years,” according to the bill’s authors.

That funding was badly needed — and will not easily be reversed.

Military.com summarizes the highlights:

The Navy gets 14 new ships, including a carrier; the Air Force adds 56 F-35s; the Army gets 17 Apache and 11 Lakota helicopters; the Marine Corpsreceives 24 vertical landing F-35Bs; and the Coast Guard gets a long-needed icebreaker. All the troops get funding for a 2.4 percent pay raise that took effect at the beginning of the year, with the possibility for more next year. The Air Force also gets $103 million for the wing replacement program on the A-10 Thunderbolt as a start in what Air Force Secretary Heather Wilson said earlier this week is a plan to keep the “Warthogs” flying at least to 2030.

Most conservatives — from skeptical libertarians to hawkish neoconservatives — agree that national security is the first priority of government. The new defense spending will help the U.S. military catch up to the pace of Chinese expansion, and keep other threats in check.

Yes, there will need to be budget cuts in the future. But the new commitment to defense makes it more likely that cuts will have to come from other discretionary spending, and long-overdue entitlement reforms.

In addition, the omnibus spending bill included many riders that conservatives should applaud. Some had little chance of passing any other way.

Foremost among these is the Taylor Force Act, which will cut off most U.S. foreign aid to the Palestinian Authority unless it stops paying stipends to terrorists and their families — which it will not do.

The importance of that law cannot be overstated. It will radically shift relations between Israelis and Palestinians in Israel’s favor. It will also send a clear signal to the world that the U.S. will hold other governments responsible for supporting terrorism.

Other riders included the Fix NICS Act, a Trump administration- and National Rifle Association-backed bill that will improve the nation’s background check system for gun purchases. The bill ought to take some of the wind out of the sails of the anti-gun movement.

Another addition was a fix to the “grain glitch,” a provision in last year’s tax cut that accidentally discouraged farms from selling their produce to private buyers and favored sales to cooperatives instead.

Conservatives can also take heart from what was not included in the omnibus. The Trump administration held out against Democrat demands for full amnesty for 1.8 million “Dreamers” — i.e. illegal aliens brought into the country as minors.

Republicans also prevented the bill from giving massive subsidies to insurance companies on the Obamacare exchanges after President Trump ended the Obama administration’s payments, which had been ruled unconstitutional by a federal court last year.

So while there are many reasons to complain about the omnibus, there are also things to celebrate. The cause of fiscal reform is not dead: now, with defense adequately funded, is the best opportunity for Trump to make good on his promise to tackle the national debt.

Conservatives should not be distracted by the gloating of Democrats like House Minority Leader Nancy Pelosi (D-CA), or the trolling of Senate Minority Leader Chuck Schumer (D-NY). They know that declaring victory is a good way to separate Trump from his base.

The fact is that Trump crushed them in the last budget negotiation, when they foolishly shut down the government to protect illegal aliens. And this time, Trump achieved long-sought Republican priorities, even if they came at an admittedly heavy price.

Rather than despair — would the cause really be served by handing Congress back to Democrats? — conservatives should prepare for the next fight, which will be backed by a presidential veto.

Joel B. Pollak is Senior Editor-at-Large at Breitbart News. He was named to Forward’s 50 “most influential” Jews in 2017. He is the co-author of How Trump Won: The Inside Story of a Revolution, which is available from Regnery. Follow him on Twitter at @joelpollak.