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

[Bug] Fix bug in version_lock.py #1880

Merged
merged 1 commit into from
Mar 24, 2022

Conversation

brokensound77
Copy link
Contributor

Issues

None

Summary

Noticed this didn't cause an expected failure when reviewing another PR, and found a small bug where the wrong lock was referenced

@brokensound77 brokensound77 added the bug Something isn't working label Mar 24, 2022
@botelastic botelastic bot added the python Internal python for the repository label Mar 24, 2022
name = current_rule_lock['rule_name']
existing_type = current_rule_lock['type']
existing_type = existing_rule_lock['type']
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was referencing the new lock info rather than the existing (lock file) lock info as expected

@@ -70,8 +70,8 @@ def manage_versions(self, rules: RuleCollection,
"""Update the contents of the version.lock file and optionally save changes."""
from .packaging import current_stack_version

current_version_lock = deepcopy(self.version_lock)
version_lock_hash = dict_hash(current_version_lock)
lock_file_contents = deepcopy(self.version_lock)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this refactor is just for more clarity in the code

Copy link
Contributor

@terrancedejesus terrancedejesus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. LGTM

@brokensound77 brokensound77 merged commit 17ef6c5 into elastic:main Mar 24, 2022
protectionsmachine pushed a commit that referenced this pull request Mar 24, 2022
protectionsmachine pushed a commit that referenced this pull request Mar 24, 2022
protectionsmachine pushed a commit that referenced this pull request Mar 24, 2022
protectionsmachine pushed a commit that referenced this pull request Mar 24, 2022
protectionsmachine pushed a commit that referenced this pull request Mar 24, 2022
protectionsmachine pushed a commit that referenced this pull request Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport: auto bug Something isn't working python Internal python for the repository v8.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants