User story #2459
closedrudder-techniques needs a script which validate that the repository is clean
Description
We need a bundle of tests which contains:
- branch 2.3
- Check no 'techniques' folder exists
- Check no 'metadata.xml' exists
- Use a tool for validating XML on policies
- branch 2.4 / 2.5
- Check no 'policies' folder exists
- Check no 'policy.xml' exists
- Use a tool for validating XML on techniques
Updated by Nicolas PERRON over 12 years ago
- Status changed from New to Pending technical review
- % Done changed from 0 to 100
Applied in changeset commit:b96bbb51845f9f4cb5ff287da1d404ae342e7144.
Updated by Jonathan CLARKE over 12 years ago
- Status changed from Pending technical review to Discussion
- % Done changed from 100 to 70
This is a good start. However, a few things bother me:
- Why is this file in the tools directory? In case you're not aware, the tools directory is the directory that is copied to all nodes managed by a Rudder instance. It is likely to become obsolete, but is still used currently. But this script has no reason to be in there, it is not needed on nodes.
- On branch 2.3, your third check (using xval.pl) doesn't seem to be implemented correctly. You capture the output a find command and many xval.pl commands, and then compare a different variable with the value 0. This cannot work the way you wanted, or there are a lot of comments missing to explain why it does :)
- On branch 2.3, your first find check searches for a "techniques" directory anywhere in the repo. It would be more exact, and less resource-intensive to only search for it in the root, ie:
find ${REPOSITORY_PATH} -maxdepth 1 -type d -name "techniques"
Updated by Nicolas PERRON over 12 years ago
Jonathan CLARKE wrote:
This is a good start. However, a few things bother me:
- Why is this file in the tools directory? In case you're not aware, the tools directory is the directory that is copied to all nodes managed by a Rudder instance. It is likely to become obsolete, but is still used currently. But this script has no reason to be in there, it is not needed on nodes.
I thought "tools" was the more relevent name for this script but i didn't think about the fact that this folder is copied to all nodes ! Maybe this script need to be at repository's root ?
- On branch 2.3, your third check (using xval.pl) doesn't seem to be implemented correctly. You capture the output a find command and many xval.pl commands, and then compare a different variable with the value 0. This cannot work the way you wanted, or there are a lot of comments missing to explain why it does :)
You're right, this part of the script doesn't work the way I wanted. It still need a correction about this.
- On branch 2.3, your first find check searches for a "techniques" directory anywhere in the repo. It would be more exact, and less resource-intensive to only search for it in the root, ie: [...]
You're right here too, it doesn't to check "techniques" folder everywhere, root of the repository is sufficient.
Updated by Nicolas PERRON over 12 years ago
Nicolas PERRON wrote:
Jonathan CLARKE wrote:
This is a good start. However, a few things bother me:
- Why is this file in the tools directory? In case you're not aware, the tools directory is the directory that is copied to all nodes managed by a Rudder instance. It is likely to become obsolete, but is still used currently. But this script has no reason to be in there, it is not needed on nodes.
I thought "tools" was the more relevent name for this script but i didn't think about the fact that this folder is copied to all nodes ! Maybe this script need to be at repository's root ?
Finally, "scripts" folder will be a more suitable location as we could add more scripts in the future.
Updated by Nicolas PERRON over 12 years ago
- Status changed from Discussion to Pending technical review
- % Done changed from 70 to 100
Updated by Jonathan CLARKE over 12 years ago
- Status changed from Pending technical review to 10
This looks good to me now, thanks for updating it Nicolas.
Updated by Nicolas PERRON almost 12 years ago
- Project changed from Rudder to 34
- Category deleted (
11)
Updated by Benoît PECCATTE over 9 years ago
- Project changed from 34 to Rudder
- Category set to Packaging