Comments (6)
+1 to this
Missing update-status, and upgrade-charm hooks leave me with reactive charms that don't respond properly when decorating with @hook() decorators, as the hook exits 0 - never reaching the proper hook context in the reactive methods.
from layer-basic.
I'm a little bit hesitant about including update-status
by default, because would trigger any matching handler every time the hook was invoked, every 5 minutes. While this should be fine if the charms are coded well and are properly idempotent and properly gate behavior behind "if changed" clauses, it could still lead to more actions being taken on update-status
than might be expected.
In some cases, this could actually be useful behavior, though, since sometimes it can be difficult to get a service to retry a hook that resulted in "blocked" status, but I wonder if it might not be worth gating it behind some sort of layer option?
from layer-basic.
Would it be possible for charm build to sniff all @hook decorators and add
hooks that are in a whitelist that wouldn't be added by default?
On Mon, Nov 16, 2015 at 3:41 PM Cory Johns [email protected] wrote:
I'm a little bit hesitant about including update-status by default,
because would trigger any matching handler every time the hook was invoked,
every 5 minutes. While this should be fine if the charms are coded well and
are properly idempotent and properly gate behavior behind "if changed"
clauses, it could still lead to more actions being taken on update-status
than might be expected.In some cases, this could actually be useful behavior, though, since
sometimes it can be difficult to get a service to retry a hook that
resulted in "blocked" status, but I wonder if it might not be worth gating
it behind some sort of layer option?—
Reply to this email directly or view it on GitHub
#4 (comment)
.
from layer-basic.
Not really, because of the external / non-python handlers; it's not really possible to introspect them.
I should perhaps clarify that I'm not entirely adverse to including update-status
by default, but we would just need to make sure we call it out as a consideration in the docs.
from layer-basic.
from layer-basic.
These are all available now.
from layer-basic.
Related Issues (20)
- "charm build" broken by update to netaddr HOT 1
- Upgrades to focal with python3-setuptools-scm install break charm venv setup HOT 1
- Charm Dependency Checks during install hook fail when pip3 has git revision package HOT 4
- ImportError: cannot import name 'PackageFinder' from 'pip._internal.index' HOT 1
- Upgrade flag file created too early
- Disabling trace logs HOT 8
- Cannot uninstall PyYAML. It is a distutils installed project HOT 5
- layer-basic fails to install wheelhouse on hirsute due to pip 21 dependency resolution HOT 2
- OSM: Installing a proxy charm container fails, due to Python dependency issue HOT 3
- During Gnocchi charm upgrade, layer-basic failed to upgrade packages HOT 1
- Bootstrap fails with current pinset HOT 2
- [CIS L1] tmpfs hardening HOT 3
- How to include from pypi HOT 3
- Charm cannot build-on 20.04 because of No module named 'markupsafe' HOT 3
- Focal issues: "ModuleNotFoundError: No module named 'markupsafe'" and "AttributeError: type object 'Distribution' has no attribute '_finalize_feature_opts'" HOT 3
- python3-dev dependency issue
- New installs from master charm branch builds missing flit_scm wheel and need anyio pinning
- ModuleNotFoundError: No module named 'pkg_resources' after series upgrade to jammy HOT 7
- sniffio breakage on Focal with python 3.8.10 HOT 12
- Charms fail install hook if `python3-setuptools > 60` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from layer-basic.