Skip to content

Conversation

andreaangiolillo
Copy link
Collaborator

@andreaangiolillo andreaangiolillo commented Jan 7, 2025

Proposed changes

CLOUDP-292660

This PR creates a new command foascli sunset list to list all the endpoints with their sunset date in an open API spec. This command will then be used to send us a notification when a new endpoint is approaching its sunset date

Testing

./bin/foascli sunset ls -s /Users/andrea.angiolillo/workspace/[redacted]/server/openapi/services/openapi-mms.json

I removed the paths and team name from the output

[
  {
    "http_method": "GET",
    "path": "/api/atlas/v2/groups/{groupId}/backup/**/{exportBucketId}",
    "version": "2023-01-01",
    "sunset_date": "2026-05-30",
    "team": "Backup - *****"
  },
  {
    "http_method": "DELETE",
    "path": "/api/atlas/v2/groups/{groupId}/***/{clusterName}",
    "version": "2023-01-01",
    "sunset_date": "2025-06-01",
    "team": "Atlas D****"
  },

Next Steps

I will create a GH action to send us a notification when an endpoint is approaching the sunset date

@andreaangiolillo andreaangiolillo marked this pull request as ready for review January 7, 2025 16:40
@andreaangiolillo andreaangiolillo requested a review from a team as a code owner January 7, 2025 16:40
Copy link
Contributor

@gssbzn gssbzn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

)

const (
sunsetExtensionName = "x-sunset"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't stutter

Suggested change
sunsetExtensionName = "x-sunset"
extensionName = "x-sunset"

Team string `json:"team" yaml:"team"`
}

func NewSunsetListFromSpec(spec *load.SpecInfo) []*Sunset {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func NewSunsetListFromSpec(spec *load.SpecInfo) []*Sunset {
func NewListFromSpec(spec *load.SpecInfo) []*Sunset {

@andreaangiolillo andreaangiolillo merged commit bd33e5e into main Jan 8, 2025
11 checks passed
@andreaangiolillo andreaangiolillo deleted the CLOUDP-292660 branch January 8, 2025 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants