-
Notifications
You must be signed in to change notification settings - Fork 81
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:adds network name key #3356
Conversation
Adds Network name key
Can one of the admins verify this patch? |
2 similar comments
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
@nLight you can now look into this and let me know the |
if (!networks || !networks.length) { | ||
return null; | ||
} | ||
// need to get the networks to return here for network name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nLight what is the key
name that needs to be mapped to return the network name
@adityatandon007 thank you, I will have a look! |
Hey @adityatandon007, so the key name is Thanks for dealing with this! |
@nLight I didn't get the point. |
@adityatandon007 the field name you are looking for called |
if (!networks || !networks.length) { | ||
return null; | ||
} | ||
// need to get the networks to return here for network name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about this?
if (networks[0].name) {
return networks[0].name;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GeorgiSTodorov should I add this in my function. Has the network type
changed to network mode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GeorgiSTodorov should I add this in my function. Has the network type
changed to network mode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GeorgiSTodorov has the Network Type
changed to Network Mode
. Should I add the above snippet in my function to return network name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adityatandon007
We should show all names not only the first one.
Changing Network type to Network Mode is not in scope of the ticket.
@nLight is changing |
@GeorgiSTodorov has the |
@adityatandon007 It is changed in the jira screenshots, but I am not sure if chaning it is in scope of this ticket. |
Adds Network names key for config section
return null; | ||
} | ||
|
||
return networks.map(({ name }) => NETWORK_MODE_NAME[name]).join(", "); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it should be just name
without NETWORK_MODE_NAME[name]
return networks.map(({ name }) => NETWORK_MODE_NAME[name]).join(", "); | |
return networks.map(({ name }) => name).join(", "); |
Adds Network names key for config section update
Thanks for the effort! Let's wait for CI and maybe @GeorgiSTodorov could give it a look 👀 |
To test multiple networks. Tradeoff - it won't start since UCR doesn't support {
"id": "/pod",
"version": "2018-10-25T14:55:31.424Z",
"containers": [
{
"name": "container-1",
"resources": {
"cpus": 0.1,
"mem": 128,
"disk": 0,
"gpus": 0
},
"endpoints": [
{
"name": "ping",
"containerPort": 80,
"networkNames": ["dcos"],
"hostPort": 0,
"protocol": [
"tcp"
]
}
],
"image": {
"kind": "DOCKER",
"id": "nginx"
}
}
],
"networks": [
{
"name": "dcos",
"mode": "container"
},
{
"name": "dcos6",
"mode": "container"
}
],
"scaling": {
"instances": 1,
"kind": "fixed"
},
"scheduling": {
"placement": {
"constraints": []
}
},
"executorResources": {
"cpus": 0.1,
"mem": 32,
"disk": 10
},
"volumes": [],
"fetch": []
} |
@nLight ,this is what I get when I try to test your json: |
@GeorgiSTodorov I updated the json |
Same thing happens again. |
@GeorgiSTodorov please use JSON only mode, that's a known bug in the form |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thank you @adityatandon007 and @nLight .
🎉 This PR is included in version 2.34.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Adds Network name key (WIP) related to #3336
Testing
Trade-offs
Dependencies
Screenshots