Congress passed a $1.3 trillion spending bill — the omnibus — that will keep the government open through the end of September at 1 am Friday.

This bill, a massive 2,323-page funding package — a huge increase in military and domestic spending — is a clear bipartisan compromise, reflecting both Democratic and Republican priorities.

As with all spending bills, Democratic and Republican leaders have spent the past day touting their party’s individual victories. Democrats are promoting increases in education spending and medical research funding, and how they fended off major conservative poison pills, like efforts to defund Planned Parenthood or expand immigrant detention centers. Republicans are celebrating the huge increases in military spending and a small bundle of border wall funding.

But this time, leaders have also couched their celebratory speeches with a dose of reality: No one is the absolute winner.

“The result is legislation that neither side sees as perfect but which contains a host of significant victories and important achievements on behalf of the American people,” Senate Majority Leader Mitch McConnell said on the Senate floor Thursday.

Even so, here are some of the clear winners and losers.

Loser: Trump’s immigration agenda

Put simply, this spending bill does not reflect the hardline immigration agenda President Trump and his White House have long espoused.

On enforcement, Republicans went into this week wanting more funding for the Department of Homeland Security to increase the number of beds for immigrant detainees and to expand the enforcement force, with a call to fund 1,000 more Immigration and Customs Enforcement (ICE) agents and 500 more Customs and Border Protection officers.

The final compromise included funding for only an additional 328 Customs and Border Protection officers, and ICE will actually have to reduce the number of detention beds. Needless to say, this isn’t the kind of deportation force Trump’s administration was envisioning. The bill also does not defund so-called “sanctuary cities,” something the White House specifically called on Congress to do.

It does include some border wall funding — $1.6 billion worth — which is much less than the $25 billion the White House asked for. And it comes with a lot of strings attached; most of the funding will have to go toward repairing existing fencing or toward double fencing where barriers already exist. In other words, this isn’t money for Trump’s big, beautiful wall.

As I reported last week, Trump’s White House has been frustrated with the spending bill — especially on immigration. Trump officials even tried to back-channel conservative ideas with allies in Congress to defund “sanctuary cities” or push for more border wall spending, but to no avail. Trump reportedly threatened to veto the bill yesterday but was walked off the ledge.

As Vox’s Dara Lind writes, not only did Trump get very little of what he asked for, but “Congress is actually making an effort to rein in the Trump administration’s overspending on immigration detention instead of expanding it.”

Winner: the Republican tax bill

When Republicans rushed their tax bill through Congress at the end of last year, they made mistakes.

The biggest: They accidentally created a massive disparity in the agricultural industry.

The technical error, dubbed the “grain glitch,” essentially gave more lucrative tax deductions to farmers who sold agricultural products, like grains, to farm cooperatives instead of privately owned farms. The benefits of selling to cooperatives under the GOP tax law are so large that the Wall Street Journal reported it could let some farmers reduce their taxable income to zero.

The error gave cooperatives — including farming giants like Ocean Spray Cranberries Inc. — the major advantage and put smaller, privately owned agricultural businesses at risk of closing shop. Needless, to say the “grain glitch” was a major priority for lawmakers representing America’s agricultural regions.

In some last-minute negotiations, Democrats, who have been reluctant to help Republicans fix their tax bill, struck a deal to amend the tax law’s language to fix the “grain glitch” in exchange for expanding the low-income housing tax credit that goes toward building more affordable housing. The IRS also got a $196 million budget boost to help implement the new tax law.

Loser: Betsy DeVos

Education Secretary Betsy DeVos had some grand plans for the Department of Education, including budget cuts for public schools and after-school programs in exchange for $1 billion in spending to promote school choice programs, vouchers, and magnets. She wanted to eliminate a grant program for low-income students to go to college and slash $1.7 million from the Office of Civil Rights, a bureau within the Education Department that ensures equal access to education and enforces civil rights in school, which she said had grown inefficient.

She got none of those things.

Instead, Congress’s spending bill was a clear rejection of DeVos’s education agenda. The spending bill included a $3.9 billion increase in the department’s funding.

Going down the list, DeVos’s requests were ignored on almost every front.

There was no funding for private school vouchers or her “public school choice” initiative, and the bill increased funding for the Office of Civil Rights by $8.5 million.

DeVos called to freeze Pell Grant awards for low-income students at $5,920. Lawmakers increased the ceiling to $6,095. The federal work-study program, which Trump’s administration proposed to cut in half, also got a funding boost.

The omnibus also included more funding for school-based mental health programs, which DeVos’s budget cut, and increased funding for the Federal Supplemental Education Opportunity Grant, which goes toward financing low-income students’ college expenses, by $107 million. The DC Tuition Assistance Grant, which aids Washington, DC, students who don’t have access to an affordable in-state university system, got a $40 million boost. DeVos had proposed cutting the program this year and eliminating it altogether by 2019.

Winner: government data

With a 2020 Census on the horizon, the Census Bureau will get another $1.34 billion in funding, double what the Trump administration’s budget called for — and a Democratic priority.

The Census Bureau has been at the center of a funding battle with Congress for some time, and, as Vox’s Dylan Matthews explained, the agency has had to find some creative ways to cut costs ahead of its 2020 nationwide survey. The information gathered by the census questionnaire and interviews — which by law is mandated every 10 years — is used for everything from drawing congressional districts to distributing hundreds of millions of federal dollars for infrastructure, schools, and public services. This will be a welcomed boost.

For the first time ever, the spending bill also requires the Congressional Research Service, a nonpartisan agency that produces reports on a wide variety of procedural and policy topics, to post all of its reports online. Currently, only some are available to the public, and mostly through third parties.

Finally, the bill also included the Fix NICS Act, a proposal that will reinforce the National Instant Criminal Background Check System (NICS), the system gun sellers use to verify if someone is eligible to buy a gun. This bill increases enforcement, steps up requirements for federal and state agencies to update records, gives states financial incentives to report to NICS, and penalizes agencies that don’t upload their records.

All around, a win for government databases.

Loser: Susan Collins

Back in the day ... in December, Sen. Susan Collins (R-ME) was promised a vote on two Obamacare stabilization bills in exchange for her vote on the GOP tax bill. She voted for the tax cuts, which also repealed the Affordable Care Act’s individual mandate, the tax on individuals for not having health insurance, whose repeal is projected expected to increase premiums by 10 percent.

But she didn’t see a vote on the health care bills in return.

The latest iteration of the Obamacare stabilization package, which Collins co-sponsored with Sen. Lamar Alexander (R-TN), would have funded the cost-sharing reduction subsidies, which help insurance companies keep down premium costs, for three years and pumped billions of dollars into reinsurance funding, which essentially backstops insurance companies expenses with high-cost patients. The idea was to put the stabilization package in the spending bill.

But the White House and Republican leadership also included language that would prevent the Obamacare payments from going toward any insurance plan that covers abortions — which Democrats said would adversely impact low-income women. Neither party was willing to concede, and the Obamacare stabilization funding was dropped altogether.

Collins will have to wait another day to see her long-promised Obamacare stabilization package get a vote.

Winner: federally funded research

Despite the efforts of Trump’s budget proposal to cut research funding, Congress invested in more federally funded research over past year and loosened restrictions on what federal agencies can research.

The National Institutes of Health got a $3 billion funding increase for medical research, which both parties have touted as a win. It brings total funding for the agency to $37 billion and includes an additional $414 million for Alzheimer’s research, $140 million more for brain research, and $40 million more for universal flu vaccine research.

This spending bill was also a small victory for gun violence research. For years, Congress has more or less banned the Centers for Disease Control and Prevention, or any federal agency, from using taxpayer money on public health research about firearms. Technically, the Dickey Amendment barred the CDC from spending any money “to advocate or promote gun control” — a provision the federal agency largely interpreted as an outright ban.

But the spending bill clarifies that the law doesn’t actually prevent them from doing the research — the result of a larger debate Congress has been having about gun control after the tragic school shooting in Parkland, Florida.

Loser: conservatives

When it comes to bipartisan pieces of legislation, conservative lawmakers usually get rolled. In the days leading up to the spending bill’s release, they knew this time would be no different.

It didn’t take long for the Freedom Caucus, a group of the House’s most conservative lawmakers, to come out against the bill. In a statement less than an hour after the bill was released, they called it an “insult to America’s taxpayers, as well as their many rank-and-file representatives who had no say in the omnibus negotiations.”

The Heritage Foundation, one of Washington’s leading conservative think tanks, had a similar sentiment, tweeting that the omnibus was an “embarrassing rundown of broken promises.”

Sen. Bob Corker (R-TN) a deficit hawk, called it “grotesque,” and Sen. John Kennedy (R-LA) took it one step further, saying the bill was a “great-dane-sized whiz down the leg of every taxpayer in this country.”

Their reactions are no surprise. The $1.3 trillion spending package is a far cry from conservatives’ calls for small government, and almost every contentious conservative policy provision got tossed out — including defunding Planned Parenthood and sanctuary cities.

Instead, the final bill barely included conservative immigration policies (the $1.6 billion in border wall funding came with a lot of restrictions). And it didn’t pair any expansion of concealed carry gun laws with the Fix NICS proposal, a light gun control bill that reinforces existing laws around background checks.

Not to mention that conservatives in the Freedom Caucus claim to be process hawks, who like to see bills go through regular order. (Of course, they were less interested in this when it came to tax cuts and repealing Obamacare.) And this massive spending bill was dropped less than 18 hours before the final House vote.

Winner: tipped workers

In December, Trump’s Labor Department Secretary Alex Acosta proposed a plan that would essentially allow employers to confiscate their workers’ tips if they pay workers minimum wage or above.

The proposal would have repealed an Obama-era regulation that gave workers sole propriety over the tips they earned. As Vox’s Alexia Fernández Campbell explained, the Trump administration’s proposed move could have cost service workers $5.8 billion a year in lost tips.

To preemptively protect workers, an amendment in the spending bill from Sen. Patty Murray (D-WA) will bar employers from taking their workers’ tips. The provision was a major win for service workers, who came out in droves against the Labor Department’s proposed rule change — but it doesn’t completely void Azar’s proposal. Employers will still be allowed to share a worker’s tips with a larger pool of workers if they are paid the full minimum wage.

Honorable mention loser: James Risch’s ego

Update: We have changed Jim Risch’s ego from a “winner” to “loser” because in the end the Idaho senator received no assurances the House would take up a correction to the bill removing White Clouds Wilderness recreation area name change. It is now named for Cecil Andrus.

As lawmakers scrambled to get the spending bill passed, the final obstacle wasn’t over funding or policy: Sen. James Risch (R-ID) had a personal gripe with a provision that renamed the White Clouds Wilderness recreation area in his home state after four-term Gov. Cecil D. Andrus, who died last year — Risch’s rival.

While it’s still unclear how toxic Andrus and Risch’s relationship was, several reports indicate the two clashed over education policy in the 1980s. Apparently, Risch had held enough of a grudge that he didn’t want the recreation area named after the man.

Risch did not know about the provision — which had been sponsored by Republican Idaho Rep. Mike Simpson in the House — until late Thursday. He called on Republican leadership to remove the language and refused to consent to a vote on the final bill. But it was too late to change the bill; removing the language would require the House to vote on the bill again and drag out the process.

After much “begging, pleading, and cajoling” on McConnell’s part — a private meeting with staff and the senator, with Senate Minority Leader Chuck Schumer, with Republican leadership, plus a floor fight and even a phone call to House Speaker Paul Ryan — the Senate finally voted without removing the provision. The compromise, approved quietly and quickly by unanimous consent: an enrollment correction to the omnibus, which the House would consider later. But in the end, Risch was given no assurances that the House would ever take up the amendment.

Risch’s tantrum extended Senate proceedings past midnight, angering lawmakers who were dragged out of bed at 1 am to vote. Sen. Claire McCaskill (D-MO) called it “the most like a Saturday Night Live skit” she’s ever witnessed in her 12 years in the Senate.

Risch is expected to take over as chair of the Foreign Relations Committee, one of the Senate’s top committees, next year.