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

Add script to audit and generate missing service configurations #644

Merged
merged 1 commit into from Sep 29, 2021

Conversation

brendanhay
Copy link
Owner

Adds simplistic audit functionality from generate.nix that was removed in #639. Additionally, it now writes example skeleton configurations and annexes to the output directory specified by the singular script argument.

Example:

% generate-configs tmp
...
Missing wafv2
Missing wellarchitected
Missing wisdom
Missing worklink
Missing workmailmessageflow
Missing 141 service configurations.
Wrote examples to tmp/configs and tmp/annexes.
Found 281 models in /nix/store/bvn31qxjpffkaa5misrb8y0kxphhy0gw-source/botocore/data.
Found 140 service configurations in config/services.
Done.

The reason for also generating an empty annex file is illustrated by testing with the currently unsupported textract service (#509) - it requires metadata.serviceAbbreviation to be specified since it's missing from the definition and this is used to infer the root module namespace. At some point in the future I'll get around to merging the configurations to remove the need for annex at all.

Adds the rest of the previous generate.nix functionality removed by #639
@@ -0,0 +1,67 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash ../shell.nix
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is nix-shell smart enough to resolve this relative to the script, and not to the working directory?

Copy link
Owner Author

Choose a reason for hiding this comment

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

It resolves relative to the script location - testing that out did reveal that cabal needs to be added to the buildInputs, though.

scripts/generate-configs Show resolved Hide resolved
@brendanhay brendanhay merged commit 5f40195 into develop Sep 29, 2021
@brendanhay brendanhay deleted the bh/generate-configs branch September 29, 2021 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants