Skip to content

Provide information how the devfile registry instance was built #774

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

Closed
kadel opened this issue Feb 15, 2022 · 6 comments
Closed

Provide information how the devfile registry instance was built #774

kadel opened this issue Feb 15, 2022 · 6 comments
Labels
area/registry Devfile registry for stacks and infrastructure lifecycle/rotten Rotten items. These items have been stale for 60 days and are now closed. lifecycle/stale Stale items. These items have not been updated for 90 days.

Comments

@kadel
Copy link
Member

kadel commented Feb 15, 2022

Which area this feature is related to?

/area registry

Which functionality do you think we should add?

It would be nice to be able to get information about the source that was used to build the running registry instance.

Why is this needed? Is your feature request related to a problem?

verify the source for devfile registry content

Detailed description:

Describe the solution you'd like

One example of how this could be to add a new field into the index.

"buildFrom": {
   "registry: {
       "repository": "https://github.com/devfile/registry"
       "commit": "2cb3c679acc351d9da81593f80f80cf0688cb799"
    }
   "registry-support: {
       "repository": "https://github.com/devfile/registry-support"
       "commit": "e90825181600a98421a7f6ee63881fa45704dc8d"
    }
}

The root element in the index is currently an array.
To start adding metadata like this we would need to change a structure a bit.

Instead of defining index as

[]Schema

it could be something like this.

type Index struct {
   Metadata Metadata
   Items: []Schema 
}

type Metadata struct {
   BuildFrom BuildFrom
}

type BuildFrom struct {
  Registry        GitReference
  RegistrySupport GitReference
}

type GitReference struct {
   Repository string
   Commit     string
}

We have a good opportunity to add this as there will be breaking changes introduced with #735 anyway.

@openshift-ci openshift-ci bot added the area/registry Devfile registry for stacks and infrastructure label Feb 15, 2022
@kadel
Copy link
Member Author

kadel commented Feb 15, 2022

@yangcao77 What do you think about this? Do you think it would make sense?

@yangcao77
Copy link
Contributor

We have a good opportunity to add this as there will be breaking changes introduced with #735 anyway.

First of all, I want to clarify that #735 won't introduce breaking change, all changes will be backward compatible. New endpoint and new query property(for registry library APIs) will be introduced to get the new index struct proposed in #735. We will switch the default to return new index struct when all consumers are ready for the move.

For this issue, may I know why Odo needs the commit information?

@kadel
Copy link
Member Author

kadel commented Feb 15, 2022

First of all, I want to clarify that #735 won't introduce breaking change, all changes will be backward compatible. New endpoint and new query property(for registry library APIs) will be introduced to get the new index struct proposed in #735. We will switch the default to return new index struct when all consumers are ready for the move.

Yeh, sorry that was wrong. I meant that we are introducing new API, so this is a good chance to do this.

For this issue, may I know why Odo needs the commit information?

This is not for odo.

In general, it is good to know what "version" of the registry is running.
It will help with debugging issues, with reporting issues with devfile stacks etc...
It can also help detect if the registry is up to date with its source registry (mentioned here #681 (comment))

@yangcao77
Copy link
Contributor

@kadel
we publish to staging for every new commit, and move to staging to production registry every Wednesday.
The devfile out of sync is due to staging period.

I think it's good to have this information stored in registry server, but should not in the index content. I do not want to break our current index struct.
The information can be stored in registry image ENV. And a new endpoint GET /version can be introduce to get the registry version information, the returned content can be as suggested.

"buildFrom": {
   "registry: {
       "repository": "https://github.com/devfile/registry"
       "commit": "2cb3c679acc351d9da81593f80f80cf0688cb799"
    }
   "registry-support: {
       "repository": "https://github.com/devfile/registry-support"
       "commit": "e90825181600a98421a7f6ee63881fa45704dc8d"
    }
}

@kadel
Copy link
Member Author

kadel commented Feb 16, 2022

we publish to staging for every new commit, and move to staging to production registry every Wednesday.
The devfile out of sync is due to staging period.

Problem is that there is no way to confirm that the payment happened.
And also not there will be other registry instances that might not have this automated, being able to track down what is running is going to be important.

I think it's good to have this information stored in registry server, but should not in the index content. I do not want to break our current index struct.
The information can be stored in registry image ENV. And a new endpoint GET /version can be introduce to get the registry version information, the returned content can be as suggeste

That makes sense, adding it into the index was just the first thing that I thought. GET /version makes much more sense

Copy link

github-actions bot commented Aug 1, 2024

This issue is stale because it has been open for 90 days with no activity. Remove stale label or comment or this will be closed in 60 days.

@github-actions github-actions bot added the lifecycle/stale Stale items. These items have not been updated for 90 days. label Aug 1, 2024
@github-actions github-actions bot added the lifecycle/rotten Rotten items. These items have been stale for 60 days and are now closed. label Oct 1, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 1, 2024
@github-project-automation github-project-automation bot moved this from Refinement to Done ✅ in Devfile Project Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/registry Devfile registry for stacks and infrastructure lifecycle/rotten Rotten items. These items have been stale for 60 days and are now closed. lifecycle/stale Stale items. These items have not been updated for 90 days.
Projects
Status: Done ✅
Development

No branches or pull requests

2 participants