Skip to content

Commit 9d7d3e1

Browse files
committed
Merge remote-tracking branch 'origin/master' into floralph/nep-master
2 parents 7db2529 + 0b76f7f commit 9d7d3e1

File tree

18 files changed

+156
-37
lines changed

18 files changed

+156
-37
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"date": "2025-06-25",
3+
"version": "1.79.0",
4+
"entries": [
5+
{
6+
"type": "Bug Fix",
7+
"description": "Added automatic system certificate detection and VSCode proxy settings support"
8+
},
9+
{
10+
"type": "Bug Fix",
11+
"description": "Improved Amazon Linux 2 support with better SageMaker environment detection"
12+
},
13+
{
14+
"type": "Feature",
15+
"description": "/transform: run all builds client-side"
16+
}
17+
]
18+
}

packages/amazonq/.changes/next-release/Bug Fix-a06c2136-a87a-41af-9304-454bc77aaecc.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/amazonq/.changes/next-release/Feature-d46a67ff-b237-46cc-b6e7-8de8f2e87f45.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/amazonq/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 1.79.0 2025-06-25
2+
3+
- **Bug Fix** Added automatic system certificate detection and VSCode proxy settings support
4+
- **Bug Fix** Improved Amazon Linux 2 support with better SageMaker environment detection
5+
- **Feature** /transform: run all builds client-side
6+
17
## 1.78.0 2025-06-20
28

39
- **Bug Fix** Resolve missing chat options in Amazon Q chat interface.

packages/amazonq/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "amazon-q-vscode",
33
"displayName": "Amazon Q",
44
"description": "The most capable generative AI-powered assistant for building, operating, and transforming software, with advanced capabilities for managing data and AI",
5-
"version": "1.79.0-SNAPSHOT",
5+
"version": "1.80.0-SNAPSHOT",
66
"extensionKind": [
77
"workspace"
88
],

packages/amazonq/src/lsp/client.ts

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import {
3838
isAmazonLinux2,
3939
getClientId,
4040
extensionVersion,
41+
isSageMaker,
4142
} from 'aws-core-vscode/shared'
4243
import { processUtils } from 'aws-core-vscode/shared'
4344
import { activate } from './chat/activation'
@@ -54,11 +55,24 @@ import { CursorUpdateManager } from '../app/inline/cursorUpdateManager'
5455
const localize = nls.loadMessageBundle()
5556
const logger = getLogger('amazonqLsp.lspClient')
5657

57-
export const glibcLinker: string = process.env.VSCODE_SERVER_CUSTOM_GLIBC_LINKER || ''
58-
export const glibcPath: string = process.env.VSCODE_SERVER_CUSTOM_GLIBC_PATH || ''
59-
6058
export function hasGlibcPatch(): boolean {
61-
return glibcLinker.length > 0 && glibcPath.length > 0
59+
// Skip GLIBC patching for SageMaker environments
60+
if (isSageMaker()) {
61+
getLogger('amazonqLsp').info('SageMaker environment detected in hasGlibcPatch, skipping GLIBC patching')
62+
return false // Return false to ensure SageMaker doesn't try to use GLIBC patching
63+
}
64+
65+
// Check for environment variables (for CDM)
66+
const glibcLinker = process.env.VSCODE_SERVER_CUSTOM_GLIBC_LINKER || ''
67+
const glibcPath = process.env.VSCODE_SERVER_CUSTOM_GLIBC_PATH || ''
68+
69+
if (glibcLinker.length > 0 && glibcPath.length > 0) {
70+
getLogger('amazonqLsp').info('GLIBC patching environment variables detected')
71+
return true
72+
}
73+
74+
// No environment variables, no patching needed
75+
return false
6276
}
6377

6478
export async function startLanguageServer(
@@ -83,9 +97,24 @@ export async function startLanguageServer(
8397
const traceServerEnabled = Settings.instance.isSet(`${clientId}.trace.server`)
8498
let executable: string[] = []
8599
// apply the GLIBC 2.28 path to node js runtime binary
86-
if (isAmazonLinux2() && hasGlibcPatch()) {
87-
executable = [glibcLinker, '--library-path', glibcPath, resourcePaths.node]
88-
getLogger('amazonqLsp').info(`Patched node runtime with GLIBC to ${executable}`)
100+
if (isSageMaker()) {
101+
// SageMaker doesn't need GLIBC patching
102+
getLogger('amazonqLsp').info('SageMaker environment detected, skipping GLIBC patching')
103+
executable = [resourcePaths.node]
104+
} else if (isAmazonLinux2() && hasGlibcPatch()) {
105+
// Use environment variables if available (for CDM)
106+
if (process.env.VSCODE_SERVER_CUSTOM_GLIBC_LINKER && process.env.VSCODE_SERVER_CUSTOM_GLIBC_PATH) {
107+
executable = [
108+
process.env.VSCODE_SERVER_CUSTOM_GLIBC_LINKER,
109+
'--library-path',
110+
process.env.VSCODE_SERVER_CUSTOM_GLIBC_PATH,
111+
resourcePaths.node,
112+
]
113+
getLogger('amazonqLsp').info(`Patched node runtime with GLIBC using env vars to ${executable}`)
114+
} else {
115+
// No environment variables, use the node executable directly
116+
executable = [resourcePaths.node]
117+
}
89118
} else {
90119
executable = [resourcePaths.node]
91120
}

packages/core/src/amazonqGumby/chat/controller/messenger/messenger.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,10 @@ ${codeSnippet}
704704
}
705705

706706
public async sendCustomDependencyVersionMessage(tabID: string) {
707-
const message = CodeWhispererConstants.chooseConfigFileMessage
707+
let message = CodeWhispererConstants.chooseConfigFileMessageLibraryUpgrade
708+
if (transformByQState.getSourceJDKVersion() !== transformByQState.getTargetJDKVersion()) {
709+
message = CodeWhispererConstants.chooseConfigFileMessageJdkUpgrade
710+
}
708711
const buttons: ChatItemButton[] = []
709712

710713
buttons.push({

packages/core/src/codewhisperer/models/constants.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -646,8 +646,11 @@ export const continueWithoutConfigFileMessage =
646646
export const receivedValidConfigFileMessage =
647647
'The dependency upgrade file looks good. I will use this information to upgrade the dependencies you specified.'
648648

649-
export const chooseConfigFileMessage =
650-
'Would you like to provide a custom dependency upgrade file? You can specify first-party dependencies to upgrade in a YAML file, and I will upgrade them during the JDK upgrade (for example, Java 8 to 17). You can initiate a separate transformation (17 to 17 or 21 to 21) after the initial JDK upgrade to transform third-party dependencies.\n\nWithout a YAML file, I can perform a minimum JDK upgrade, and then you can initiate a separate transformation to upgrade all third-party dependencies as part of a maximum transformation. For an example dependency upgrade file, see the [documentation](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/code-transformation.html#dependency-upgrade-file).'
649+
export const chooseConfigFileMessageJdkUpgrade =
650+
'Would you like to provide a dependency upgrade file? You can specify first party dependencies and their versions in a YAML file, and I will upgrade them during the JDK upgrade transformation. For an example dependency upgrade file, see the [documentation](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/code-transformation.html#dependency-upgrade-file).'
651+
652+
export const chooseConfigFileMessageLibraryUpgrade =
653+
'Would you like to provide a dependency upgrade file? You can specify third party dependencies and their versions in a YAML file, and I will only upgrade these dependencies during the library upgrade transformation. For an example dependency upgrade file, see the [documentation](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/code-transformation.html#dependency-upgrade-file).'
651654

652655
export const enterJavaHomePlaceholder = 'Enter the path to your Java installation'
653656

packages/core/src/shared/extensionUtilities.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { getLogger } from './logger/logger'
1111
import { VSCODE_EXTENSION_ID, extensionAlphaVersion } from './extensions'
1212
import { Ec2MetadataClient } from './clients/ec2MetadataClient'
1313
import { DefaultEc2MetadataClient } from './clients/ec2MetadataClient'
14-
import { extensionVersion, getCodeCatalystDevEnvId } from './vscode/env'
14+
import { extensionVersion, getCodeCatalystDevEnvId, hasSageMakerEnvVars } from './vscode/env'
1515
import globals from './extensionGlobals'
1616
import { once } from './utilities/functionUtils'
1717
import {
@@ -176,6 +176,13 @@ export function isCloud9(flavor: 'classic' | 'codecatalyst' | 'any' = 'any'): bo
176176
* @returns true if the current system is SageMaker(SMAI or SMUS)
177177
*/
178178
export function isSageMaker(appName: 'SMAI' | 'SMUS' = 'SMAI'): boolean {
179+
// Check for SageMaker-specific environment variables first
180+
if (hasSageMakerEnvVars()) {
181+
getLogger().debug('SageMaker environment detected via environment variables')
182+
return true
183+
}
184+
185+
// Fall back to app name checks
179186
switch (appName) {
180187
case 'SMAI':
181188
return vscode.env.appName === sageMakerAppname

0 commit comments

Comments
 (0)