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

enable agent install of dependency modules by default #7026

Closed
2 tasks done
sanderr opened this issue Jan 23, 2024 · 1 comment
Closed
2 tasks done

enable agent install of dependency modules by default #7026

sanderr opened this issue Jan 23, 2024 · 1 comment
Assignees

Comments

@sanderr
Copy link
Contributor

sanderr commented Jan 23, 2024

The agent_install_dependency_modules project option has to be set in all practical models. Therefore it would make sense to phase it out and enable its behavior by default. This requires a few extra steps to make it safe:

  • add documentation about inter-module dependencies: you can use them (no option required) but the module you depend on should not have any resources (technically it can iff they are always there but that's more difficult to explain so only mention that if the solutions team sees a use case for it). Otherwise you could get the following timeline:
  1. a depends on b
  2. exporter exports a-1.0 and b-1.0, both of which have resources for this agent. Agent puts code in its code directory.
  3. exporter exports a-1.0 and b-2.0, b no longer has resources for this agent. Agent puts code for a, not b in its code directory but the old code for b is still there.
  4. agent is restarted (also triggers without restart but unlike other code loading issues a restart doesn't solve it here): agent's module finder points to its code directory -> stale version of b-1.0 is loaded instead of b-2.0 installed by pip in the venv.
  • on the agent, before loading the code, detect the above scenario and add a warning log message and notification for it.

All of this is iso7+?

@wouterdb
Copy link
Contributor

wouterdb commented Feb 6, 2024

Hey team! Please add your planning poker estimate with Zenhub @arnaudsjs @FloLey @Hugo-Inmanta @sanderr

@arnaudsjs arnaudsjs self-assigned this Feb 22, 2024
inmantaci pushed a commit that referenced this issue Mar 5, 2024
…dules`. The installation of module dependencies is now always enabled. (Issue #7026, PR #7285)

# Description

This PR enables the project configuration option `agent_install_dependency_modules` by default.

closes #7026

# Self Check:

- [x] Attached issue to pull request
- [x] Changelog entry
- [x] Type annotations are present
- [x] Code is clear and sufficiently documented
- [x] No (preventable) type errors (check using make mypy or make mypy-diff)
- [x] Sufficient test cases (reproduces the bug/tests the requested feature)
- [x] Correct, in line with design
- [x] End user documentation is included or an issue is created for end-user documentation (add ref to issue here: )
- [ ] ~~If this PR fixes a race condition in the test suite, also push the fix to the relevant stable branche(s) (see [test-fixes](https://internal.inmanta.com/development/core/tasks/build-master.html#test-fixes) for more info)~~
inmantaci pushed a commit that referenced this issue Mar 5, 2024
…dules`. The installation of module dependencies is now always enabled. (Issue #7026, PR #7285)

Pull request opened by the merge tool on behalf of #7285
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 a pull request may close this issue.

3 participants