Skip to content

Commit 9d7d3e1

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

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.

packages/amazonq/.changes/1.79.0.json

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

packages/core/src/shared/utilities/proxyUtil.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ export class ProxyUtil {
7070
* Sets environment variables based on proxy configuration
7171
*/
7272
private static async setProxyEnvironmentVariables(config: ProxyConfig): Promise<void> {
73+
// Always enable experimental proxy support for better handling of both explicit and transparent proxies
74+
process.env.EXPERIMENTAL_HTTP_PROXY_SUPPORT = 'true'
75+
76+
// Load built-in bundle and system OS trust store
77+
process.env.NODE_OPTIONS = '--use-system-ca'
78+
7379
const proxyUrl = config.proxyUrl
7480
// Set proxy environment variables
7581
if (proxyUrl) {

packages/core/src/shared/vscode/env.ts

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,56 @@ export function isRemoteWorkspace(): boolean {
125125
}
126126

127127
/**
128-
* There is Amazon Linux 2.
128+
* Checks if the current environment has SageMaker-specific environment variables
129+
* @returns true if SageMaker environment variables are detected
130+
*/
131+
export function hasSageMakerEnvVars(): boolean {
132+
// Check both old and new environment variable names
133+
// SageMaker is renaming their environment variables in their Docker images
134+
return (
135+
// Original environment variables
136+
process.env.SAGEMAKER_APP_TYPE !== undefined ||
137+
process.env.SAGEMAKER_INTERNAL_IMAGE_URI !== undefined ||
138+
process.env.STUDIO_LOGGING_DIR?.includes('/var/log/studio') === true ||
139+
// New environment variables (update these with the actual new names)
140+
process.env.SM_APP_TYPE !== undefined ||
141+
process.env.SM_INTERNAL_IMAGE_URI !== undefined ||
142+
process.env.SERVICE_NAME === 'SageMakerUnifiedStudio'
143+
)
144+
}
145+
146+
/**
147+
* Checks if the current environment is running on Amazon Linux 2.
129148
*
130-
* Use {@link isCloudDesktop()} to know if we are specifically using internal Amazon Linux 2.
149+
* This function attempts to detect if we're running in a container on an AL2 host
150+
* by checking both the OS release and container-specific indicators.
131151
*
132152
* Example: `5.10.220-188.869.amzn2int.x86_64` or `5.10.236-227.928.amzn2.x86_64` (Cloud Dev Machine)
133153
*/
134154
export function isAmazonLinux2() {
155+
// First check if we're in a SageMaker environment, which should not be treated as AL2
156+
// even if the underlying host is AL2
157+
if (hasSageMakerEnvVars()) {
158+
return false
159+
}
160+
161+
// Check if we're in a container environment that's not AL2
162+
if (process.env.container === 'docker' || process.env.DOCKER_HOST || process.env.DOCKER_BUILDKIT) {
163+
// Additional check for container OS - if we can determine it's not AL2
164+
try {
165+
const fs = require('fs')
166+
if (fs.existsSync('/etc/os-release')) {
167+
const osRelease = fs.readFileSync('/etc/os-release', 'utf8')
168+
if (!osRelease.includes('Amazon Linux 2') && !osRelease.includes('amzn2')) {
169+
return false
170+
}
171+
}
172+
} catch (e) {
173+
// If we can't read the file, fall back to the os.release() check
174+
}
175+
}
176+
177+
// Standard check for AL2 in the OS release string
135178
return (os.release().includes('.amzn2int.') || os.release().includes('.amzn2.')) && process.platform === 'linux'
136179
}
137180

packages/toolkit/.changes/3.67.0.json

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": "3.67.0",
4+
"entries": [
5+
{
6+
"type": "Bug Fix",
7+
"description": "State Machine deployments can now be initiated directly from Workflow Studio without closing the editor"
8+
},
9+
{
10+
"type": "Bug Fix",
11+
"description": "Step Function performance metrics now accurately reflect only Workflow Studio document activity"
12+
},
13+
{
14+
"type": "Feature",
15+
"description": "AccessAnalyzer: CheckNoPublicAccess custom policy check supports additional resource types."
16+
}
17+
]
18+
}

packages/toolkit/.changes/next-release/Bug Fix-8beaac0b-fb5e-42bd-8ecf-a185266a9f04.json

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

packages/toolkit/.changes/next-release/Bug Fix-de3cdda1-252e-4d04-96cb-7fb935649c0e.json

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

packages/toolkit/.changes/next-release/Feature-2fdc05d7-db85-4a4f-8af5-ec729fade8fd.json

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

packages/toolkit/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 3.67.0 2025-06-25
2+
3+
- **Bug Fix** State Machine deployments can now be initiated directly from Workflow Studio without closing the editor
4+
- **Bug Fix** Step Function performance metrics now accurately reflect only Workflow Studio document activity
5+
- **Feature** AccessAnalyzer: CheckNoPublicAccess custom policy check supports additional resource types.
6+
17
## 3.66.0 2025-06-18
28

39
- Miscellaneous non-user-facing changes

packages/toolkit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "aws-toolkit-vscode",
33
"displayName": "AWS Toolkit",
44
"description": "Including CodeCatalyst, Infrastructure Composer, and support for Lambda, S3, CloudWatch Logs, CloudFormation, and many other services.",
5-
"version": "3.67.0-SNAPSHOT",
5+
"version": "3.68.0-SNAPSHOT",
66
"extensionKind": [
77
"workspace"
88
],

0 commit comments

Comments
 (0)