Skip to content
New issue

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

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

Already on GitHub? # to your account

WIP: Add lastModified field to generated index file #248

Closed
wants to merge 4 commits into from

Conversation

Jdubrick
Copy link
Contributor

Please specify the area for this PR

What does does this PR do / why we need it:
This is the first PR aimed at supporting a lastModified query parameter for filtering data. The changes made as part of this PR add functionality for reading a last_modified.json file that is added to the registry directory during build. The goal is to read these values and assign them to their proper stack/sample versions they belong to within the generated index file.

In addition to this functionality I had to do more data manipulation to allow for the proper setting of these values, it is easier to do this in go rather than bash so it was done here instead of devfile/registry#429.

Additionally, tests were updated to contain the new field so we can ensure it is being added correctly.

FYI changes still need to be made on the index/server side for the actual endpoint, this is just the index/generator work for the index file.

Which issue(s) this PR fixes:

fixes devfile/api#1327

PR acceptance criteria:

  • Test Coverage
    • Are your changes sufficiently tested, and are any applicable test cases added or updated to cover your changes?

Documentation (WIP)

How to test changes / Special notes to the reviewer:
Go tests should pass - The new field was added to the expected index file.

Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Copy link

openshift-ci bot commented Jun 21, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Jdubrick

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 21, 2024
index/generator/library/library.go Fixed Show fixed Hide fixed
index/generator/library/library.go Fixed Show fixed Hide fixed
index/generator/library/library.go Fixed Show fixed Hide fixed
index/generator/library/library.go Fixed Show fixed Hide fixed
@Jdubrick Jdubrick changed the title Add lastModified field to generated index file WIP: Add lastModified field to generated index file Jun 21, 2024
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
@Jdubrick
Copy link
Contributor Author

@Jdubrick
Copy link
Contributor Author

Going to close - I'll open a new PR with the index/server changes. It will be too much of a headache to have them in separate PRs for tests

@Jdubrick Jdubrick closed this Jun 21, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/work-in-progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

REST API lastModified query parameter for requesting filtered index schemas
1 participant