Update module labels updates as "Also available" even when there are no other possible updates

Created on 18 February 2020, over 4 years ago
Updated 4 April 2024, 7 months ago

Problem/Motivation

discovered in #3113292: Update module has no tests for changes to status of the installed release (revoked, etc) β†’
The update module uses the label "Also available" when there are updates to other majors than it considers its target major.

Case A

  1. site installed 8.x-1.0
  2. 8.x-1. is a supported branch
  3. 8.x-1.1 release is in the XML and is shown to the user
  4. 8.x-2.0 is available

8.x-1.1 will be shown as "Recommended", 8.x-2.0 will be shown as "Also available". This is correct.

Case B

  1. site installed 8.x-1.0
  2. 8.x-1. is a supported branch
  3. 8.x-1.1 release is in the XML but is either unsupported or unpublished so it is not shown to the user
  4. 8.x-2.0 is available

8.x-2.0 will be shown as "Also available" even though there are no other updates to show. This is incorrect.

Case C

  1. site installed 8.x-1.0
  2. 8.x-1. is NOT a supported branch
  3. 8.x-1.1 release is in the XML but not shown because it is in a unsupported branch
  4. 8.x-2.0 is available

In this case, 8.x-2.0 will be shown as "Recommended". This is correct.

Proposed resolution

Never show "also available" if another update is not being shown.

Remaining tasks

  1. Add fail test for this.
  2. Update other tests?
  3. Fix behavior.
  4. Watch the fail test start passing.
  5. Review.
  6. RTBC.
  7. Commit.

User interface changes

In cases where only 1 update is available, always call it "Recommended", not "Also available".
No string change since "Recommended" and friends already exists.
Doesn't really "change" the UI, it's just fixing a labeling bug and re-using the existing interface for "Recommended".

API changes

Probably none.

Data model changes

None.

Release notes snippet

TBD. Probably not worth it.

πŸ› Bug report
Status

Closed: works as designed

Version

11.0 πŸ”₯

Component
UpdateΒ  β†’

Last updated about 9 hours ago

  • Maintained by
  • πŸ‡ΊπŸ‡ΈUnited States @tedbow
  • πŸ‡ΊπŸ‡ΈUnited States @dww
Created by

πŸ‡ΊπŸ‡ΈUnited States tedbow Ithaca, NY, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States dww

    This came up as a random daily triage target in #bugsmash. I was summoned to review. πŸ˜‚

    Per #10:

    I starting to think that the current behavior is correct...

    As the original author of the current behavior, I heartily agree. πŸ˜… The 3 scenarios in the summary spell it out. The only time this happens is if you're on a version that's okay, there's nothing newer available to recommend on your series, and another series is available. In that case (B), "Also available" is the right thing to say. You can stay put (which is up to date on your current series), or you can jump to a new series (at your own risk). This is all working as expected. Closing as such.

    Thanks,
    -Derek

Production build 0.71.5 2024