diff --git a/.github/workflows/release-spec.yml b/.github/workflows/release-spec.yml index f5d7fcb98d..b30ec8aae5 100644 --- a/.github/workflows/release-spec.yml +++ b/.github/workflows/release-spec.yml @@ -167,7 +167,6 @@ jobs: release-changelog: name: Release API Changelog needs: release - if: ${{ needs.release.outputs.changes_detected == 'true' }} uses: ./.github/workflows/release-changelog.yml secrets: api_bot_pat: ${{ secrets.api_bot_pat }} diff --git a/changelog/changelog.json b/changelog/changelog.json index fb7eeb7fd2..f12c7e786a 100644 --- a/changelog/changelog.json +++ b/changelog/changelog.json @@ -4662,6 +4662,246 @@ { "date": "2024-11-13", "paths": [ + { + "path": "/api/atlas/v2/groups/{groupId}/flexClusters", + "httpMethod": "GET", + "versions": [ + { + "version": "2024-11-13", + "changes": [ + { + "change": "endpoint added", + "changeCode": "endpoint-added", + "backwardCompatible": true + } + ], + "stabilityLevel": "stable", + "changeType": "release" + } + ], + "operationId": "listFlexClusters", + "tag": "Flex Clusters" + }, + { + "path": "/api/atlas/v2/groups/{groupId}/flexClusters/{name}", + "httpMethod": "DELETE", + "versions": [ + { + "version": "2024-11-13", + "changes": [ + { + "change": "endpoint added", + "changeCode": "endpoint-added", + "backwardCompatible": true + } + ], + "stabilityLevel": "stable", + "changeType": "release" + } + ], + "operationId": "deleteFlexCluster", + "tag": "Flex Clusters" + }, + { + "path": "/api/atlas/v2/groups/{groupId}/flexClusters/{name}", + "httpMethod": "GET", + "versions": [ + { + "version": "2024-11-13", + "changes": [ + { + "change": "endpoint added", + "changeCode": "endpoint-added", + "backwardCompatible": true + } + ], + "stabilityLevel": "stable", + "changeType": "release" + } + ], + "operationId": "getFlexCluster", + "tag": "Flex Clusters" + }, + { + "path": "/api/atlas/v2/groups/{groupId}/flexClusters", + "httpMethod": "POST", + "versions": [ + { + "version": "2024-11-13", + "changes": [ + { + "change": "endpoint added", + "changeCode": "endpoint-added", + "backwardCompatible": true + } + ], + "stabilityLevel": "stable", + "changeType": "release" + } + ], + "operationId": "createFlexCluster", + "tag": "Flex Clusters" + }, + { + "path": "/api/atlas/v2/groups/{groupId}/flexClusters/{name}", + "httpMethod": "PATCH", + "versions": [ + { + "version": "2024-11-13", + "changes": [ + { + "change": "endpoint added", + "changeCode": "endpoint-added", + "backwardCompatible": true + } + ], + "stabilityLevel": "stable", + "changeType": "release" + } + ], + "operationId": "updateFlexCluster", + "tag": "Flex Clusters" + }, + { + "path": "/api/atlas/v2/groups/{groupId}/flexClusters/{name}/backup/download", + "httpMethod": "POST", + "versions": [ + { + "version": "2024-11-13", + "changes": [ + { + "change": "endpoint added", + "changeCode": "endpoint-added", + "backwardCompatible": true + } + ], + "stabilityLevel": "stable", + "changeType": "release" + } + ], + "operationId": "downloadFlexBackup", + "tag": "Flex Snapshots" + }, + { + "path": "/api/atlas/v2/groups/{groupId}/flexClusters/{name}/backup/restoreJobs", + "httpMethod": "GET", + "versions": [ + { + "version": "2024-11-13", + "changes": [ + { + "change": "endpoint added", + "changeCode": "endpoint-added", + "backwardCompatible": true + } + ], + "stabilityLevel": "stable", + "changeType": "release" + } + ], + "operationId": "listFlexBackupRestoreJobs", + "tag": "Flex Restore Jobs" + }, + { + "path": "/api/atlas/v2/groups/{groupId}/flexClusters/{name}/backup/restoreJobs", + "httpMethod": "POST", + "versions": [ + { + "version": "2024-11-13", + "changes": [ + { + "change": "endpoint added", + "changeCode": "endpoint-added", + "backwardCompatible": true + } + ], + "stabilityLevel": "stable", + "changeType": "release" + } + ], + "operationId": "createFlexBackupRestoreJob", + "tag": "Flex Restore Jobs" + }, + { + "path": "/api/atlas/v2/groups/{groupId}/flexClusters/{name}/backup/restoreJobs/{restoreJobId}", + "httpMethod": "GET", + "versions": [ + { + "version": "2024-11-13", + "changes": [ + { + "change": "endpoint added", + "changeCode": "endpoint-added", + "backwardCompatible": true + } + ], + "stabilityLevel": "stable", + "changeType": "release" + } + ], + "operationId": "getFlexBackupRestoreJob", + "tag": "Flex Restore Jobs" + }, + { + "path": "/api/atlas/v2/groups/{groupId}/flexClusters/{name}/backup/snapshots", + "httpMethod": "GET", + "versions": [ + { + "version": "2024-11-13", + "changes": [ + { + "change": "endpoint added", + "changeCode": "endpoint-added", + "backwardCompatible": true + } + ], + "stabilityLevel": "stable", + "changeType": "release" + } + ], + "operationId": "listFlexBackups", + "tag": "Flex Snapshots" + }, + { + "path": "/api/atlas/v2/groups/{groupId}/flexClusters/{name}/backup/snapshots/{snapshotId}", + "httpMethod": "GET", + "versions": [ + { + "version": "2024-11-13", + "changes": [ + { + "change": "endpoint added", + "changeCode": "endpoint-added", + "backwardCompatible": true + } + ], + "stabilityLevel": "stable", + "changeType": "release" + } + ], + "operationId": "getFlexBackup", + "tag": "Flex Snapshots" + }, + { + "path": "/api/atlas/v2/groups/{groupId}/flexClusters:tenantUpgrade", + "httpMethod": "POST", + "versions": [ + { + "version": "2024-11-13", + "changes": [ + { + "change": "endpoint added", + "changeCode": "endpoint-added", + "backwardCompatible": true + } + ], + "stabilityLevel": "stable", + "changeType": "release" + } + ], + "operationId": "upgradeFlexCluster", + "tag": "Flex Clusters" + }, { "path": "/api/atlas/v2/groups", "httpMethod": "GET", diff --git a/changelog/changelog.yaml b/changelog/changelog.yaml index 7134a8963f..40003fc324 100644 --- a/changelog/changelog.yaml +++ b/changelog/changelog.yaml @@ -2792,6 +2792,150 @@ version: "2024-11-13" - date: "2024-11-13" paths: + - httpMethod: GET + operationId: listFlexClusters + path: /api/atlas/v2/groups/{groupId}/flexClusters + tag: Flex Clusters + versions: + - changeType: release + changes: + - backwardCompatible: true + change: endpoint added + changeCode: endpoint-added + stabilityLevel: stable + version: '2024-11-13' + - httpMethod: POST + operationId: createFlexCluster + path: /api/atlas/v2/groups/{groupId}/flexClusters + tag: Flex Clusters + versions: + - changeType: release + changes: + - backwardCompatible: true + change: endpoint added + changeCode: endpoint-added + stabilityLevel: stable + version: '2024-11-13' + - httpMethod: DELETE + operationId: deleteFlexCluster + path: /api/atlas/v2/groups/{groupId}/flexClusters/{name} + tag: Flex Clusters + versions: + - changeType: release + changes: + - backwardCompatible: true + change: endpoint added + changeCode: endpoint-added + stabilityLevel: stable + version: '2024-11-13' + - httpMethod: GET + operationId: getFlexCluster + path: /api/atlas/v2/groups/{groupId}/flexClusters/{name} + tag: Flex Clusters + versions: + - changeType: release + changes: + - backwardCompatible: true + change: endpoint added + changeCode: endpoint-added + stabilityLevel: stable + version: '2024-11-13' + - httpMethod: PATCH + operationId: updateFlexCluster + path: /api/atlas/v2/groups/{groupId}/flexClusters/{name} + tag: Flex Clusters + versions: + - changeType: release + changes: + - backwardCompatible: true + change: endpoint added + changeCode: endpoint-added + stabilityLevel: stable + version: '2024-11-13' + - httpMethod: POST + operationId: downloadFlexBackup + path: /api/atlas/v2/groups/{groupId}/flexClusters/{name}/backup/download + tag: Flex Snapshots + versions: + - changeType: release + changes: + - backwardCompatible: true + change: endpoint added + changeCode: endpoint-added + stabilityLevel: stable + version: '2024-11-13' + - httpMethod: GET + operationId: listFlexBackupRestoreJobs + path: /api/atlas/v2/groups/{groupId}/flexClusters/{name}/backup/restoreJobs + tag: Flex Restore Jobs + versions: + - changeType: release + changes: + - backwardCompatible: true + change: endpoint added + changeCode: endpoint-added + stabilityLevel: stable + version: '2024-11-13' + - httpMethod: POST + operationId: createFlexBackupRestoreJob + path: /api/atlas/v2/groups/{groupId}/flexClusters/{name}/backup/restoreJobs + tag: Flex Restore Jobs + versions: + - changeType: release + changes: + - backwardCompatible: true + change: endpoint added + changeCode: endpoint-added + stabilityLevel: stable + version: '2024-11-13' + - httpMethod: GET + operationId: getFlexBackupRestoreJob + path: /api/atlas/v2/groups/{groupId}/flexClusters/{name}/backup/restoreJobs/{restoreJobId} + tag: Flex Restore Jobs + versions: + - changeType: release + changes: + - backwardCompatible: true + change: endpoint added + changeCode: endpoint-added + stabilityLevel: stable + version: '2024-11-13' + - httpMethod: GET + operationId: listFlexBackups + path: /api/atlas/v2/groups/{groupId}/flexClusters/{name}/backup/snapshots + tag: Flex Snapshots + versions: + - changeType: release + changes: + - backwardCompatible: true + change: endpoint added + changeCode: endpoint-added + stabilityLevel: stable + version: '2024-11-13' + - httpMethod: GET + operationId: getFlexBackup + path: /api/atlas/v2/groups/{groupId}/flexClusters/{name}/backup/snapshots/{snapshotId} + tag: Flex Snapshots + versions: + - changeType: release + changes: + - backwardCompatible: true + change: endpoint added + changeCode: endpoint-added + stabilityLevel: stable + version: '2024-11-13' + - httpMethod: POST + operationId: upgradeFlexCluster + path: /api/atlas/v2/groups/{groupId}/flexClusters:tenantUpgrade + tag: Flex Clusters + versions: + - changeType: release + changes: + - backwardCompatible: true + change: endpoint added + changeCode: endpoint-added + stabilityLevel: stable + version: '2024-11-13' - httpMethod: GET operationId: listProjects path: /api/atlas/v2/groups diff --git a/changelog/internal/changelog-all.json b/changelog/internal/changelog-all.json index fb7eeb7fd2..f12c7e786a 100644 --- a/changelog/internal/changelog-all.json +++ b/changelog/internal/changelog-all.json @@ -4662,6 +4662,246 @@ { "date": "2024-11-13", "paths": [ + { + "path": "/api/atlas/v2/groups/{groupId}/flexClusters", + "httpMethod": "GET", + "versions": [ + { + "version": "2024-11-13", + "changes": [ + { + "change": "endpoint added", + "changeCode": "endpoint-added", + "backwardCompatible": true + } + ], + "stabilityLevel": "stable", + "changeType": "release" + } + ], + "operationId": "listFlexClusters", + "tag": "Flex Clusters" + }, + { + "path": "/api/atlas/v2/groups/{groupId}/flexClusters/{name}", + "httpMethod": "DELETE", + "versions": [ + { + "version": "2024-11-13", + "changes": [ + { + "change": "endpoint added", + "changeCode": "endpoint-added", + "backwardCompatible": true + } + ], + "stabilityLevel": "stable", + "changeType": "release" + } + ], + "operationId": "deleteFlexCluster", + "tag": "Flex Clusters" + }, + { + "path": "/api/atlas/v2/groups/{groupId}/flexClusters/{name}", + "httpMethod": "GET", + "versions": [ + { + "version": "2024-11-13", + "changes": [ + { + "change": "endpoint added", + "changeCode": "endpoint-added", + "backwardCompatible": true + } + ], + "stabilityLevel": "stable", + "changeType": "release" + } + ], + "operationId": "getFlexCluster", + "tag": "Flex Clusters" + }, + { + "path": "/api/atlas/v2/groups/{groupId}/flexClusters", + "httpMethod": "POST", + "versions": [ + { + "version": "2024-11-13", + "changes": [ + { + "change": "endpoint added", + "changeCode": "endpoint-added", + "backwardCompatible": true + } + ], + "stabilityLevel": "stable", + "changeType": "release" + } + ], + "operationId": "createFlexCluster", + "tag": "Flex Clusters" + }, + { + "path": "/api/atlas/v2/groups/{groupId}/flexClusters/{name}", + "httpMethod": "PATCH", + "versions": [ + { + "version": "2024-11-13", + "changes": [ + { + "change": "endpoint added", + "changeCode": "endpoint-added", + "backwardCompatible": true + } + ], + "stabilityLevel": "stable", + "changeType": "release" + } + ], + "operationId": "updateFlexCluster", + "tag": "Flex Clusters" + }, + { + "path": "/api/atlas/v2/groups/{groupId}/flexClusters/{name}/backup/download", + "httpMethod": "POST", + "versions": [ + { + "version": "2024-11-13", + "changes": [ + { + "change": "endpoint added", + "changeCode": "endpoint-added", + "backwardCompatible": true + } + ], + "stabilityLevel": "stable", + "changeType": "release" + } + ], + "operationId": "downloadFlexBackup", + "tag": "Flex Snapshots" + }, + { + "path": "/api/atlas/v2/groups/{groupId}/flexClusters/{name}/backup/restoreJobs", + "httpMethod": "GET", + "versions": [ + { + "version": "2024-11-13", + "changes": [ + { + "change": "endpoint added", + "changeCode": "endpoint-added", + "backwardCompatible": true + } + ], + "stabilityLevel": "stable", + "changeType": "release" + } + ], + "operationId": "listFlexBackupRestoreJobs", + "tag": "Flex Restore Jobs" + }, + { + "path": "/api/atlas/v2/groups/{groupId}/flexClusters/{name}/backup/restoreJobs", + "httpMethod": "POST", + "versions": [ + { + "version": "2024-11-13", + "changes": [ + { + "change": "endpoint added", + "changeCode": "endpoint-added", + "backwardCompatible": true + } + ], + "stabilityLevel": "stable", + "changeType": "release" + } + ], + "operationId": "createFlexBackupRestoreJob", + "tag": "Flex Restore Jobs" + }, + { + "path": "/api/atlas/v2/groups/{groupId}/flexClusters/{name}/backup/restoreJobs/{restoreJobId}", + "httpMethod": "GET", + "versions": [ + { + "version": "2024-11-13", + "changes": [ + { + "change": "endpoint added", + "changeCode": "endpoint-added", + "backwardCompatible": true + } + ], + "stabilityLevel": "stable", + "changeType": "release" + } + ], + "operationId": "getFlexBackupRestoreJob", + "tag": "Flex Restore Jobs" + }, + { + "path": "/api/atlas/v2/groups/{groupId}/flexClusters/{name}/backup/snapshots", + "httpMethod": "GET", + "versions": [ + { + "version": "2024-11-13", + "changes": [ + { + "change": "endpoint added", + "changeCode": "endpoint-added", + "backwardCompatible": true + } + ], + "stabilityLevel": "stable", + "changeType": "release" + } + ], + "operationId": "listFlexBackups", + "tag": "Flex Snapshots" + }, + { + "path": "/api/atlas/v2/groups/{groupId}/flexClusters/{name}/backup/snapshots/{snapshotId}", + "httpMethod": "GET", + "versions": [ + { + "version": "2024-11-13", + "changes": [ + { + "change": "endpoint added", + "changeCode": "endpoint-added", + "backwardCompatible": true + } + ], + "stabilityLevel": "stable", + "changeType": "release" + } + ], + "operationId": "getFlexBackup", + "tag": "Flex Snapshots" + }, + { + "path": "/api/atlas/v2/groups/{groupId}/flexClusters:tenantUpgrade", + "httpMethod": "POST", + "versions": [ + { + "version": "2024-11-13", + "changes": [ + { + "change": "endpoint added", + "changeCode": "endpoint-added", + "backwardCompatible": true + } + ], + "stabilityLevel": "stable", + "changeType": "release" + } + ], + "operationId": "upgradeFlexCluster", + "tag": "Flex Clusters" + }, { "path": "/api/atlas/v2/groups", "httpMethod": "GET", diff --git a/changelog/internal/changelog-all.yaml b/changelog/internal/changelog-all.yaml index 7134a8963f..40003fc324 100644 --- a/changelog/internal/changelog-all.yaml +++ b/changelog/internal/changelog-all.yaml @@ -2792,6 +2792,150 @@ version: "2024-11-13" - date: "2024-11-13" paths: + - httpMethod: GET + operationId: listFlexClusters + path: /api/atlas/v2/groups/{groupId}/flexClusters + tag: Flex Clusters + versions: + - changeType: release + changes: + - backwardCompatible: true + change: endpoint added + changeCode: endpoint-added + stabilityLevel: stable + version: '2024-11-13' + - httpMethod: POST + operationId: createFlexCluster + path: /api/atlas/v2/groups/{groupId}/flexClusters + tag: Flex Clusters + versions: + - changeType: release + changes: + - backwardCompatible: true + change: endpoint added + changeCode: endpoint-added + stabilityLevel: stable + version: '2024-11-13' + - httpMethod: DELETE + operationId: deleteFlexCluster + path: /api/atlas/v2/groups/{groupId}/flexClusters/{name} + tag: Flex Clusters + versions: + - changeType: release + changes: + - backwardCompatible: true + change: endpoint added + changeCode: endpoint-added + stabilityLevel: stable + version: '2024-11-13' + - httpMethod: GET + operationId: getFlexCluster + path: /api/atlas/v2/groups/{groupId}/flexClusters/{name} + tag: Flex Clusters + versions: + - changeType: release + changes: + - backwardCompatible: true + change: endpoint added + changeCode: endpoint-added + stabilityLevel: stable + version: '2024-11-13' + - httpMethod: PATCH + operationId: updateFlexCluster + path: /api/atlas/v2/groups/{groupId}/flexClusters/{name} + tag: Flex Clusters + versions: + - changeType: release + changes: + - backwardCompatible: true + change: endpoint added + changeCode: endpoint-added + stabilityLevel: stable + version: '2024-11-13' + - httpMethod: POST + operationId: downloadFlexBackup + path: /api/atlas/v2/groups/{groupId}/flexClusters/{name}/backup/download + tag: Flex Snapshots + versions: + - changeType: release + changes: + - backwardCompatible: true + change: endpoint added + changeCode: endpoint-added + stabilityLevel: stable + version: '2024-11-13' + - httpMethod: GET + operationId: listFlexBackupRestoreJobs + path: /api/atlas/v2/groups/{groupId}/flexClusters/{name}/backup/restoreJobs + tag: Flex Restore Jobs + versions: + - changeType: release + changes: + - backwardCompatible: true + change: endpoint added + changeCode: endpoint-added + stabilityLevel: stable + version: '2024-11-13' + - httpMethod: POST + operationId: createFlexBackupRestoreJob + path: /api/atlas/v2/groups/{groupId}/flexClusters/{name}/backup/restoreJobs + tag: Flex Restore Jobs + versions: + - changeType: release + changes: + - backwardCompatible: true + change: endpoint added + changeCode: endpoint-added + stabilityLevel: stable + version: '2024-11-13' + - httpMethod: GET + operationId: getFlexBackupRestoreJob + path: /api/atlas/v2/groups/{groupId}/flexClusters/{name}/backup/restoreJobs/{restoreJobId} + tag: Flex Restore Jobs + versions: + - changeType: release + changes: + - backwardCompatible: true + change: endpoint added + changeCode: endpoint-added + stabilityLevel: stable + version: '2024-11-13' + - httpMethod: GET + operationId: listFlexBackups + path: /api/atlas/v2/groups/{groupId}/flexClusters/{name}/backup/snapshots + tag: Flex Snapshots + versions: + - changeType: release + changes: + - backwardCompatible: true + change: endpoint added + changeCode: endpoint-added + stabilityLevel: stable + version: '2024-11-13' + - httpMethod: GET + operationId: getFlexBackup + path: /api/atlas/v2/groups/{groupId}/flexClusters/{name}/backup/snapshots/{snapshotId} + tag: Flex Snapshots + versions: + - changeType: release + changes: + - backwardCompatible: true + change: endpoint added + changeCode: endpoint-added + stabilityLevel: stable + version: '2024-11-13' + - httpMethod: POST + operationId: upgradeFlexCluster + path: /api/atlas/v2/groups/{groupId}/flexClusters:tenantUpgrade + tag: Flex Clusters + versions: + - changeType: release + changes: + - backwardCompatible: true + change: endpoint added + changeCode: endpoint-added + stabilityLevel: stable + version: '2024-11-13' - httpMethod: GET operationId: listProjects path: /api/atlas/v2/groups diff --git a/tools/cli/internal/changelog/changelog_test.go b/tools/cli/internal/changelog/changelog_test.go index 8357e16fa4..7a9d39fd14 100644 --- a/tools/cli/internal/changelog/changelog_test.go +++ b/tools/cli/internal/changelog/changelog_test.go @@ -861,3 +861,64 @@ func TestFindChangelogEntry(t *testing.T) { }) } } + +func TestLatestVersionActiveOnDate(t *testing.T) { + tests := []struct { + name string + date string + versions []string + expectedOutput string + expectedError assert.ErrorAssertionFunc + }{ + { + name: "Valid case with multiple versions", + date: "2024-11-13", + versions: []string{"2023-01-01", + "2023-02-01", + "2023-10-01", + "2023-11-15", + "2024-05-30", + "2024-08-05", + "2024-10-23", + "2024-11-13"}, + expectedOutput: "2024-11-13", + expectedError: assert.NoError, + }, + { + name: "Date before all versions", + date: "2022-12-11", + versions: []string{"2023-01-01", "2023-06-01", "2023-11-01"}, + expectedOutput: "", + expectedError: assert.NoError, + }, + { + name: "Empty versions list", + date: "2023-12-11", + versions: []string{}, + expectedOutput: "", + expectedError: assert.NoError, + }, + { + name: "Invalid date format", + date: "invalid-date", + versions: []string{"2023-01-01"}, + expectedOutput: "", + expectedError: assert.Error, + }, + { + name: "Invalid version format in list", + date: "2023-12-11", + versions: []string{"invalid-version", "2023-06-01"}, + expectedOutput: "", + expectedError: assert.Error, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + output, err := latestVersionActiveOnDate(tt.date, tt.versions) + tt.expectedError(t, err) + assert.Equal(t, tt.expectedOutput, output) + }) + } +}