Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

registry: add reworked /extensions/all endpoint (in beta) #461

Merged
merged 17 commits into from
Sep 19, 2023
Merged

Conversation

vrmiguel
Copy link
Member

@ChuckHend figured out a way to speed up /extensions/all with a single query

This PR proposes adding this new code under a new temporary endpoint for testing.
If the testing goes well, removing the older code would be very straightforward

@aws-amplify-us-east-1
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-461.dwcnpr7p8u1tw.amplifyapp.com

@ChuckHend
Copy link
Member

We still have a diff between this new query and what the existing /extensions/all returns. the "owners" key is missing the userId

Current:

  {
    "categories": [
      "Tooling / Admin"
    ],
    "createdAt": "2023-04-21 20:00:22.576493 +00:00:00",
    "description": "adminpack provides a number of support functions which pgAdmin and other administration and management tools can use to provide additional functionality, such as remote management of server log files.",
    "documentation": "https://www.postgresql.org/docs/current/adminpack.html",
    "homepage": "https://www.postgresql.org",
    "latestVersion": "2.1.0",
    "license": "PostgreSQL",
    "name": "adminpack",
    "owners": [
      {
        "userId": "user_2PXTvcubP95TyEvTXZJOpzHjdJn",
        "userName": "coredb-service-user"
      }
    ],
    "repository": "https://github.com/postgres/postgres/tree/master/contrib/adminpack",
    "updatedAt": "2023-08-28 18:48:27.880262 +00:00:00"
  },

In this PR:

{
  "categories": [
    "Tooling / Admin"
  ],
  "created_at": "2023-04-21T20:00:22.576493Z",
  "description": "adminpack provides a number of support functions which pgAdmin and other administration and management tools can use to provide additional functionality, such as remote management of server log files.",
  "documentation": "https://www.postgresql.org/docs/current/adminpack.html",
  "homepage": "https://www.postgresql.org",
  "latest_version": "2.1.0",
  "license": "PostgreSQL",
  "name": "adminpack",
  "owners": [
    "coredb-service-user"
  ],
  "repository": "https://github.com/postgres/postgres/tree/master/contrib/adminpack",
  "updated_at": "2023-08-28T18:48:27.880262Z"
}

@ChuckHend
Copy link
Member

Updated again - new object:

  {
    "categories": [
      "Tooling / Admin"
    ],
    "created_at": "2023-04-21T20:00:22.576493Z",
    "description": "adminpack provides a number of support functions which pgAdmin and other administration and management tools can use to provide additional functionality, such as remote management of server log files.",
    "documentation": "https://www.postgresql.org/docs/current/adminpack.html",
    "homepage": "https://www.postgresql.org",
    "latest_version": "2.1.0",
    "license": "PostgreSQL",
    "name": "adminpack",
    "owners": [
      {
        "userId": "user_2PXTvcubP95TyEvTXZJOpzHjdJn",
        "userName": "coredb-service-user"
      }
    ],
    "repository": "https://github.com/postgres/postgres/tree/master/contrib/adminpack",
    "updated_at": "2023-08-28T18:48:27.880262Z"
  }

@ChuckHend
Copy link
Member

latest format:

{
    "categories": [
      "Tooling / Admin"
    ],
    "createdAt": "2023-04-21T20:00:22.576493+00:00",
    "description": "adminpack provides a number of support functions which pgAdmin and other administration and management tools can use to provide additional functionality, such as remote management of server log files.",
    "documentation": "https://www.postgresql.org/docs/current/adminpack.html",
    "homepage": "https://www.postgresql.org",
    "latestVersion": "2.1.0",
    "license": "PostgreSQL",
    "name": "adminpack",
    "owners": [
      {
        "userId": "user_2PXTvcubP95TyEvTXZJOpzHjdJn",
        "userName": "coredb-service-user"
      }
    ],
    "repository": "https://github.com/postgres/postgres/tree/master/contrib/adminpack",
    "updatedAt": "2023-08-28T18:48:27.880262+00:00"
  }

}
}

#[get("beta/extensions/all")]
Copy link
Member

Choose a reason for hiding this comment

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

Nice idea adding as separate route :)

@ChuckHend ChuckHend merged commit a9b1bc9 into main Sep 19, 2023
5 checks passed
@ChuckHend ChuckHend deleted the test-query branch September 19, 2023 21:16
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