Pending opened ports aren't returned by opened-ports in same hook
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
Medium
|
Nicolas Vinuesa |
Bug Description
While testing the new open_ports API in Python Operator Framework (https:/
This is inconsistent with how other pending objects are returned, for example pending secrets are visible to get-secret.
It makes writing charms slightly more annoying as whenever you call opened_ports() you have to think "did I just open ports in this hook? If so, merge the opened_ports() return value with what I might have just opened".
Here are some logs from a test charm showing the issue: open-port ran successfully 4 times (opening three unique ports), but then opened_ports() returned an empty set:
unit-database-0: 16:33:34 INFO unit.database/
unit-database-0: 16:33:34 INFO unit.database/
unit-database-0: 16:33:34 INFO unit.database/
unit-database-0: 16:33:34 INFO unit.database/
unit-database-0: 16:33:34 INFO unit.database/
unit-database-0: 16:33:34 INFO unit.database/
unit-database-0: 16:33:34 INFO unit.database/
description: | updated |
tags: | added: hook |
Changed in juju: | |
importance: | Undecided → Medium |
milestone: | none → 3.1.2 |
status: | New → Triaged |
assignee: | nobody → Nicolas Vinuesa (nvinuesa) |
Changed in juju: | |
status: | Triaged → In Progress |
Changed in juju: | |
milestone: | 3.1.2 → 3.1.1 |
Changed in juju: | |
milestone: | 3.1.1 → 3.1.2 |
Changed in juju: | |
status: | Fix Committed → Fix Released |
https:/ /github. com/juju/ juju/pull/ 15246