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

Fixes #3967 : Improve change request merge check: #326

Conversation

VinceMacBuche
Copy link
Member

Ldap datas are transformed in XML, then checked, before being
unserialised to their types

http://www.rudder-project.org/redmine/issues/3967

@VinceMacBuche
Copy link
Member Author

I started by refactoring all the logic in one method, so the logic is no more repeated, but I don't really like the result ...

@VinceMacBuche
Copy link
Member Author

François, if it's ok tell me so i can rebase it!

) extends Changes[Directive, ChangeRequestDirectiveDiff, DirectiveChangeItem] {
val changes = OnlyDirectiveChange(directivesChanges.changes)
val changeHistory = directivesChanges.changeHistory.map(OnlyDirectiveChange)
}
//////////////////// Node Part //////////////////////////////////////////////
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sur I can agree with that. If the change request needs Technique, Directive and SectionSpec, I don't wan't to limitate the comparison check to Directive. What happens if the sectionSpec changed ?

Copy link
Member Author

Choose a reason for hiding this comment

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

If the section spec has changed, it means that parameters of the Directive have changed and/or the Technique version has changed, so the unmergability will be found)

The Technique can't changed, (or only if LDAP/archive data has been checked so they don't need to be checked)

We only keep the root section and the technique to be able to display the value in the webapp, and are used to verify that parameters are well formed

for the merge, we were onoly compaiting directive, i wanted to restrict to the same level.

Copy link
Member

Choose a reason for hiding this comment

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

OK, so with some more explanation, I would like to have these two classes as internal, hidden tools of the CommitAndDeployChangeRequestServiceImpl class (or even of the methods actually using them).

Copy link
Member Author

Choose a reason for hiding this comment

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

I can't move them... Traits Change and Changes are sealed so we can't create them outside this file

Copy link
Member Author

Choose a reason for hiding this comment

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

We decided to use an Option instead of a Change, much easier too read and to use!

Ldap datas are transformed in XML, then checked, before being
unserialised to their types
fanf added a commit that referenced this pull request Oct 2, 2013
…lize_ldap_into_xmll

Fixes #3967 : Improve change request merge check:
@fanf fanf merged commit f8a6ed0 into Normation:branches/rudder/2.6 Oct 2, 2013
@VinceMacBuche VinceMacBuche deleted the bug_3967/serialize_deserialize_ldap_into_xmll branch March 3, 2015 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants