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

Add offline support for starter projects #118

Merged
merged 19 commits into from
Jun 17, 2022

Conversation

michael-valdron
Copy link
Member

@michael-valdron michael-valdron commented Jun 1, 2022

Signed-off-by: Michael Valdron mvaldron@redhat.com

Please specify the area for this PR
registry server

What does does this PR do / why we need it:

Provides the use of offline starter projects using the download-starter-projects endpoint. There are also fixes to unrelated warnings in the endpoint.go source file.

Changes

  • Offline download support for download-starter-projects endpoint
  • Additional test cases for the download-starter-projects endpoint that tests offline downloading
  • build-tools/dl_starter_projects.sh script for downloading starter project for offline testing during CI build
  • go-starter-offline starter project added to go stack as an offline copy of go-starter
  • Created new MakeVersionMap util function in util.go with testing under util_test.go
  • Fixed warning for multiple indexSchema imports
  • Fixed warning for unused error variable due to missing error reporting for the pullStackFromRegistry procedure

Which issue(s) this PR fixes:

Fixes #?

fixes devfile/api#851

PR acceptance criteria:

  • Test (WIP)

Documentation (WIP)

How to test changes / Special notes to the reviewer:

build-tools/dl_starter_projects.sh Outdated Show resolved Hide resolved
build-tools/dl_starter_projects.sh Outdated Show resolved Hide resolved
index/server/pkg/server/endpoint.go Outdated Show resolved Hide resolved
index/server/pkg/server/registry.go Outdated Show resolved Hide resolved
tests/integration/pkg/tests/indexserver_tests.go Outdated Show resolved Hide resolved
@michael-valdron
Copy link
Member Author

Will need to be rebased for incoming changes in PR #119

Signed-off-by: Michael Valdron <mvaldron@redhat.com>
- Removed duplicate import of indexSchema and fixed line effecting it
- Error pulling from OCI Registry now returns error 500 and gets reported

Signed-off-by: Michael Valdron <mvaldron@redhat.com>
Signed-off-by: Michael Valdron <mvaldron@redhat.com>
Signed-off-by: Michael Valdron <mvaldron@redhat.com>
Signed-off-by: Michael Valdron <mvaldron@redhat.com>
Signed-off-by: Michael Valdron <mvaldron@redhat.com>
- makeVersionMap function created
- versionMap creation source in fetchDevfile replaced by makeVersionMap invoke
- fetchDevfile invoke under download starter projects endpoint now returns devfile index schema
- version injection in offline stack path fixed

Signed-off-by: Michael Valdron <mvaldron@redhat.com>
… devfiles.

Signed-off-by: Michael Valdron <mvaldron@redhat.com>
… added.

Signed-off-by: Michael Valdron <mvaldron@redhat.com>
Signed-off-by: Michael Valdron <mvaldron@redhat.com>
…ead of a constant.

Signed-off-by: Michael Valdron <mvaldron@redhat.com>
Signed-off-by: Michael Valdron <mvaldron@redhat.com>
@michael-valdron
Copy link
Member Author

rebased on PR #119 changes

…(branches) and with a subdir defined.

Signed-off-by: Michael Valdron <mvaldron@redhat.com>
Signed-off-by: Michael Valdron <mvaldron@redhat.com>
…roject is invalid added.

Signed-off-by: Michael Valdron <mvaldron@redhat.com>
…akeVersionMap function.

Signed-off-by: Michael Valdron <mvaldron@redhat.com>
Signed-off-by: Michael Valdron <mvaldron@redhat.com>
Signed-off-by: Michael Valdron <mvaldron@redhat.com>
Signed-off-by: Michael Valdron <mvaldron@redhat.com>
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 17, 2022
@openshift-ci
Copy link

openshift-ci bot commented Jun 17, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: johnmcollier, michael-valdron

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 17, 2022
@michael-valdron michael-valdron merged commit ffd3c2a into devfile:main Jun 17, 2022
@michael-valdron michael-valdron deleted the offline-support branch June 17, 2022 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
2 participants