Skip to content

Commit d258359

Browse files
tas50claude
andcommitted
🐛 Fix ID collisions, access-denied handling, and spell check
Fix featureDefinition and clusterNode cache key collisions by including parent resource identifiers in IDs. Add Is400AccessDeniedError handling to ListClusterNodes. Add Slurm to spell-check dictionary and document modelPackages listing limitation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent dcaf848 commit d258359

File tree

4 files changed

+22
-5
lines changed

4 files changed

+22
-5
lines changed

.github/actions/spelling/expect.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ Sflags
272272
signin
273273
singlequeryargument
274274
sizeconstraintstatement
275+
Slurm
275276
smbv
276277
Snat
277278
SNYK

providers/aws/resources/aws.lr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1645,7 +1645,7 @@ aws.sagemaker {
16451645
clusters() []aws.sagemaker.cluster
16461646
// List of SageMaker feature groups
16471647
featureGroups() []aws.sagemaker.featureGroup
1648-
// List of SageMaker model packages
1648+
// List of SageMaker model packages (excludes packages within model package groups)
16491649
modelPackages() []aws.sagemaker.modelPackage
16501650
// List of SageMaker model package groups
16511651
modelPackageGroups() []aws.sagemaker.modelPackageGroup

providers/aws/resources/aws.lr.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

providers/aws/resources/aws_sagemaker.go

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2044,6 +2044,10 @@ func (a *mqlAwsSagemakerCluster) nodes() ([]any, error) {
20442044
for paginator.HasMorePages() {
20452045
page, err := paginator.NextPage(ctx)
20462046
if err != nil {
2047+
if Is400AccessDeniedError(err) {
2048+
log.Warn().Str("cluster", clusterName).Msg("error accessing AWS SageMaker cluster nodes")
2049+
return res, nil
2050+
}
20472051
return nil, err
20482052
}
20492053
for _, node := range page.ClusterNodeSummaries {
@@ -2067,6 +2071,8 @@ func (a *mqlAwsSagemakerCluster) nodes() ([]any, error) {
20672071
if err != nil {
20682072
return nil, err
20692073
}
2074+
nodeRes := mqlNode.(*mqlAwsSagemakerClusterNode)
2075+
nodeRes.cacheClusterName = clusterName
20702076
res = append(res, mqlNode)
20712077
}
20722078
}
@@ -2103,8 +2109,12 @@ func (a *mqlAwsSagemakerClusterInstanceGroup) lifecycleConfig() (map[string]any,
21032109
return convert.JsonToDict(a.cacheLifecycleConfig)
21042110
}
21052111

2112+
type mqlAwsSagemakerClusterNodeInternal struct {
2113+
cacheClusterName string
2114+
}
2115+
21062116
func (a *mqlAwsSagemakerClusterNode) id() (string, error) {
2107-
return a.Region.Data + "/" + a.InstanceGroupName.Data + "/" + a.InstanceId.Data, nil
2117+
return a.Region.Data + "/" + a.cacheClusterName + "/" + a.InstanceGroupName.Data + "/" + a.InstanceId.Data, nil
21082118
}
21092119

21102120
// ---- Feature Groups ----
@@ -2273,13 +2283,19 @@ func (a *mqlAwsSagemakerFeatureGroup) featureDefinitions() ([]any, error) {
22732283
if err != nil {
22742284
return nil, err
22752285
}
2286+
fdRes := mqlFD.(*mqlAwsSagemakerFeatureDefinition)
2287+
fdRes.cacheFeatureGroupArn = a.Arn.Data
22762288
res = append(res, mqlFD)
22772289
}
22782290
return res, nil
22792291
}
22802292

2293+
type mqlAwsSagemakerFeatureDefinitionInternal struct {
2294+
cacheFeatureGroupArn string
2295+
}
2296+
22812297
func (a *mqlAwsSagemakerFeatureDefinition) id() (string, error) {
2282-
return a.FeatureName.Data + "/" + a.FeatureType.Data, nil
2298+
return a.cacheFeatureGroupArn + "/" + a.FeatureName.Data + "/" + a.FeatureType.Data, nil
22832299
}
22842300

22852301
func (a *mqlAwsSagemakerFeatureGroup) eventTimeFeatureName() (string, error) {

0 commit comments

Comments
 (0)