Skip to content
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

Add image core and app version constraint checks #667

Merged
merged 7 commits into from
Jul 12, 2024

Conversation

DavidePrincipi
Copy link
Member

Implement module image labels

  • org.nethserver.min-from
  • org.nethserver.min-core

See changes to modules.md.

Implementation summary:

  • core comparison for min-core check is based on the node version where the app is installed
  • update for a given app instance is compared with min-from label 1
  • Redis HASH cluster/module_node is authoritative to get the list of installed modules and cluster node IDs
  • list_installed_core() has been merged within list_core_modules()

Affected actions:

  • list-modules
  • list-installed-modules
  • list-core-modules
  • list-updates
  • update-modules
  • update-module
  • update-core

Fixed install-core.sh

Refs NethServer/dev#6956

Footnotes

  1. list_available() already returns in versions[0] the higher repository semver tag of the app

Added support for the following image labels:
- org.nethserver.min-core
- org.nethserver.min-from
Get the list of available core module updates from list_modules() to
enforce org.nethserver.min-core label requirement.
The image_url must be a good update for all instances passed as
parameter. As it is difficult to check if it is appropriate or not, or
to calculate an image_url that fits all instances (if not given), we
drop the automatic latest version lookup and we expect a good one is
passed.
- ui. Update a list of instances with update-modules.
- api. add filter parameters to update-modules, to restrict the update
  to certain instances and module types.

This action can now be used to replace update-module if an automatic
version selection is wanted.
The logic that defines the "latest" tag of a given module is implemented
inside the list_available() function. A new assumption simplifies the
function code.
- calculate core versions update for every cluster node, not only leader
- fix install-core.sh to initialize IMAGE_URL and related variables in
  node environment
Compare the app requirement min-core with the core version installed on
the app's node. Previously the leader version was used.
@DavidePrincipi DavidePrincipi requested a review from Tbaile July 12, 2024 13:02
@DavidePrincipi DavidePrincipi self-assigned this Jul 12, 2024
github-actions bot pushed a commit that referenced this pull request Jul 12, 2024
Copy link
Contributor

@Tbaile Tbaile left a comment

Choose a reason for hiding this comment

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

Looks much like what discussed today

@DavidePrincipi DavidePrincipi merged commit 7146446 into feat-sci Jul 12, 2024
3 checks passed
@DavidePrincipi DavidePrincipi deleted the feat-6956-3 branch July 12, 2024 15:11
@compgeniuses
Copy link

Wow, this will solve so many problem. looking forward to this in a future release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants