I think, jibes on the scale of the order apart, this is a telltale sign of India's losing grasp over a 'traditional ally'.
Sri Lanka cannot afford to buy entire squadrons of fighter aircraft, nor does it need to, but the fact that it has chosen to invest in a plane that is as yet raw and battle-untested instead of say pre owned Mig-21s, that are far more battle-worthy, speaks to the relative dormancy of Sri Lanka-India military relations and the appeal of Chinese 3rd-gen [3.5 Western gen] aircraft to smaller countries. China has been able to successfully position its JF-17 as a cost effective option to several poorer nations- even as it moves away from what it considers a low technological base- to recover the costs of its development at a time when these nations have unfulfilled requirements stemming either from sanctions or non-affordability.
India should take a leaf out of China's book and move quickly to complete projects that are veritable tools of military and strategic diplomacy.
Not that India has been caught sleeping while China has been cruising through S Lanka; it has sought new and imaginative ways of [financially] asymmetric engagement. Here is an example:
China's Foray into Sri Lanka and India's Response | Institute for Defence Studies and Analyses
But these 'new and imaginative' ways have not extended into the realm of military procurement: not with the INSAS, not with domestic ordnance, not with satellite launches [the possible exceptions have been vehicular and radar equipment]. And these are all fields where we have had something to contribute in.
We have taken a 'soft' approach, with focus more on military bureaucratic relations and high-level military exchanges- apart, of course, from the SLINEX-series naval exercises- the one advantage India enjoys in geographical proximity over China. But 'big ticket' items are what catch media attention, facilitate interoperability and propagate the kind of strategic 'dependence' that is necessary of a junior partner.
Domestic political compunctions will remain, and will always be a thorn in the side, especially considering many of our heavy vehicle and aerospace facilities are in the South. But we will have to find a way to work around them.
The security of our Indian Ocean region depends on it.