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

feat: serve airgap samples #1142

Merged
merged 12 commits into from
Aug 6, 2024
Merged

feat: serve airgap samples #1142

merged 12 commits into from
Aug 6, 2024

Conversation

tolusha
Copy link
Contributor

@tolusha tolusha commented Jul 4, 2024

What does this PR do?

feat: serve airgap samples

What issues does this PR fix or reference?

eclipse-che/che#23026

Is it tested? How?

Manual testing

Release Notes

N/A

Docs PR

N/A

@che-bot
Copy link
Contributor

che-bot commented Jul 4, 2024

Click here to review and test in web IDE: Contribute

Copy link

openshift-ci bot commented Jul 4, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Copy link

codecov bot commented Jul 4, 2024

Codecov Report

Attention: Patch coverage is 83.00395% with 43 lines in your changes missing coverage. Please review.

Project coverage is 89.36%. Comparing base (b8be17e) to head (8f26e01).
Report is 3 commits behind head on main.

Files Patch % Lines
...src/devworkspaceClient/services/airGapSampleApi.ts 80.58% 20 Missing ⚠️
...s/dashboard-backend/src/routes/api/airGapSample.ts 84.44% 14 Missing ⚠️
...dashboard-frontend/src/services/bootstrap/index.ts 41.66% 7 Missing ⚠️
.../dashboard-backend/src/devworkspaceClient/index.ts 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1142      +/-   ##
==========================================
- Coverage   89.67%   89.36%   -0.32%     
==========================================
  Files         415      417       +2     
  Lines       42461    42708     +247     
  Branches     2843     2872      +29     
==========================================
+ Hits        38077    38165      +88     
- Misses       4357     4515     +158     
- Partials       27       28       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

