quarkusio / registry.quarkus.io

Quarkus Extension Registry application
https://registry.quarkus.io
Apache License 2.0
10 stars 11 forks source link

API to list and search for all platform releases known to the registry #67

Closed aloubyansky closed 2 years ago

aloubyansky commented 2 years ago

The existing API is promoting the latest supported platform streams and releases, targeting new project creation use-case. It's important to keep this API specifically for this use-case.

However, going forward, the registry should allow "browsing" the history of all the recorded platform releases in the registry and downloading their metadata.

tqvarnst commented 2 years ago

While my need is strictly for the product version I think that this might be useful in the community version too. I need an API endpoint that lists all streams and all the releases within that stream. Basically, it should return something like this:

{
  "platforms": [
    {
      "platform-key": "com.redhat.quarkus.platform",
      "name": "Quarkus Product Platform",
      "current-stream-id": "2.7",
      "streams": [
       {
          "id": "2.7",
          "releases": [
            {
              "version": "2.7.3.Final-redhat-00001",
              "member-boms": [
                "...",
                "..."
              ],
              "quarkus-core-version": "2.7.3.Final-redhat-00013",
              "upstream-quarkus-core-version": "2.7.3Final"
            }
       },
       {
          "id": "2.2",
          "releases": [
            {
              "version": "2.2.3.SP2-redhat-00001",
              "member-boms": [
                "com.redhat.quarkus.platform:quarkus-bom::pom:2.2.3.SP2-redhat-00001",
                "com.redhat.quarkus.platform:quarkus-camel-bom::pom:2.2.3.SP2-redhat-00001"
              ],
              "quarkus-core-version": "2.2.3.Final-redhat-00013",
              "upstream-quarkus-core-version": "2.2.3.Final"
            },
            {
              "version": "2.2.3.Final-redhat-00001",
              "member-boms": [ ],
              "quarkus-core-version": "2.2.3.Final-redhat-00013",
              "upstream-quarkus-core-version": "2.2.3.Final"
            }
          ]
        }
      ]
    }
  ]
}

My suggestion for API URI is /client/history/platforms, but that is not a requirement, feel free to use what ever seems more logical.

Since streams are a new concept since 2.x (possibly 2.2) I'm fine with only including version > 2.x in the results, but if we can get the older versions in there it would be nice.

I hope this helps clarify something.

tqvarnst commented 2 years ago

Note: I added a field/property called current-stream-id, which I think would be good just to identify which is the stream version that the /client/platforms API will return.

maxandersen commented 2 years ago

Since streams are a new concept since 2.x (possibly 2.2) I'm fine with only including version > 2.x in the results, but if we can get the older versions in there it would be nice.

the platform format changed/grew around 2.0; we could probably "fake" some history here but that would require some effort and wouldn't be 100% true as streams was not a "thing" at that stage...what is the usecase you need 1.x version info for ?

tqvarnst commented 2 years ago

So we are generating a list of what extensions are supported in which version over time. I'm totally ok with declaring the 1.x releases as closed and not providing APIs for them.

gastaldi commented 2 years ago

I created https://github.com/quarkusio/registry.quarkus.io/pull/71 introducing a /client/platforms/all endpoint and added a sample output.

@tqvarnst Let me know if that works for you