Skip to content

fix: set user unready when no default ns #536

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
wants to merge 1 commit into from

Conversation

mfrancisc
Copy link
Contributor

@mfrancisc mfrancisc commented Jun 16, 2025

Fix the GET /signup api so that it returns signup.status.ready=false when defaultNamespace for the user is unset.

see: https://redhat-internal.slack.com/archives/CHK0J6HT6/p1749804989753299

related PR's:

Jira: https://issues.redhat.com/browse/SANDBOX-1214

Copy link

Copy link

codecov bot commented Jun 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.08%. Comparing base (d034e8c) to head (558add5).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #536      +/-   ##
==========================================
+ Coverage   81.03%   81.08%   +0.04%     
==========================================
  Files          45       45              
  Lines        3554     3563       +9     
==========================================
+ Hits         2880     2889       +9     
  Misses        587      587              
  Partials       87       87              
Flag Coverage Δ
unittests 81.08% <100.00%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@alexeykazakov alexeykazakov left a comment

Choose a reason for hiding this comment

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

Still not sure how this can happen but it won't hurt to have this check anyway.

signupResponse.Status = signup.Status{
Ready: false,
Reason: toolchainv1alpha1.UserSignupNoDefaultNamespaceReason,
Message: "No default namespace found",
Copy link
Contributor

Choose a reason for hiding this comment

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

WDYT about this message instead?

Suggested change
Message: "No default namespace found",
Message: "Default namespace not available (yet)",

Copy link
Contributor

Choose a reason for hiding this comment

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

I would vote for @alexeykazakov's version

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

Copy link

openshift-ci bot commented Jun 17, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexeykazakov, mfrancisc, rajivnathan

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:
  • OWNERS [alexeykazakov,mfrancisc,rajivnathan]

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

@mfrancisc
Copy link
Contributor Author

Let's close this for now as discussed here https://redhat-internal.slack.com/archives/CHK0J6HT6/p1749804989753299 it will be addressed differently as part of another effort.

@mfrancisc mfrancisc closed this Jun 18, 2025
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.

4 participants