archiveFileName="$(echo "${repoURL#https://}" | cut -d '/' -f 2-3 | tr '/' '_').zip"
echo "[INFO] Downloading ${repoURL} into ${archiveFileName}"

# TODO Add token via GitHub Secret
Copy link
Member

Choose a reason for hiding this comment

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

do we need a token even if the repos are public?

@tolusha
Copy link
Contributor Author

tolusha commented Jul 5, 2024

TODO:

  1. Split empty workspace and airgap samples
  2. airgap label on the Dashboard ?
  3. disableInternalRegistry shows/hides samples

tolusha added 6 commits July 31, 2024 16:51
Signed-off-by: Anatolii Bazko <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
Copy link

github-actions bot commented Aug 1, 2024

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1142

kubectl patch command
kubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1142", name: che-dashboard}]}}]"

Signed-off-by: Anatolii Bazko <[email protected]>
@tolusha tolusha marked this pull request as ready for review August 2, 2024 08:08
Comment on lines +35 to +39
async () => {
const token = getServiceAccountToken();
const { airGapSampleApi } = getDevWorkspaceClient(token);
return airGapSampleApi.list();
},

Check failure

Code scanning / CodeQL

Missing rate limiting High

This route handler performs
a file system access
, but is not rate-limited.
This route handler performs
a file system access
, but is not rate-limited.
Signed-off-by: Anatolii Bazko <[email protected]>
Copy link

github-actions bot commented Aug 2, 2024

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1142

kubectl patch command
kubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1142", name: che-dashboard}]}}]"

Signed-off-by: Anatolii Bazko <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
Copy link

github-actions bot commented Aug 5, 2024

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1142

kubectl patch command
kubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1142", name: che-dashboard}]}}]"


private readAirGapIndex(): Array<api.IAirGapSample> {
const airGapIndexFilePath = this.getAirGapIndexFilePath();
if (!fs.existsSync(airGapIndexFilePath)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it's necessary to do all these synchronous fs operations on every request, because the file path doesn't change from one request to another. I'd do it once at the class instantiation.

Signed-off-by: Anatolii Bazko <[email protected]>
Copy link

github-actions bot commented Aug 5, 2024

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1142

kubectl patch command
kubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1142", name: che-dashboard}]}}]"

Copy link
Contributor

@akurinnoy akurinnoy left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

openshift-ci bot commented Aug 5, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: akurinnoy, tolusha

The full list of commands accepted by this bot can be found 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

@tolusha tolusha merged commit f3a22d3 into main Aug 6, 2024
15 of 18 checks passed
@tolusha tolusha deleted the 23026 branch August 6, 2024 07:07
@devstudio-release
Copy link

Build 3.16 :: dashboard_3.x/518: Console, Changes, Git Data

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

Build 3.16 :: dashboard_3.x/518: SUCCESS

Upstream sync done; /DS_CI/sync-to-downstream_3.x/7359 triggered

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

Build 3.16 :: sync-to-downstream_3.x/7360: SUCCESS

Build container: devspaces-operator-bundle synced; /DS_CI/get-sources-rhpkg-container-build_3.x/7345 triggered; /job/DS_CI/job/dsc_3.x triggered;

@devstudio-release
Copy link

Build 3.16 :: operator-bundle_3.x/3379: SUCCESS

Upstream sync done; /DS_CI/sync-to-downstream_3.x/7360 triggered

@devstudio-release
Copy link

Build 3.16 :: copyIIBsToQuay/2738: Console, Changes, Git Data

@devstudio-release
Copy link

Build 3.16 :: dsc_3.x/1977: Console, Changes, Git Data

@devstudio-release
Copy link

Build 3.16 :: update-digests_3.x/7238: SUCCESS

Detected new images: rebuild operator-bundle
* dashboard; /DS_CI/operator-bundle_3.x/3379 triggered

@devstudio-release
Copy link

Build 3.16 :: dsc_3.x/1977: SUCCESS

3.16.0-CI

@devstudio-release
Copy link

Build 3.16 :: copyIIBsToQuay/2738: SUCCESS

3.16
arches = x86_64, s390x, ppc64le;
  * LATEST DS OPERATOR BUNDLE = <a href=https://quay.io/repository/devspaces/devspaces-operator-bundle?tab=tags>registry-proxy.engineering.redhat.com/rh-osbs/devspaces-operator-bundle:3.16-33
  * LATEST DWO OPERATOR BUNDLE = <a href=https://quay.io/repository/devworkspace/devworkspace-operator-bundle?tab=tags>registry-proxy.engineering.redhat.com/rh-osbs/devworkspace-operator-bundle:???
+ s390x-rhel8 IIB(s) copied:
  + <a href=https://quay.io/devspaces/iib:3.16-v4.16-782401- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-s390x>quay.io/devspaces/iib:3.16-v4.16-782401- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-s390x
  + quay.io/devspaces/iib:3.16-v4.16-s390x
  + <a href=https://quay.io/devspaces/iib:3.16-v4.15-782400- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-s390x>quay.io/devspaces/iib:3.16-v4.15-782400- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-s390x
  + quay.io/devspaces/iib:3.16-v4.15-s390x
  + <a href=https://quay.io/devspaces/iib:3.16-v4.14-782397- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-s390x>quay.io/devspaces/iib:3.16-v4.14-782397- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-s390x
  + quay.io/devspaces/iib:3.16-v4.14-s390x
  + <a href=https://quay.io/devspaces/iib:3.16-v4.13-782753- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-s390x>quay.io/devspaces/iib:3.16-v4.13-782753- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-s390x
  + quay.io/devspaces/iib:3.16-v4.13-s390x
  + <a href=https://quay.io/devspaces/iib:3.16-v4.12-782752- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-s390x>quay.io/devspaces/iib:3.16-v4.12-782752- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-s390x
  + quay.io/devspaces/iib:3.16-v4.12-s390x
+ x86_64-rhel8 IIB(s) copied:
  + <a href=https://quay.io/devspaces/iib:3.16-v4.16-782401- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-x86_64>quay.io/devspaces/iib:3.16-v4.16-782401- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-x86_64
  + quay.io/devspaces/iib:3.16-v4.16-x86_64
  + <a href=https://quay.io/devspaces/iib:3.16-v4.15-782755- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-x86_64>quay.io/devspaces/iib:3.16-v4.15-782755- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-x86_64
  + quay.io/devspaces/iib:3.16-v4.15-x86_64
  + <a href=https://quay.io/devspaces/iib:3.16-v4.14-782754- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-x86_64>quay.io/devspaces/iib:3.16-v4.14-782754- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-x86_64
  + quay.io/devspaces/iib:3.16-v4.14-x86_64
  + <a href=https://quay.io/devspaces/iib:3.16-v4.13-782753- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-x86_64>quay.io/devspaces/iib:3.16-v4.13-782753- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-x86_64
  + quay.io/devspaces/iib:3.16-v4.13-x86_64
  + <a href=https://quay.io/devspaces/iib:3.16-v4.12-782752- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-x86_64>quay.io/devspaces/iib:3.16-v4.12-782752- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-x86_64
  + quay.io/devspaces/iib:3.16-v4.12-x86_64
+ ppc64le-rhel8 IIB(s) copied:
  + <a href=https://quay.io/devspaces/iib:3.16-v4.16-782401- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-ppc64le>quay.io/devspaces/iib:3.16-v4.16-782401- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-ppc64le
  + quay.io/devspaces/iib:3.16-v4.16-ppc64le
  + <a href=https://quay.io/devspaces/iib:3.16-v4.15-782755- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-ppc64le>quay.io/devspaces/iib:3.16-v4.15-782755- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-ppc64le
  + quay.io/devspaces/iib:3.16-v4.15-ppc64le
  + <a href=https://quay.io/devspaces/iib:3.16-v4.14-782754- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-ppc64le>quay.io/devspaces/iib:3.16-v4.14-782754- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-ppc64le
  + quay.io/devspaces/iib:3.16-v4.14-ppc64le
  + <a href=https://quay.io/devspaces/iib:3.16-v4.13-782753- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-ppc64le>quay.io/devspaces/iib:3.16-v4.13-782753- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-ppc64le
  + quay.io/devspaces/iib:3.16-v4.13-ppc64le
  + <a href=https://quay.io/devspaces/iib:3.16-v4.12-782752- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-ppc64le>quay.io/devspaces/iib:3.16-v4.12-782752- /tmp/getIIBsForBundle.sh -t PROD_VER [OPTIONS]-ppc64le
  + quay.io/devspaces/iib:3.16-v4.12-ppc64le

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants