-
Notifications
You must be signed in to change notification settings - Fork 34
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
feat: provide --owner
arg for add
cmd
#1722
feat: provide --owner
arg for add
cmd
#1722
Conversation
eq(ServiceInstallCtx { | ||
args: vec![ | ||
OsString::from("--rpc"), | ||
OsString::from("127.0.0.1:8081"), |
Check notice
Code scanning / devskim
Accessing localhost could indicate debug code, or could hinder scaling. Note
eq(ServiceInstallCtx { | ||
args: vec![ | ||
OsString::from("--rpc"), | ||
OsString::from("127.0.0.1:8081"), |
Check notice
Code scanning / devskim
Accessing localhost could indicate debug code, or could hinder scaling. Note
The `--owner` argument on the `add` command will be passed to the node service definition. It is also retained on upgrade. Test cases were added for each.
The `local run` and `local join` commands had an optional `--owner` argument being used in testing scenarios to pass `--owner` to each `safenode` process. In its absence, the application code was checking if it was running in a CI context, and if so, it was assigning an individual owner to each node. This owner would be in the form "node_X", where "X" was replaced with the node number. If the code determined it wasn't running in CI, it would still launch the node with `--owner`, assigning a default value. This behaviour has been changed such that `safenode` will only be passed `--owner` if it has also been used on the node manager `local run/join` commands. This lets `safenode` itself provide a default value. Now, the `local run --owner` argument assigns the same owner to each `safenode` process in the local network, and a new argument, `--owner-prefix`, assigns an individual owner to each node, based on a prefix. For example, if you use `--owner-prefix node`, the nodes will be assigned owners "node_1", "node_2", and so on. We need to configure the CI system to specify owners where it needs to. This new setup prevents CI details leaking in to the application code.
80c41da
to
818afc9
Compare
818afc9
to
9452127
Compare
With the new `--owner-prefix` argument available on the `local run` command and the local testnet action updated for this, we can use it in the `memcheck` workflow to specify that nodes should be assigned the owners "node_1", "node_2", and so on.
The Discord username is hooked up to the `safenode` `--owner` argument in the service definition.
9452127
to
e5ceb19
Compare
--owner
arg for add
cmd--owner
arg for add
cmd
I tried to run `node-launchpad` in a headless VM and it said it couldn't find a terminal. We don't need to find a terminal if we are already running in one, so the check here is changed slightly. We will probably want to reconfigure the elevated privilege to be a separate thing from configuring a terminal, but on Windows this will be a bit more complex and will better be done as a separate piece of work.
e5ceb19
to
cf3a4a4
Compare
7d8517b feat: provide
--owner
arg foradd
cmdThe
--owner
argument on theadd
command will be passed to the node service definition. It isalso retained on upgrade. Test cases were added for each.
514760b chore: reconfigure local network owner args
The
local run
andlocal join
commands had an optional--owner
argument being used in testingscenarios to pass
--owner
to eachsafenode
process. In its absence, the application code waschecking if it was running in a CI context, and if so, it was assigning an individual owner to each
node. This owner would be in the form "node_X", where "X" was replaced with the node number. If the
code determined it wasn't running in CI, it would still launch the node with
--owner
, assigning adefault value.
This behaviour has been changed such that
safenode
will only be passed--owner
if it has alsobeen used on the node manager
local run/join
commands. This letssafenode
itself provide adefault value. Now, the
local run --owner
argument assigns the same owner to eachsafenode
process in the local network, and a new argument,
--owner-prefix
, assigns an individual owner toeach node, based on a prefix. For example, if you use
--owner-prefix node
, the nodes will beassigned owners "node_1", "node_2", and so on.
We need to configure the CI system to specify owners where it needs to. This new setup prevents CI
details leaking in to the application code.
64638f0 ci: use owners on memcheck workflow local network
With the new
--owner-prefix
argument available on thelocal run
command and the local testnetaction updated for this, we can use it in the
memcheck
workflow to specify that nodes should beassigned the owners "node_1", "node_2", and so on.
2222787 feat: supply discord username on launchpad
The Discord username is hooked up to the
safenode
--owner
argument in the service definition.cf3a4a4 chore: check we are in terminal before creating one
I tried to run
node-launchpad
in a headless VM and it said it couldn't find a terminal. We don'tneed to find a terminal if we are already running in one, so the check here is changed slightly.
We will probably want to reconfigure the elevated privilege to be a separate thing from configuring
a terminal, but on Windows this will be a bit more complex and will better be done as a separate
piece of work.
Description
reviewpad:summary