Skip to content

make constant loading dynamic #81947

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

Draft
wants to merge 8 commits into
base: devel
Choose a base branch
from
Draft

Conversation

bcoca
Copy link
Member

@bcoca bcoca commented Oct 10, 2023

Don't load a configuration unless we need it.

Config deprecations/warnings less noisy as they will only trigger for config sources if setting is consumed

ISSUE TYPE
  • Feature Pull Request

@ansibot ansibot added feature This issue/PR relates to a feature request. needs_triage Needs a first human triage before being processed. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Oct 10, 2023
@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Oct 11, 2023
@ansible ansible deleted a comment from ansibot Oct 13, 2023
@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Oct 13, 2023
@sivel sivel removed the needs_triage Needs a first human triage before being processed. label Oct 17, 2023
@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Oct 18, 2023
@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Oct 19, 2023
@webknjaz
Copy link
Member

This somehow makes the fork_safe_stdio integration test fail.

@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Oct 31, 2023
@bcoca
Copy link
Member Author

bcoca commented Oct 31, 2023

This somehow makes the fork_safe_stdio integration test fail.

Well, since this can dynamically create a constant post fork, it is a trade off between generating all constants up front even when we don't need most and recreating a constant we use a lot but only post fork. These constants are basically module level variables we inject. I can see how that can create issues, specially since display uses the config system.

@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Oct 31, 2023
@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Nov 1, 2023
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Nov 15, 2023
@ansibot ansibot added the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Jul 2, 2024
@ansibot ansibot removed the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Nov 7, 2024
@ansibot ansibot removed ci_verified Changes made in this PR are causing tests to fail. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Nov 7, 2024
@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Nov 8, 2024
@ansible ansible deleted a comment from ansibot Nov 8, 2024
@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Nov 8, 2024
@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Nov 12, 2024
@webknjaz
Copy link
Member

fork_safe_stdio is failing. Is this making the playbook runs slower than the test expects?

@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Nov 14, 2024
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Nov 28, 2024
@bcoca
Copy link
Member Author

bcoca commented Nov 29, 2024

@webknjaz possibly, in my tests the startup is faster, since it only loads what it needs, but if you end up needing most settings it is slower in the end, why i added a forced dump method for ansible-config which is basically how it works before the patch. I'll check the stdin test to see what is going on.

@ansibot ansibot removed ci_verified Changes made in this PR are causing tests to fail. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Dec 2, 2024
@webknjaz
Copy link
Member

/azp run

Copy link

Pipelines were unable to run due to time out waiting for the pull request to finish merging.

@webknjaz
Copy link
Member

/azp run

@webknjaz webknjaz removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Jan 21, 2025
Copy link

Pipelines were unable to run due to time out waiting for the pull request to finish merging.

@webknjaz
Copy link
Member

@bcoca another unimportant_ci candidate?

@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Jan 23, 2025
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Feb 4, 2025
bcoca and others added 8 commits February 4, 2025 14:47
now constants get populated 'on demand' and cached once set
We do need to ensure we initalize deps (constants use in templating for other constants)
deprecations for setting sources only appear when settings is used
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
@ansibot ansibot removed ci_verified Changes made in this PR are causing tests to fail. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Feb 4, 2025
@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Feb 5, 2025
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Feb 19, 2025
@ansibot ansibot added the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci_verified Changes made in this PR are causing tests to fail. feature This issue/PR relates to a feature request. needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants