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

Adopt molecule config JSON schema #3668

Merged
merged 1 commit into from
Sep 24, 2022
Merged

Conversation

ssbarnea
Copy link
Member

@ssbarnea ssbarnea commented Sep 24, 2022

We move official location for Molecule Config JSON Schema inside molecule project itself. This will be followed by updates on JSON Schema Store and on vscode-ansible extension, and removal from ansible/schemas project. We already did the same with navigator and lint project, as it makes the maintenance easier.

@ssbarnea ssbarnea requested review from a team as code owners September 24, 2022 09:56
@ssbarnea ssbarnea requested review from jseguillon, zhan9san, cidrblock, priyamsahoo and shatakshiiii and removed request for a team September 24, 2022 09:56
@ssbarnea ssbarnea force-pushed the feat/schema branch 3 times, most recently from 5801fa7 to aa0fe7f Compare September 24, 2022 13:07
We move official location for Molecule Config JSON Schema inside
molecule project itself. This will be followed by updates on
JSON Schema Store and on vscode-ansible extension, and removal
from ansible/schemas project. We already did the same with navigator
and lint project, as it makes the maintenance easier.
@ssbarnea ssbarnea merged commit acb9ae0 into ansible:main Sep 24, 2022
@ssbarnea ssbarnea deleted the feat/schema branch September 24, 2022 13:32
ssbarnea added a commit to ssbarnea/vscode-ansible that referenced this pull request Sep 24, 2022
ssbarnea added a commit to ansible/vscode-ansible that referenced this pull request Sep 24, 2022
Comment on lines +461 to +492
"VerifierModel": {
"additionalProperties": false,
"properties": {
"additional_files_or_dirs": {
"items": {
"type": "string"
},
"title": "AdditionalFilesOrDirs",
"type": "array"
},
"enabled": {
"title": "Enabled",
"type": "boolean"
},
"env": {
"title": "Env",
"type": "object"
},
"name": {
"default": "ansible",
"enum": ["ansible", "goss", "inspec", "testinfra"],
"title": "Name",
"type": "string"
},
"options": {
"title": "Options",
"type": "object"
}
},
"title": "VerifierModel",
"type": "object"
},
Copy link
Contributor

Choose a reason for hiding this comment

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

The VerifierModel lacks the directory property, as noted in #3667. The last I looked, there was still code to process it, and it still appeared in documentation, so my assumption was the removal was an accident in the PR and it did not get caught in review.

Was this supposed to be removed? If so, could someone point me to the discussion about it and reasoning? It broke testinfra verification and I had to add it back on a fork to get unblocked. That would seem to indicate there is also a lack of tests to catch the regression. Could someone look into that? Thanks!

davedittrich pushed a commit to davedittrich/molecule that referenced this pull request Sep 24, 2022
We move official location for Molecule Config JSON Schema inside
molecule project itself. This will be followed by updates on
JSON Schema Store and on vscode-ansible extension, and removal
from ansible/schemas project. We already did the same with navigator
and lint project, as it makes the maintenance easier.
apatard added a commit to apatard/molecule that referenced this pull request Sep 26, 2022
Commit "Adopt molecule config JSON schema (ansible#3668)" (acb9ae0)
has imported the molecule schema into data/ but everything is using
src/molecule/schemas/ as directory for the schema.

So:
- Replace src/molecule/schemas/molecule.json content with the one
  from src/molecule/data/. The replacement was partial as the local
  schema handles in a better way the MoleculeDependencyModel. The
  new schema was allowing to use the "shell" dependency with an
  empty command.
- Update schema $id to point to the correct location
- Fix test link to point to the correct schema file.

Signed-off-by: Arnaud Patard <apatard@hupstream.com>
@apatard apatard mentioned this pull request Sep 26, 2022
apatard added a commit to apatard/molecule that referenced this pull request Sep 27, 2022
Commit "Adopt molecule config JSON schema (ansible#3668)" (acb9ae0)
has imported the molecule schema into data/ but everything is using
src/molecule/schemas/ as directory for the schema.

So:
- Update src/molecule/data/molecule.json with parts of
  src/molecule/schemas/molecule.json content with the one. The update/
  replacement was partial as the local schema handles in a better way
  the MoleculeDependencyModel. The new schema was allowing to use the
  "shell" dependency with an empty command.
- Update schema $id to point to the correct location
- Fix test link to point to the correct schema file.
- Fix path to the schema in schema_v3.py

Signed-off-by: Arnaud Patard <apatard@hupstream.com>
ssbarnea pushed a commit that referenced this pull request Sep 30, 2022
* Fix import of molecule schema.

Commit "Adopt molecule config JSON schema (#3668)" (acb9ae0)
has imported the molecule schema into data/ but everything is using
src/molecule/schemas/ as directory for the schema.

So:
- Update src/molecule/data/molecule.json with parts of
  src/molecule/schemas/molecule.json content with the one. The update/
  replacement was partial as the local schema handles in a better way
  the MoleculeDependencyModel. The new schema was allowing to use the
  "shell" dependency with an empty command.
- Update schema $id to point to the correct location
- Fix test link to point to the correct schema file.
- Fix path to the schema in schema_v3.py

Signed-off-by: Arnaud Patard <apatard@hupstream.com>

* rc/molecule/test/unit/model/v2/test_dependency_section.py: Fix checks

With the new schema file, the schema check doesn't return the same
error strings, so update them.

Signed-off-by: Arnaud Patard <apatard@hupstream.com>

Signed-off-by: Arnaud Patard <apatard@hupstream.com>
davedittrich pushed a commit to davedittrich/molecule that referenced this pull request Oct 24, 2022
* Fix import of molecule schema.

Commit "Adopt molecule config JSON schema (ansible#3668)" (acb9ae0)
has imported the molecule schema into data/ but everything is using
src/molecule/schemas/ as directory for the schema.

So:
- Update src/molecule/data/molecule.json with parts of
  src/molecule/schemas/molecule.json content with the one. The update/
  replacement was partial as the local schema handles in a better way
  the MoleculeDependencyModel. The new schema was allowing to use the
  "shell" dependency with an empty command.
- Update schema $id to point to the correct location
- Fix test link to point to the correct schema file.
- Fix path to the schema in schema_v3.py

Signed-off-by: Arnaud Patard <apatard@hupstream.com>

* rc/molecule/test/unit/model/v2/test_dependency_section.py: Fix checks

With the new schema file, the schema check doesn't return the same
error strings, so update them.

Signed-off-by: Arnaud Patard <apatard@hupstream.com>

Signed-off-by: Arnaud Patard <apatard@hupstream.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants