Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Add ability to specify a minor version for pulpcore_version #762

Merged
merged 1 commit into from
Oct 6, 2021

Conversation

dkliban
Copy link
Member

@dkliban dkliban commented Sep 13, 2021

pulpcore_version now defaults to a specific minor release of pulpcore (e.g.: 3.15)
which the installer is going to install.

When the installer is run for the first time, the latest patch release of pulpcore
(e.g.: 3.15.2) is installed. If the installer is run again with the same value of
pulpcore_version, the pulpcore package is not updated. In order to update to the
latest patch release within a minor stream, the user must set pulpcore_update to
true.

If the user sets the pulpcore_version to a different minor release of pulpcore
(e.g.: 3.16), the installer will attempt to upgrade pulpcore to the latest patch
release (e.g.: 3.16.1) for that minor release of pulpcore.

If the user sets the pulpcore_version to a specific patch release, the installer
will attempt to install that specific release of pulpcore.

If the installed plugins are not compatible with the requested release of pulpcore,
the installer will not make any changes.

The version of a plugin can now also be specified as a minor release (e.g.: 1.8) or
a specific patch release (e.g.: 1.8.2). When the a minor release is specified and it
is the same as the installed version of the plugin, the upgrade parameter for that
plugin must be set to true in order for the plugin to be updated to the latest
patch release.

fixes: #8847
https://pulp.plan.io/issues/8847

@pulpbot
Copy link
Member

pulpbot commented Sep 13, 2021

Attached issue: https://pulp.plan.io/issues/8847

@dkliban dkliban force-pushed the pulpcore-minor-release branch 6 times, most recently from c8d6778 to 6a35ecc Compare September 14, 2021 19:42
Copy link
Member

@mikedep333 mikedep333 left a comment

Choose a reason for hiding this comment

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

I'm very happy this is working so well now with the new design!

molecule/packages-dynamic/group_vars/all Outdated Show resolved Hide resolved
roles/pulp_common/README.md Outdated Show resolved Hide resolved
roles/pulp_common/tasks/install_pip.yml Outdated Show resolved Hide resolved
# pulp_upgrade true/false -> ansible pip module latest/present ->
# pip command "install --upgrade"/"install"
# Commented out because:
# "version is incompatible with state=latest"
state: '{{ (pulpcore_update == true) | ternary("latest", "present") }}'
# But we still need to handle upgrading dependencies.
Copy link
Member

Choose a reason for hiding this comment

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

I'm willing to bet that the dependencies will be upgraded if state=latest.

Copy link
Member

Choose a reason for hiding this comment

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

This comment needs to be rephrased and moved above the line it talks about (state), assuming dependencies will be upgraded.

@dkliban dkliban force-pushed the pulpcore-minor-release branch 3 times, most recently from e884ffd to ef3990c Compare September 15, 2021 17:43
Copy link
Member

@mikedep333 mikedep333 left a comment

Choose a reason for hiding this comment

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

Thank you!

roles/pulp_common/README.md Outdated Show resolved Hide resolved
@dkliban dkliban force-pushed the pulpcore-minor-release branch 4 times, most recently from 8327acd to 480746e Compare September 21, 2021 21:07
Copy link
Member

@mikedep333 mikedep333 left a comment

Choose a reason for hiding this comment

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

One more change: fix indentation in converge.yml

(github was acting buggy so I couldn't comment)

CHANGES/8847.feature Show resolved Hide resolved
@mikedep333
Copy link
Member

Also, update the developer docs with a note that this particular molecule scenario is different.

@dkliban dkliban force-pushed the pulpcore-minor-release branch 2 times, most recently from 0827edd to f570157 Compare September 22, 2021 18:31
Copy link
Member

@mikedep333 mikedep333 left a comment

Choose a reason for hiding this comment

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

  1. We need an entire new section under Recommended Workflows for Pulpcore & Plugin Versioning.

One named like "latest version on minor release branches".

It will be for both pulpcore and the plugins.

  1. Upgrading your installation: will need pulpcore_update

  2. Can we use a plugin's upgrade: true without specifying a plugin's branch? Will it install the very latest?

  3. Specifying Exact Versions with Reproducibility: definitely needs a micro release.

docs/customizing.md Outdated Show resolved Hide resolved
docs/customizing.md Show resolved Hide resolved
@dkliban dkliban force-pushed the pulpcore-minor-release branch 2 times, most recently from 9c98da0 to 48b8f66 Compare September 30, 2021 18:30

Upgrading your installation:

1. Use the latest patch version of `pulp_installer` that corresponds to , and what version of pulpcore it installs.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe clarify in terms of `3.y.z?

@@ -66,6 +66,7 @@ In the following example, a multitude of variables are set:

```
vars:
pulpcore_upgrade: true
Copy link
Member

Choose a reason for hiding this comment

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

pulpcore_update, not pulpcore_upgrade

@@ -86,6 +87,8 @@ In the following example, a multitude of variables are set:
default_file_storage: 'storages.backends.azure_storage.AzureStorage'
```

`pulpcore_upgrade` is set to `true` which means that if pulpcore 3.16 is already installed, it will be upgraded to the latest patch release 3.16.z.
Copy link
Member

Choose a reason for hiding this comment

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

pulpcore_update, not pulpcore_upgrade

Upgrading your installation:

1. Use the latest patch version of `pulp_installer` that corresponds to , and what version of pulpcore it installs.
1. Confirm that all the latest stable releases of all **currently installed** plugins are compatible
Copy link
Member

Choose a reason for hiding this comment

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

No, not the latest stable release, the latest on the previously used branch.

They also should generally stick with the same branch that they used before.

Comment on lines 214 to 215
1. If they are not all compatible yet, **wait** for the plugins to be updated for
compatibility.
Copy link
Member

Choose a reason for hiding this comment

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

There's no need to wait. There's no need to check honestly. The plugins are being updated witthin a minor release, not upgraded to a new minor release.

Comment on lines 202 to 205
pulp_install_plugins:
pulp-container: {}
pulp-file: {}
pulp-rpm: {}
Copy link
Member

Choose a reason for hiding this comment

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

How about they specify the branch during initial install?

So that they can more easily update in the future. Updating in the future would just involve adding the "update: true".

docs/customizing.md Show resolved Hide resolved
compatibility.
1. Upgrade `pulp_installer` to the latest version.
1. Set `pulpcore_update` to `true`. This will upgrade your `pulpcore` package to the latest minor release.
1. Set `pulp_install_plugins` with each plugin listed as a key, and with each plugin having a key under it called `upgrade` set to the value `true`.
Copy link
Member

Choose a reason for hiding this comment

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

In addition to the version set to the value (as previously set.)

* `pulpcore_version`: Specify a specific version of pulpcore one would like to install or upgrade to.
By default the installer will do the right thing by using the version of pulpcore it is designed
for and tested with. It is strongly advised against setting.
* `pulpcore_version`: Specify a minor version of pulpcore (e.g.: 3.15) one would like to install or upgrade to.
Copy link
Member

Choose a reason for hiding this comment

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

backticks around the version strings?

# pulp_upgrade true/false -> ansible pip module latest/present ->
# pip command "install --upgrade"/"install"
# Commented out because:
# "version is incompatible with state=latest"
state: '{{ (pulpcore_update == true) | ternary("latest", "present") }}'
# But we still need to handle upgrading dependencies.
Copy link
Member

Choose a reason for hiding this comment

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

This comment needs to be rephrased and moved above the line it talks about (state), assuming dependencies will be upgraded.

Copy link
Member

@mikedep333 mikedep333 left a comment

Choose a reason for hiding this comment

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

We still have some more docs changes to make.

We can do a meeting if you'd like.

Comment on lines 123 to 124
1. The `release-upgrade` scenario uses its own `converge.yml` playbook instead of the default one
used by all other scenarios.
Copy link
Member

Choose a reason for hiding this comment

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

This isn't so unique. What is unique is that the playbook does something extremely different. It runs repeated upgrades in one play.

`pulpcore_version` now defaults to a specific minor release of pulpcore (e.g.: 3.15)
which the installer is going to install.

When the installer is run for the first time, the latest patch release of pulpcore
(e.g.: 3.15.2) is installed. If the installer is run again with the same value of
`pulpcore_version`, the pulpcore package is not updated. In order to update to the
latest patch release within a minor stream, the user must set `pulpcore_update` to
true.

If the user sets the `pulpcore_version` to a different minor release of pulpcore
(e.g.: 3.16), the installer will attempt to upgrade pulpcore to the latest patch
release (e.g.: 3.16.1) for that minor release of pulpcore.

If the user sets the `pulpcore_version` to a specific patch release, the installer
will attempt to install that specific release of pulpcore.

If the installed plugins are not compatible with the requested release of pulpcore,
the installer will not make any changes.

The `version` of a plugin can now also be specified as a minor release (e.g.: 1.8) or
a specific patch release (e.g.: 1.8.2). When the a minor release is specified and it
is the same as the installed version of the plugin, the `upgrade` parameter for that
plugin must be set to `true` in order for the plugin to be updated to the latest
patch release.

The internal variable `__pulp_version` was renamed to `__pulpcore_version`.

The release-static test scenario for molecule was also updated to test this feature.

fixes: #8847
https://pulp.plan.io/issues/8847
@dkliban dkliban merged commit 63c5552 into pulp:master Oct 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants