The 'other side' likes to discredit witnesses, or, at least, raise sufficient questions as to their honesty/reliability in the minds of the jurors.
I think the chances of having your 'indiscretion' brought up in open court would depend on several factors;
1. The nature of your crime -v- the nature of the case you are giving witness in;
2. The 'weight' of the evidence you can give; are you the star witness, or just a bystander ?
Talk to the barrister on 'your' side and make them aware of your circumstances; they will be best placed to advise you. If the matter is raised before the court, they, hopefully, would have the eloquence to reduce it to a 'trifling, piddling little matter committed as a folly of youth and not worth the court's time in answering'.........or something.