Project

General

Profile

Actions

User story #2459

closed

rudder-techniques needs a script which validate that the repository is clean

Added by Nicolas PERRON over 12 years ago. Updated over 9 years ago.

Status:
Released
Priority:
2
Assignee:
Nicolas PERRON
Category:
Packaging
Target version:
UX impact:
Suggestion strength:
User visibility:
Effort required:
Name check:
Fix check:
Regression:

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
Actions #1

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.

Actions #2

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:

  1. 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.
  2. 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 :)
  3. 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"
Actions #3

Updated by Nicolas PERRON over 12 years ago

Jonathan CLARKE wrote:

This is a good start. However, a few things bother me:

  1. 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 ?

  1. 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.

  1. 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.

Actions #4

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:

  1. 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.

Actions #5

Updated by Nicolas PERRON over 12 years ago

  • Status changed from Discussion to Pending technical review
  • % Done changed from 70 to 100
Actions #6

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.

Actions #7

Updated by Jonathan CLARKE over 12 years ago

  • Status changed from 10 to Released
Actions #8

Updated by Nicolas PERRON almost 12 years ago

  • Project changed from Rudder to 34
  • Category deleted (11)
Actions #9

Updated by Benoît PECCATTE over 9 years ago

  • Project changed from 34 to Rudder
  • Category set to Packaging
Actions

Also available in: Atom PDF