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

Use interfaces in gateway node selector #3860

Merged
merged 11 commits into from
Feb 18, 2025

Conversation

0oM4R
Copy link
Contributor

@0oM4R 0oM4R commented Feb 3, 2025

Description

new zos-light nodes gateways supports only ipv4, ip6, myceluim so we need to make sure that the listed nodes are compatible with the selected interface; in applications, we are deploying the gateway over wireguard.

Changes

  • update the selecte node and domain name components to accept array of network features.

  • if the selected interface is ipv6 we have to set the hasIpv6 with true; without passing ipv6 in features

  • no need to pass ipv4 in any scenario as we already added it based on the gateway value

  • make selectedIPAddress as string as we always convert it to string everywhere

  • reorder the manage domain dialog
    k8s :

image vm: image
interfaces.mov

Related Issues

#3858

Tested Scenarios

In applications that use gateways, we are passing wireguard to the features
image

in domains page it list the node 309 but you have to rent it first, you may see new shared nodes added
image

in manage domain dialog: if the vm contaisn only myceluim then the both node will be listed normally
image

Documentation PR

For UI changes, Please provide the Documentation PR on info_grid

To consider

Preliminary Checks:

  • Preliminary Checks
    • Does it completely address the issue linked?
    • What about edge cases?
    • Does it meet the specified acceptance criteria?
    • Are there any unintended side effects?
    • Does the PR adhere to the team's coding conventions, style guides, and best practices?
    • Does it integrate well with existing features?
    • Does it impact the overall performance of the application?
    • Are there any bottlenecks or slowdowns?
    • Has it been optimized for efficiency?
    • Has it been adequately tested with unit, integration, and end-to-end tests?
    • Are there any known defects or issues?
    • Is the code well-documented?
    • Are changes to documentation reflected in the code?

UI Checks:

  • UI Checks
    • If a UI design is provided/ does it follow it?
    • Does every button work?
    • Is the data displayed logical? Is it what you expected?
    • Does every validation work?
    • Does this interface feel intuitive?
    • What about slow network? Offline?
    • What if the gridproxy/graphql/chain is failing?
    • What would a first time user have a hard time navigating here?

Code Quality Checks:

  • Code Quality Checks
    • Code formatted/linted? Are there unused imports? .. etc
    • Is there redundant/repeated code?
    • Are there conditionals that are always true or always false?
    • Can we write this more concisely?
    • Can we reuse this code? If yes, where?
    • Will the changes be easy to maintain and update in the future?
    • Can this code become too complex to understand for other devs?
    • Can this code cause future integration problems?

Testing Checklist

  • Does it Meet the specified acceptance criteria.
  • Test if changes can affect any other functionality.
  • Tested with unit, integration, and end-to-end tests.
  • Tested the un-happy path and rollback scenarios.
  • Documentation updated to meet the latest changes.
  • Check automated tests working successfully with the changes.
  • Can be covered by automated tests.

General Checklist

  • Tests included
  • Build pass
  • Documentation
  • Code format and docstring
  • Screenshots/Video attached (needed for UI changes)

@0oM4R 0oM4R changed the title Development gateway interfaces Use interfaces in gateway node selector Feb 5, 2025
- refactor: change the type of selectedIPAddress as it always got converted to string
- pass the selected interface type as feature to the domainName component
@@ -263,6 +268,21 @@ export default {
const availableK8SNodesNames = availableK8SNodes.map(node => node.name);
const selectedK8SNodeName = ref(availableK8SNodesNames[0]);
const selectedNode = ref();
const interfaceFeature = computed<NetworkFeatures[]>(() => {
const net = networks.value.find(net => net.value == selectedIPAddress.value);
switch (net?.title) {
Copy link
Contributor

Choose a reason for hiding this comment

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

please add public ipv4 case

Copy link
Contributor

Choose a reason for hiding this comment

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

nvm, ignore the comment

Copy link
Contributor

@amiraabouhadid amiraabouhadid left a comment

Choose a reason for hiding this comment

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

was able to deploy a domain on mycelium and on wireguard. Filters work seem to work. Couldn't try de02.dev.grid.tf as node 314 was rented. Nor gent02 as node 11 is excluded
image

Copy link
Contributor

@amiraabouhadid amiraabouhadid left a comment

Choose a reason for hiding this comment

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

tried with de2, works
image

@0oM4R 0oM4R merged commit 4dd5f0f into development Feb 18, 2025
10 checks passed
@AhmedHanafy725 AhmedHanafy725 deleted the development_gateway_interfaces branch February 19, 2025 08:45
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.

4 participants