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

[feature request] Add a description field for the provisioners #269

Open
mathieu-benoit opened this issue Mar 2, 2025 · 4 comments · May be fixed by #273
Open

[feature request] Add a description field for the provisioners #269

mathieu-benoit opened this issue Mar 2, 2025 · 4 comments · May be fixed by #273
Assignees
Labels
enhancement New feature or request go Pull requests that update Go code good first issue Good for newcomers help wanted Extra attention is needed

Comments

@mathieu-benoit
Copy link
Contributor

mathieu-benoit commented Mar 2, 2025

To improve how PEs document their provisioners and expose them to their Devs, it would be better to have a description field in the provisioners files.

Today, if we add this field in the provisioners files, we get this error:

Error: failed to save provisioner 1: invalid provisioners file: 0: cmd://python3#dotenv: failed to parse: yaml: unmarshal errors:
  line 9: field description not found in type cmdprov.Provisioner

Rough list of things to do to implement this:

  • Support this field in the cmdprov.Provisioner and templateprov.Provisioner and other places where needed
  • Update all the current default provisioners with their description
  • Update score-compose provisioners list to display by default this new description field

This field should be optional, to avoid any breaking changes with existing/current provisioners.

Note: here is an example of how this could be used: score-spec/community-provisioners#8

@mathieu-benoit mathieu-benoit added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed go Pull requests that update Go code labels Mar 2, 2025
@lekaf974
Copy link
Contributor

lekaf974 commented Mar 6, 2025

@mathieu-benoit I can give this one a try too

@mathieu-benoit
Copy link
Contributor Author

@mathieu-benoit I can give this one a try too

Oh yes! Please go ahead, and thanks! Much appreciated!

@lekaf974
Copy link
Contributor

lekaf974 commented Mar 6, 2025

did a quick iteration before making thing cleaner

+---------------+-------+------------------+--------------------------------+--------------------------------+
|     TYPE      | CLASS |      PARAMS      |            OUTPUTS             |          DESCRIPTION           |
+---------------+-------+------------------+--------------------------------+--------------------------------+
| amqp          | (any) |                  | host, password, port,          |                                |
|               |       |                  | username, vhost                |                                |
+---------------+-------+------------------+--------------------------------+--------------------------------+
| dns           | (any) |                  | host                           | This provisioner is a          |
|               |       |                  |                                | placeholder for future DNS     |
|               |       |                  |                                | control                        |
+---------------+-------+------------------+--------------------------------+--------------------------------+
| elasticsearch | (any) |                  | host, password, port, username |                                |
+---------------+-------+------------------+--------------------------------+--------------------------------+
| kafka-topic   | (any) |                  | host, name, num_partitions,    |                                |
|               |       |                  | port                           |                                |
+---------------+-------+------------------+--------------------------------+--------------------------------+
| mongodb       | (any) |                  | connection, host, password,    |                                |
|               |       |                  | port, username                 |                                |
+---------------+-------+------------------+--------------------------------+--------------------------------+
| mssql         | (any) |                  | connection, database,          |                                |
|               |       |                  | password, port, server,        |                                |
|               |       |                  | username                       |                                |
+---------------+-------+------------------+--------------------------------+--------------------------------+
| mysql         | (any) |                  | database, host, name,          |                                |
|               |       |                  | password, port, username       |                                |
+---------------+-------+------------------+--------------------------------+--------------------------------+
| postgres      | (any) |                  | database, host, name,          |                                |
|               |       |                  | password, port, username       |                                |
+---------------+-------+------------------+--------------------------------+--------------------------------+
| redis         | (any) |                  | host, password, port, username |                                |
+---------------+-------+------------------+--------------------------------+--------------------------------+
| route         | (any) | host, path, port |                                |                                |
+---------------+-------+------------------+--------------------------------+--------------------------------+
| s3            | (any) |                  | access_key_id,                 |                                |
|               |       |                  | aws_access_key_id,             |                                |
|               |       |                  | aws_secret_key, bucket,        |                                |
|               |       |                  | endpoint, region, secret_key   |                                |
+---------------+-------+------------------+--------------------------------+--------------------------------+
| service-port  | (any) | port, workload   | hostname, port                 |                                |
+---------------+-------+------------------+--------------------------------+--------------------------------+
| volume        | (any) |                  | source, type                   | The default volume provisioner |
|               |       |                  |                                | creates a volume resource that |
|               |       |                  |                                | can be used by other resources |
|               |       |                  |                                | in the project. This volume is |
|               |       |                  |                                | ephemeral and will be deleted  |
|               |       |                  |                                | when the project is removed.   |
|               |       |                  |                                | The volume is created with     |
|               |       |                  |                                | a random name and a label      |
|               |       |                  |                                | that can be used to track the  |
|               |       |                  |                                | volume back to the resource    |
|               |       |                  |                                | that created it.               |
+---------------+-------+------------------+--------------------------------+--------------------------------+

@lekaf974 lekaf974 linked a pull request Mar 7, 2025 that will close this issue
9 tasks
@lekaf974
Copy link
Contributor

lekaf974 commented Mar 7, 2025

Json output

[
  {
    "Type": "service-port",
    "Class": "(any)",
    "Params": [
      "port",
      "workload"
    ],
    "Outputs": [
      "hostname",
      "port"
    ],
    "Description": "This expects a workload and port name and will return the hostname and port required to contact it"
  },
  {
    "Type": "volume",
    "Class": "(any)",
    "Params": [],
    "Outputs": [
      "source",
      "type"
    ],
    "Description": "Creates a volume resource that can be used by other resources in the project\n"
  }
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request go Pull requests that update Go code good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants