Skip to content

Creates and adds script to travis#115

Merged
yaoandrew merged 1 commit intostagingfrom
vdb-1184-exporter-config-check
Feb 12, 2020
Merged

Creates and adds script to travis#115
yaoandrew merged 1 commit intostagingfrom
vdb-1184-exporter-config-check

Conversation

@yaoandrew
Copy link
Copy Markdown
Contributor

This PR should check the docker.toml file vs the transformerExporter.go file. Should we potentially pass the config file in via env var? Its a pretty basic check. Other enhancements could be checking the toml file for each transformerName listed that there is a corresponding exporter block.

@yaoandrew yaoandrew force-pushed the vdb-1184-exporter-config-check branch 7 times, most recently from dbd1945 to 229bb4a Compare February 11, 2020 20:26
Copy link
Copy Markdown
Contributor

@rmulhol rmulhol left a comment

Choose a reason for hiding this comment

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

Haven't run this myself but LGTM if it works!

Would potentially be cool to consider verifying the other config files as well, but I'm fine with creating a new story for that if it's a hassle

fi

for ((i=0; i<${#exportedTransformers[@]}; i++)); do
if [ ${exportedTransformers[$i]} != ${configTransformers[$i]} ]; then
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does this depend on the order of the transformers being the same between environments/docker.toml and plugins/transformerExporter.go?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It does. I sort both collections when I create them. I guess the O(n**2) solution wouldn't be terrible since we don't expect either collection to be large and then we wouldn't have to worry about order.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍 🎉

Copy link
Copy Markdown
Contributor

@rmulhol rmulhol left a comment

Choose a reason for hiding this comment

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

🚢

Copy link
Copy Markdown
Contributor

@gslaughl gslaughl left a comment

Choose a reason for hiding this comment

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

Super cool!

Copy link
Copy Markdown
Contributor

@elizabethengelman elizabethengelman left a comment

Choose a reason for hiding this comment

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

💯 🏅

@yaoandrew yaoandrew force-pushed the vdb-1184-exporter-config-check branch from 229bb4a to b483336 Compare February 12, 2020 16:55
@yaoandrew yaoandrew force-pushed the vdb-1184-exporter-config-check branch from b483336 to f5d6af3 Compare February 12, 2020 18:51
@yaoandrew yaoandrew merged commit 0c4dcb2 into staging Feb 12, 2020
@yaoandrew yaoandrew deleted the vdb-1184-exporter-config-check branch February 12, 2020 19:07
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.

4 participants