What doesn't kill you, makes you stronger. That's probably the prescription pill for the $150 billion IT industry that faced multiple headwinds in the form of increased visa scrutiny and slowdown in client spending this year.
But 2018 promises to be better as clients loosen their purse strings for emerging technologies like automation and artificial intelligence to increase efficiency and productivity and to stay ahead of competition.
"2017 was unlike any other year. There were political and economic factors at play that added to the complexity. There was increased visa scrutiny, customers held back IT spending," said R Chandrashekhar, president of software association Nasscom.
US President Donald Trump delivered on his election promise and took various steps to tighten visa norms. The controversial immigration order against people from seven Muslim-majority countries drew flak from US-based tech giants like Google and Facebook who said such moves create barriers to bringing good talent to the US.
The US also put on hold the premium processing of H-1B visa category.
The US, which accounts for around 60% of India's IT export earnings, also took other steps to promote what it called 'Buy American and Hire American'.
It is now considering revoking an Obama-era rule that extends work authorisation to the spouses of H-1B visa holders, a move that could affect thousands of Indian workers and their families.
"The new regulatory challenges coming from new visa regime with Trump administration and also changes to visa rules in countries like UK, Australia, Singapore will bring down people mobility and as a result flexibility in scaling businesses," Cyient Founder and Executive Chairman B V R Mohan Reddy said.
The Trump administration's plans to overhaul the H-1B program added to the worry lines of the Indian IT firms during the year but many companies increased local hiring in the US to ensure continuity of services for clients.
Infosys, for instance, announced hiring 10,000 Americans and setting up of 4 hubs in the US. Its peers TCS, Wipro and others have also ramped up their local presence in the US to comply with norms.
The uncertainty due to regulatory changes in the US and the macroeconomic outlook also prompted Nasscom to unexpectedly postpone issuing a growth projection for 2017-18, a first in 25 years.
In June, when Nasscom finally issued the forecast, it projected to an export revenue growth of 7-8% in 2017 -18, around the growth levels seen last year.
Nasscom's Chandrashekhar remains confident of achieving the stated growth rate.
Amidst these challenges, new technology areas like automation, artificial intelligence and machine learning emerged as green shoots for the industry.
An increasing number of clients were looking at leveraging these technologies and the share of these in the overall IT budgets has also been expanding.
"The customers are demanding digital, transformative and innovative solutions with application of new technologies like AI, ML, Internet of Things, 3D printing and drones. The adoption of new technologies is growing at a pace faster than what was anticipated by industry," Reddy said.
However, the fast pace of change has also thrown up its own set of challenges.
Thousands of employees were laid off as companies turned to automation to carry out certain workloads. And it was not just those at the bottom of the pyramid but even senior executives were handed out pink slips.
Amid the uproar, the industry defended itself saying it continues to remain a net hirer and that the focus is on re- skilling the manpower in these new areas.
Closer home, the country's second largest software services firm -- and once a poster-boy for the industry -- Infosys was going through its own set of troubles.
The initial cracks between the founders and past leadership emerged when co-founder N R Narayana Murthy raised questions about severance pay promised to former key executives like Rajiv Bansal and flagged irregularities in Infosys' $200 million Panaya acquisition.
Allegations and counter-allegations flew thick and fast in the next few months, and in August the then CEO Vishal Sikka put in his papers citing slander.
The Infosys Board, at that time, rushed to Sikka's defence but it was a matter of one more week that R Seshasayee (then Chairman) and two other board members also relinquished their positions.
This set the stage for the return of co-founder Nandan Nilekani at the helm of affairs at Infosys that has over 2 lakh employees.
In 2018, Infosys will hope for a new beginning as Salil Parekh, a former Capgemini executive, takes charge as the new CEO.
The transition was smoother for India's largest software services firm Tata Consultancy Services. With former CEO N Chandrasekaran being elevated as chairman of Tata Sons, R Gopinathan took over as the new CEO.