-
Notifications
You must be signed in to change notification settings - Fork 4
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
Knowing when the client version is different from the agent version #322
Comments
This can be a common occurrence internally in the team due to system installation and home installation, that's why I realised that it doesn't make sense to have polykey installed on a system level for operator platforms in our nixpkgs-matrix-private. It's better to instead be a home manager installed thing and solely that to avoid confusion between system and user-level packages/services. |
I am not a big fan of the version string formatting. We, as the developers, know how to parse the output, but an end user might not. The numbers would mean nothing to them. Which is why I propose changing the output of
For Polykey, it could look like this.
One could argue that the state and network information isn't relevant when the
Then, we can keep the current separation between client and agent and display the version metadata as such.
If we need this to be a single string, we can explore other ways to separate the different versions than using a JSON representation. These are possible ways to represent the version in a single line, but I believe the version should be more descriptive in this case, as we need to display the versions of up to four different sources.
Thoughts, @CMCDragonkai @tegefaulkes? |
I get where you're coming from, but I think what we've discussed so far is the best compromise we have for now.
So lets stick with this. |
I think we should have a warning occur whenever a client connects to the agent with a different versions. Different versions actually to trigger checks:
|
Specification
While using the NixOS installed polykey I realised that my PK client version is not the same as the agent version that I was connecting to.
The agent version is was running from staging branch.
So right now there are 2 main ways to ask about the version:
The first is asking the local client program's version. It will tell you:
Which is CLI version, library version, state version, network version.
When connecting to an agent, it will tell you:
This is a bit more confusing, the
versionMetadata
shouldn't be required anymore right? I'm not sure why that's still there... or we should incorporate it into the standard data. I think it had something to do with the testnet mainnet dashboard. We should see if we can reduce the amount of redundancy here.But anyway... you can see here that it reports the agent's version instead.
There's a few things I'd like to do here:
Program-Library-State-Network
. However the library itself doesn't know what the program version is. Only the program does. I believe the program needs to inject its version into agent status command... that's the only way it works. Therefore should see something like:0.13.0-1.15.1-1-1
. The problem is that we don't distinguish between client program and agent program. So...I think that's sufficient, we don't need all that extra stuff.
Then the
agent status
will be alot easier to parse and it won't be super long with lots of unnecessary detail.We will need to update the testnet and mainnet dashboards to compensate for these changes.
The key thing is that during debugging, when people have a problem, we can now know if it is due to the client having a different version from the agent.
Also another thing is that
polykey --version
looks weird too. But I recognise, part of the reason is due to the prerelease identifiers which support1.2.0-alpha.0
. Which means we have ambiguity like:But I think the ambiguity can technically be resolved with some regular expression. But it does become more difficult to parse.
So as in #172, we can do something like this instead, preferring the JSON serialisation of the array.
To be used for both agent status output and for
polykey --version
.That makes it easier to compare... etc.
Additional Context
Tasks
agent status
.agent status
actually shows bothagentVersion
andclientVersion
.commitHash
or incorporate into the top level fieldsThe text was updated successfully, but these errors were encountered: