@@ -41,13 +41,9 @@ import {
4141} from '../../errors'
4242import * as CodeWhispererConstants from '../../../codewhisperer/models/constants'
4343import MessengerUtils , { ButtonActions , GumbyCommands } from './messenger/messengerUtils'
44- import { CancelActionPositions , JDKToTelemetryValue , telemetryUndefined } from '../../telemetry/codeTransformTelemetry'
44+ import { CancelActionPositions } from '../../telemetry/codeTransformTelemetry'
4545import { openUrl } from '../../../shared/utilities/vsCodeUtils'
46- import {
47- telemetry ,
48- CodeTransformJavaTargetVersionsAllowed ,
49- CodeTransformJavaSourceVersionsAllowed ,
50- } from '../../../shared/telemetry/telemetry'
46+ import { telemetry } from '../../../shared/telemetry/telemetry'
5147import { CodeTransformTelemetryState } from '../../telemetry/codeTransformTelemetryState'
5248import DependencyVersions from '../../models/dependencies'
5349import { getStringHash } from '../../../shared/utilities/textUtilities'
@@ -308,7 +304,6 @@ export class GumbyController {
308304 }
309305
310306 private async validateLanguageUpgradeProjects ( message : any ) {
311- let telemetryJavaVersion = JDKToTelemetryValue ( JDKVersion . UNSUPPORTED ) as CodeTransformJavaSourceVersionsAllowed
312307 try {
313308 const validProjects = await telemetry . codeTransform_validateProject . run ( async ( ) => {
314309 telemetry . record ( {
@@ -317,12 +312,6 @@ export class GumbyController {
317312 } )
318313
319314 const validProjects = await getValidLanguageUpgradeCandidateProjects ( )
320- if ( validProjects . length > 0 ) {
321- // validProjects[0].JDKVersion will be undefined if javap errors out or no .class files found, so call it UNSUPPORTED
322- const javaVersion = validProjects [ 0 ] . JDKVersion ?? JDKVersion . UNSUPPORTED
323- telemetryJavaVersion = JDKToTelemetryValue ( javaVersion ) as CodeTransformJavaSourceVersionsAllowed
324- }
325- telemetry . record ( { codeTransformLocalJavaVersion : telemetryJavaVersion } )
326315 return validProjects
327316 } )
328317 return validProjects
@@ -384,7 +373,7 @@ export class GumbyController {
384373 break
385374 case ButtonActions . CONTINUE_TRANSFORMATION_FORM :
386375 this . messenger . sendMessage (
387- CodeWhispererConstants . continueWithoutYamlMessage ,
376+ CodeWhispererConstants . continueWithoutConfigFileMessage ,
388377 message . tabID ,
389378 'ai-prompt'
390379 )
@@ -437,9 +426,7 @@ export class GumbyController {
437426 userChoice : skipTestsSelection ,
438427 } )
439428 this . messenger . sendSkipTestsSelectionMessage ( skipTestsSelection , message . tabID )
440- this . promptJavaHome ( 'source' , message . tabID )
441- // TO-DO: delete line above and uncomment line below when releasing CSB
442- // await this.messenger.sendCustomDependencyVersionMessage(message.tabID)
429+ await this . messenger . sendCustomDependencyVersionMessage ( message . tabID )
443430 } )
444431 }
445432
@@ -465,16 +452,9 @@ export class GumbyController {
465452 const fromJDKVersion : JDKVersion = message . formSelectedValues [ 'GumbyTransformJdkFromForm' ]
466453
467454 telemetry . record ( {
468- // TODO: remove JavaSource/TargetVersionsAllowed when BI is updated to use source/target
469- codeTransformJavaSourceVersionsAllowed : JDKToTelemetryValue (
470- fromJDKVersion
471- ) as CodeTransformJavaSourceVersionsAllowed ,
472- codeTransformJavaTargetVersionsAllowed : JDKToTelemetryValue (
473- toJDKVersion
474- ) as CodeTransformJavaTargetVersionsAllowed ,
475455 source : fromJDKVersion ,
476456 target : toJDKVersion ,
477- codeTransformProjectId : pathToProject === undefined ? telemetryUndefined : getStringHash ( pathToProject ) ,
457+ codeTransformProjectId : pathToProject === undefined ? undefined : getStringHash ( pathToProject ) ,
478458 userChoice : 'Confirm-Java' ,
479459 } )
480460
@@ -503,7 +483,7 @@ export class GumbyController {
503483 const schema : string = message . formSelectedValues [ 'GumbyTransformSQLSchemaForm' ]
504484
505485 telemetry . record ( {
506- codeTransformProjectId : pathToProject === undefined ? telemetryUndefined : getStringHash ( pathToProject ) ,
486+ codeTransformProjectId : pathToProject === undefined ? undefined : getStringHash ( pathToProject ) ,
507487 source : transformByQState . getSourceDB ( ) ,
508488 target : transformByQState . getTargetDB ( ) ,
509489 userChoice : 'Confirm-SQL' ,
@@ -563,7 +543,7 @@ export class GumbyController {
563543 canSelectMany : false ,
564544 openLabel : 'Select' ,
565545 filters : {
566- 'YAML file' : [ 'yaml' ] , // restrict user to only pick a .yaml file
546+ File : [ 'yaml' , 'yml '] , // restrict user to only pick a .yaml file
567547 } ,
568548 } )
569549 if ( ! fileUri || fileUri . length === 0 ) {
@@ -576,7 +556,7 @@ export class GumbyController {
576556 this . messenger . sendUnrecoverableErrorResponse ( 'invalid-custom-versions-file' , message . tabID )
577557 return
578558 }
579- this . messenger . sendMessage ( 'Received custom dependency version YAML file.' , message . tabID , 'ai-prompt' )
559+ this . messenger . sendMessage ( CodeWhispererConstants . receivedValidConfigFileMessage , message . tabID , 'ai-prompt' )
580560 transformByQState . setCustomDependencyVersionFilePath ( fileUri [ 0 ] . fsPath )
581561 this . promptJavaHome ( 'source' , message . tabID )
582562 }
@@ -660,17 +640,13 @@ export class GumbyController {
660640 const pathToJavaHome = extractPath ( data . message )
661641 if ( pathToJavaHome ) {
662642 transformByQState . setSourceJavaHome ( pathToJavaHome )
663- // TO-DO: delete line below and uncomment the block below when releasing CSB
664- await this . prepareLanguageUpgradeProject ( data . tabID )
665643 // if source and target JDK versions are the same, just re-use the source JAVA_HOME and start the build
666- /*
667644 if ( transformByQState . getTargetJDKVersion ( ) === transformByQState . getSourceJDKVersion ( ) ) {
668645 transformByQState . setTargetJavaHome ( pathToJavaHome )
669646 await this . prepareLanguageUpgradeProject ( data . tabID )
670647 } else {
671648 this . promptJavaHome ( 'target' , data . tabID )
672649 }
673- */
674650 } else {
675651 this . messenger . sendUnrecoverableErrorResponse ( 'invalid-java-home' , data . tabID )
676652 }
0 commit comments