Firmware Deployment Issues with Cohorts and Deleted Versions

Description

Issue 1 – Incorrect Firmware Deployment Across Cohorts

I uploaded two firmware versions (0.1.1 and 0.0.4) to the same package.

I then created two cohorts: one for the old device (0.0.4) and one for the new device (0.1.1).

Using another device:
Issue 2 – Reverted and Deleted Firmware Versions

The platform reverted back to version 0.0.4, which had already been deleted.

It also deployed this deleted version (0.0.4) to a device, even though it should no longer exist in the Golioth repository.

Expected Behavior

Old cohort should receive 0.0.4

New cohort should receive 0.1.1

Actual Behavior

Old cohort received 0.0.4 correctly

New cohort (set to 0.1.1) was instead pushed 0.0.4

Impact

The device became unresponsive after the incorrect update and kept on performing OTA over and over again

Environment

Device - esp32c3
Platform - Golioth

Logs and Console Output

FInding it hard to upload the screenshot in the forum,
This is a link to the word file that contains the outputs on golioth: Sign in to your account

Additional Information

Questions

Why would a cohort set to 0.1.1 instead receive 0.0.4?

How is Golioth serving and deploying firmware versions that have been deleted from the package?

Is there a recommended workflow for managing multiple versions across cohorts without risk of conflicts?

Hey @adesuwa,

I’m trying to reproduce your scenario and would like you to share the exact workflow you followed to trigger the issue. I’m especially unclear on when exactly you deleted the Package version 0.0.4.

Here are the steps I’ve taken so far to try to reproduce:

  • Created two devices: esp-old and esp-new, both running fw_update sample version 0.0.0
  • Uploaded fw_update sample versioned 0.0.4 and 0.1.1 to the same package main
  • Created two Cohorts: new-0.1.1 and old-0.0.4
  • Added esp-old to Cohort old-0.0.4
  • Added esp-new to Cohort new-0.1.1
  • Started a deployment in Cohort old-0.0.4 for esp-old → Package version 0.0.4
  • Started a deployment in cohort new-0.1.1 for esp-new → Package version 0.1.1

Both devices downloaded the correct image, and the OTA update completed successfully.

Can you point out where your workflow differs from this one so I can accurately reproduce the issue you’re describing?