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

feat!: remove gherkin, add events support #51

Merged
merged 3 commits into from
Aug 30, 2023
Merged

feat!: remove gherkin, add events support #51

merged 3 commits into from
Aug 30, 2023

Conversation

toddbaert
Copy link
Member

@toddbaert toddbaert commented Aug 29, 2023

This PR adds a means of testing events to the flagd-testbed container image.

  • removes the gherkin suite (which is now in the spec)
  • removes the caching suite (it was no longer implemented anywhere)
  • adds a small shell script and a new flag that changes once a second, to easily test flag change events

@@ -0,0 +1,22 @@
#!/bin/sh
Copy link
Member Author

Choose a reason for hiding this comment

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

We need this little wrapper script to start our flags/change-flag.sh script in the background, and to forward signals to flagd so we can gracefully shut down.

@@ -0,0 +1,15 @@
#!/bin/sh
Copy link
Member Author

Choose a reason for hiding this comment

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

This script just swaps the value of the flag in changing-flag.json once a second.


COPY testing-flags.json testing-flags.json
FROM busybox:1.36
Copy link
Member Author

Choose a reason for hiding this comment

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

busybox because we need some basic tools and a shell.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is fine. Final image is ~60MB

wrapper.sh Outdated Show resolved Hide resolved
Copy link
Contributor

@Kavindu-Dodan Kavindu-Dodan left a comment

Choose a reason for hiding this comment

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

Nice work 🙌

Added few nits and looks good

toddbaert and others added 2 commits August 29, 2023 17:52
Co-authored-by: Kavindu Dodanduwa <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Copy link
Contributor

@Kavindu-Dodan Kavindu-Dodan left a comment

Choose a reason for hiding this comment

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

I am not confident about gherkin test removal. There are other projects with submodule references for these

@toddbaert
Copy link
Member Author

I am not confident about gherkin test removal. There are other projects with submodule references for these

#51 (comment)

@toddbaert toddbaert merged commit 335f89e into main Aug 30, 2023
3 checks passed
@toddbaert toddbaert deleted the feat/events branch August 30, 2023 20:34
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.

3 participants