-
Notifications
You must be signed in to change notification settings - Fork 81
Prospero update operation to a specific version #749
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
base: main
Are you sure you want to change the base?
Prospero update operation to a specific version #749
Conversation
|
||
=== Related Issues | ||
|
||
- https://github.com/wildfly-extras/prospero/issues/754 |
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.
Could you also add a link to #577 please?
== Requirements | ||
|
||
==== Hard requirements: | ||
- Add a `--version` parameter to the update operation with values in format `<CHANNEL_NAME>::<VERSION>` |
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'm not sure about the format. In the simple case (only 1 manifest was used to provision the installation), only the version
from the manifest's Maven GAV coordinates needs to be specified.
For more complex cases (multiple manifests were used), the full Maven coordinates would needs to be specified for the manifest(s) to update to.
--version
could be either <version>
or a comma-separated lists of <groupId>:<artifactId>:<version>
.
wdyt?
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.
Hi @jmesnil in that case, I think that the Bartek idea was use the name of the channel from the server configuration. Looking at the video recorded by him: https://asciinema.org/a/WMBleBkPDTLRyljlaavKkpptg it seems that the --version <CHANNEL_NAME>::<VERSION>
is something like:
$ ./prospero update perform --dir wfly --version wildfly:36.0.0.Beta1
Do you think that we could use something different of <CHANNEL_NAME>::<VERSION>
in the second case when there's multiple manifests? In case of have only one manifest, I thing we could drop the <CHANNEL>
and provide only the <VERSION>
.
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.
Following two points are relevant for this discussion (reference via channel name or via manifest coordinate):
- If a server is subscribed to multiple channels, the customer has to provide versions of all the involved manifests.
This point is actually not a problem, as I'm checking that the wildfly-channel lib doesn't allow to initialize a session with multiple channels that have identical manifest. That means that manifest coordinate also uniquely represents a channel. So we could use both - channel name or manifest coordinate.
- If the channel uses a URL manifest, the user should be able to provide the URL of the new manifest. Note, providing a version for a URL-based channel should be considered an error.
Here the manifest coordinate I think becomes bit problematic. We need to identify a channel we want to change, and at the same time provide a new manifest URL.
With channel name it could be as Bartek suggested --version channel-0::https:/...
.
With manifest coordinates, it would have to be something like --version oldurl::newurl
? Single colon doesn't look like sufficient delimiter.
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.
The second point (changing manifest URL) is in fact in the nice-to-have section.
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 agree, w/ the name seems the correct way to make it work. Like you said: --version channel-0::https:/...
. With manifest coordinates I don't see other way as --version oldurl::newurl
Should I add those examples on each bullet point? I think that it could be useful.
|
||
==== Non-requirements: | ||
- When the server is subscribed to multiple channels, update operation does not verify the compatibility of selected versions. | ||
- "Fixing" a server to a manifest version - i.e. the update operation *does not* change the channel configuration. If before the update server was subscribed to a `org.wildfly.channels:wildfly`, the version will not be added after the update. |
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.
could you elaborate please?
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.
The first one is related to multiple channels. I don't know if you agree, but the ideia is not verify the compatibility of the versions present on --version
parameter when using multiple channels.
TBH I didn't understand the second as well. I don't know what Bartosz was thinking on this section. Do you think that we can remove it @jmesnil?
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 think the second point is about not changing the internal provisioning config of the installation (.installation/installer-channels.yaml), which normally looks something like:
---
schemaVersion: "2.0.0"
name: "channel-0"
repositories:
- id: "central"
url: "https://..."
manifest:
maven:
groupId: "org.wildfly.channels"
artifactId: "wildlfy"
resolve-if-no-stream: "none"
It says essentially that when you run update --version 35.0.1
, the 35.0.1
version is not added internally into that subscribed channel configuration. So, the installation doesn't get locked on 35.0.1 and subsequently running update
without the --version
parameter would result in updating to the latest available version based on what's in the Central maven repo.
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.
It looks reasonable behavior to me, I wouldn't remove it. :)
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.
good, I got it and agree with keep this
=== Future Work | ||
|
||
- Supporting rollback to a logical/physical manifest. | ||
- __Possibly listing available versions in `update list` operation.__ |
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.
is that different from the update list-versions
operation you suggest in the nice-to-have
requirements?
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.
That's the same from ==== Nice-to-have requirements:
. I guess that we can use only one. wdyt?
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.
If that's from Bartek's proposal, I think he may have referred to two different operations.
update list-versions
is new operation that would list available manifest versions,update list
is an existing operation that displays all the artifact upgrades that the upgrade operation is gonna perform (which would now need to support the --version parameter as well I guess - that we should spell out too).
I read this as Bartek suggested possibly extending the update list
to as well show some info on available manifests, but that to me looks like bit too much.
Let's clarify if you have something different in mind...
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.
yes, it was from Bartek's proposal.
ef6a0c1
to
14d9dec
Compare
|
||
==== Nice-to-have requirements: | ||
- A new `update list-versions` operation should present a list of possible manifest updates and downgrades. | ||
- If the channel uses a URL manifest, the user should be able to provide the URL of the new manifest. Note, providing a version for a URL-based channel should be considered an error. |
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.
What isn't spelled out is what happens if I try to set URL to a GAV-based manifest, but I assume that should be forbidden.
|
||
=== User Stories | ||
|
||
- As an admin I want to use a logical or physical manifest version to update the server to a specific version. |
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.
Note that allowing the logical version would probably mean downloading all versions of manifest files form maven to be able to create mapping between logical versions and real maven versions. I kinda see that as problematic.
We would also need to be able to distinguish if given string is a logical or a real maven version, which I'm not sure if can be done reliably.
For URL based manifest it can't be used at all IMO.
(The logical version is a metadata field inside the manifest YAML, see https://download.eng.brq.redhat.com/brewroot/repos/jb-eap-8.1-maven-build/latest/maven/org/jboss/eap/channels/eap-8.1/1.0.0.GA-redhat-00012/eap-8.1-1.0.0.GA-redhat-00012-manifest.yaml)
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.
Modifying this point a bit, I would suggest the logical version would not be accepted as input for the --version
parameter, but would be displayed next to maven version by the update list-versions
command. WDYT?
(That would still require to download all the manifest file versions from Maven repo.)
@jmesnil as I'm looking at wildfly/prospero#754 / #705 linked as related to this proposal, this proposal doesn't in fact enable that. Am I right and is that OK? In this proposal the --version parameter only affects single invocation of given update command. The #705 requires permanent change of the manifest version in |
@TomasHofman That seems right, #705 proposal actually correspond to the non-requirement ("Fixing" a server to a manifest version) from this #749 proposal. |
Issue: #705