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 data directory configuration component to advanced tab in rke2 create/edit cluster interface #11039

Merged
merged 4 commits into from
May 21, 2024

Conversation

aalves08
Copy link
Contributor

@aalves08 aalves08 commented May 16, 2024

Summary

Fixes #10824

Occurred changes and/or fixed issues

  • add data directory configuration component to advanced tab in rke2 create/edit cluster interface
  • add unit test for data directory configuration component

Technical notes summary

Areas or cases that should be tested

  • Go to RKE2 cluster creation interface and make sure the data configuration area is present on the Advanced tab of Cluster Configuration
  • Make sure data persists and all works fine
  • Make sure that cluster editing, the data configuration is disabled (not allowed to change the values)

Areas which could experience regressions

Screenshot/Video

NOTE: this video still doesn't cover the edit scenario properly, since we still don't have the changes needed on the backend to persist the data, but it proves the payload sent is correct

Screen.Recording.2024-05-16.at.12.28.21.mov

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes

@aalves08 aalves08 added this to the v2.9.0 milestone May 16, 2024
@aalves08 aalves08 self-assigned this May 16, 2024
@aalves08 aalves08 force-pushed the 10824-rke2-directory-config branch from 28c19e4 to e458151 Compare May 16, 2024 14:37
@momesgin
Copy link
Member

momesgin commented May 16, 2024

I think even though you are not allowed to change the values later, you should still be able to see the exact values you entered when you created the cluster. For example, I added separate paths for each of the three inputs when I created the cluster but this is what I see in edit mode:
image

@aalves08
Copy link
Contributor Author

I think even though you are not allowed to change the values later, you should still be able to see the exact values you entered when you created the cluster. For example, I added separate paths for each of the three inputs when I created the cluster but this is what I see in edit mode: image

That's because the backend part is still not done. The data doesn't persist yet. It's normal, for now 😬

But they payload is sent correctly. Check the RFC doc linked to the SURE issue where they show the agreed data struct.

@momesgin
Copy link
Member

I think even though you are not allowed to change the values later, you should still be able to see the exact values you entered when you created the cluster. For example, I added separate paths for each of the three inputs when I created the cluster but this is what I see in edit mode: image

That's because the backend part is still not done. The data doesn't persist yet. It's normal, for now 😬

But they payload is sent correctly. Check the RFC doc linked to the SURE issue where they show the agreed data struct.

now that makes sense! 😅

@aalves08 aalves08 force-pushed the 10824-rke2-directory-config branch from e458151 to d4ea7dd Compare May 17, 2024 07:54
@aalves08 aalves08 requested a review from momesgin May 17, 2024 08:06
@aalves08
Copy link
Contributor Author

I removed the optional chaining before (I agree it should not be needed) but this caused failures in at least another unit test... I just re-added them to move this forward :P

@momesgin
Copy link
Member

I removed the optional chaining before (I agree it should not be needed) but this caused failures in at least another unit test... I just re-added them to move this forward :P

It seems you can fix all those failing tests by adding:

dataDirectories: {
   systemAgent:  '',
   provisioning: '',
   k8sDistro:    '',
}

to:

@aalves08
Copy link
Contributor Author

I removed the optional chaining before (I agree it should not be needed) but this caused failures in at least another unit test... I just re-added them to move this forward :P

It seems you can fix all those failing tests by adding:

dataDirectories: {
   systemAgent:  '',
   provisioning: '',
   k8sDistro:    '',
}

to:

@momesgin code updated 🙏

Copy link
Member

@momesgin momesgin left a comment

Choose a reason for hiding this comment

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

lgtm

@aalves08 aalves08 merged commit 3700340 into rancher:master May 21, 2024
27 checks passed
@eva-vashkevich
Copy link
Member

I am getting
"[Vue warn]: Invalid prop: type check failed for prop "value". Expected Object, got Undefined

found in

---> at shell/edit/provisioning.cattle.io.cluster/tabs/DirectoryConfig.vue
at shell/edit/provisioning.cattle.io.cluster/tabs/Advanced.vue
at shell/components/Tabbed/Tab.vue
at shell/components/Tabbed/index.vue
at shell/components/CruResource.vue
at shell/edit/provisioning.cattle.io.cluster/rke2.vue
at shell/components/CruResource.vue
at shell/edit/provisioning.cattle.io.cluster/index.vue
at shell/components/ResourceDetail/index.vue
at shell/pages/c/_cluster/_product/_resource/create.vue
<Shell/components/templates/default.vue> at shell/components/templates/default.vue

error thrown if I am trying to save rke2 cluster with default configuration.

Screen.Recording.2024-05-24.at.2.47.13.PM.mov

@aalves08
Copy link
Contributor Author

Gm @eva-vashkevich . This was dependent on a backend issue rancher/rancher#45038 but all of the work has been merged, afaik. I am going to give this a test with a new backend image. Since I've done the frontend part without the backend being finished, I totally forgot to test it manually and merged this (all based on the RFC doc). 🙏

@aalves08
Copy link
Contributor Author

aalves08 commented May 27, 2024

Looking at the associated PRs, I don't think the backend part is completed to this date.... 🤔 The console message is not pretty, but I don't think there's a high risk with the current work merged. It allows for creating/edit of a cluster + the console message doesn't appear unless you're running the UI locally.

I've just pinged the backend team to get more information about the current status of their work and it's expected to be completed.

@eva-vashkevich
Copy link
Member

@aalves08 Thank you for looking into it

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

Successfully merging this pull request may close these issues.

RKE2 Directory config: add support for new Cluster Spec systemAgentVarDir, caprVarDir and dataDir fields
3 participants