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

Fix issue that fetch the wrong Notebook Image if two Imagestream Version shared the same sha #2867

Merged

Conversation

lucferbux
Copy link
Contributor

Closes https://issues.redhat.com/browse/RHOAIENG-7917

Description

Fix issue that fetch the wrong Notebook Image if two Imagestream Version shared the same sha

How Has This Been Tested?

### In a cluster without Internal Registry

  1. Create a workbench with jupyter-minimal-notebook imagestream
  2. Notebook image value is shown properly on Dashboard as Minimal Python
  3. Then import a custom image (same as is used in this jupyter-minimal-notebook imagestream) and name it as custom-minimal
  4. The Notebook image should keep the same image

In a cluster with Internal Registry

  1. Deploy an image
  2. It should display the correct image version

Test Impact

Expanded the testing coverage of the function to account for that edge case

Request review criteria:

Self checklist (all need to be checked):

  • The developer has manually tested the changes and verified that the changes work
  • Commits have been squashed into descriptive, self-contained units of work (e.g. 'WIP' and 'Implements feedback' style messages have been removed)
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has added tests or explained why testing cannot be added (unit or cypress tests for related changes)

If you have UI changes:

  • Included any necessary screenshots or gifs if it was a UI change.
  • Included tags to the UX team if it was a UI/UX change (find relevant UX in the SMEs section).

After the PR is posted & before it merges:

  • The developer has tested their solution on a cluster by using the image produced by the PR to main

@lucferbux lucferbux requested review from andrewballantyne, jstourac and atheo89 and removed request for manaswinidas and ppadti May 31, 2024 11:06
Copy link
Member

@atheo89 atheo89 left a comment

Choose a reason for hiding this comment

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

Hi Lucas, the solution works well on my osia cluster. I tested it with the quay.io/opendatahub/odh-notebook-controller:pr-336 image for the ODH notebook controller deployment. It functions correctly both with and without the internal registry.

/lgtm

Copy link

codecov bot commented May 31, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 77.44%. Comparing base (4aa0a8c) to head (7ffb101).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2867      +/-   ##
==========================================
- Coverage   77.46%   77.44%   -0.02%     
==========================================
  Files        1110     1110              
  Lines       23515    23521       +6     
  Branches     5932     5937       +5     
==========================================
  Hits        18215    18215              
- Misses       5300     5306       +6     
Files Coverage Δ
...s/screens/detail/notebooks/useNotebookImageData.ts 88.37% <83.33%> (-0.82%) ⬇️

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4aa0a8c...7ffb101. Read the comment docs.

Copy link
Member

@andrewballantyne andrewballantyne left a comment

Choose a reason for hiding this comment

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

My test didn't go as I expected... this is more than just sharing sha values?

ODH Nightlies:
Screenshot 2024-05-31 at 9 46 02 AM

Locally running the code:
Screenshot 2024-05-31 at 9 46 17 AM

Copy link
Contributor

openshift-ci bot commented May 31, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andrewballantyne

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

@andrewballantyne
Copy link
Member

Tested with Lucas, validated the bug works with his PR against it being broken on cluster in both no-registry and registry based clusters. The reason code-server shows up is because it had logic looking at tags (2024.1 is common in the OOTB images).

Everything looks good -- LGTM.

@andrewballantyne
Copy link
Member

/retest

@andrewballantyne
Copy link
Member

/override ci/prow/images

Having mirror image issues -- skipping

Copy link
Contributor

openshift-ci bot commented May 31, 2024

@andrewballantyne: Overrode contexts on behalf of andrewballantyne: ci/prow/images

In response to this:

/override ci/prow/images

Having mirror image issues -- skipping

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

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

Successfully merging this pull request may close these issues.

3 participants