Re: Adding wiremock to test dependencies
Generally +1 on this one because it looks different, but am I correct that we already have a couple of mocking libs in our dependencies? I guess my concern is that adding a dependency is probably as much about adding some documentation on why it's included and how/when to use it as it is about updating the build files. Cheers, Derek On Tue, Jun 20, 2023 at 9:24 AM Josh McKenzie wrote: > Speaking only to the "we don't want to add a dependency on something > that's unstable or likely to fizzle out", looks good there to me: > >- Long-term project health / activity looks robust: >https://github.com/wiremock/wiremock/graphs/contributors >- Pretty diverse set of contributors in the last couple of years: > > https://github.com/wiremock/wiremock/graphs/contributors?from=2020-12-29=2023-06-20=c > > > On Tue, Jun 20, 2023, at 9:05 AM, Brandon Williams wrote: > > I was concerned about 'jre8' being in the dependency name and looked > into which java versions were supported, and it looks like 17 is, so > we should verify but I am +1 if that is the case. > > https://github.com/wiremock/wiremock/issues/1655 > > Kind Regards, > Brandon > > On Tue, Jun 20, 2023 at 6:35 AM Miklosovic, Stefan > wrote: > > > > Hi, > > > > we want to introduce wiremock library (1) into the project as a test > dependency to test CASSANDRA-16555. > > > > In that patch, (wip here (2)), we want to test how would such snitch > behave based on what Amazon EC2 Identity Service of version 2 returned to > that snitch. AWS Identity service of version 2 is necessary to call in > order to get a token with which a snitch is going to get AZ of a node it is > called from. > > > > The last comment of mine in (3) elaborates about approaches we were > considering and mocking http communication / requests with wiremock seems > to be like the most comfortable and straightforward solution. > > > > Wiremock is Apache licence 2.0 (4) and is well maintained. > > > > Are people OK with us introducing this to the build? > > > > (1) https://wiremock.org/ > > (2) > https://github.com/apache/cassandra/pull/2403/files#diff-dc04778c6659040f1c00f37e97a9b1530a532d3d1e3620427bd6628d1b2ec048 > > (3) https://issues.apache.org/jira/browse/CASSANDRA-16555 > > (4) https://github.com/wiremock/wiremock/blob/master/LICENSE.txt > > > > Regards > > > -- +---+ | Derek Chen-Becker | | GPG Key available at https://keybase.io/dchenbecker and | | https://pgp.mit.edu/pks/lookup?search=derek%40chen-becker.org | | Fngrprnt: EB8A 6480 F0A3 C8EB C1E7 7F42 AFC5 AFEE 96E4 6ACC | +---+
Re: Adding wiremock to test dependencies
Speaking only to the "we don't want to add a dependency on something that's unstable or likely to fizzle out", looks good there to me: • Long-term project health / activity looks robust: https://github.com/wiremock/wiremock/graphs/contributors • Pretty diverse set of contributors in the last couple of years: https://github.com/wiremock/wiremock/graphs/contributors?from=2020-12-29=2023-06-20=c On Tue, Jun 20, 2023, at 9:05 AM, Brandon Williams wrote: > I was concerned about 'jre8' being in the dependency name and looked > into which java versions were supported, and it looks like 17 is, so > we should verify but I am +1 if that is the case. > > https://github.com/wiremock/wiremock/issues/1655 > > Kind Regards, > Brandon > > On Tue, Jun 20, 2023 at 6:35 AM Miklosovic, Stefan > wrote: > > > > Hi, > > > > we want to introduce wiremock library (1) into the project as a test > > dependency to test CASSANDRA-16555. > > > > In that patch, (wip here (2)), we want to test how would such snitch behave > > based on what Amazon EC2 Identity Service of version 2 returned to that > > snitch. AWS Identity service of version 2 is necessary to call in order to > > get a token with which a snitch is going to get AZ of a node it is called > > from. > > > > The last comment of mine in (3) elaborates about approaches we were > > considering and mocking http communication / requests with wiremock seems > > to be like the most comfortable and straightforward solution. > > > > Wiremock is Apache licence 2.0 (4) and is well maintained. > > > > Are people OK with us introducing this to the build? > > > > (1) https://wiremock.org/ > > (2) > > https://github.com/apache/cassandra/pull/2403/files#diff-dc04778c6659040f1c00f37e97a9b1530a532d3d1e3620427bd6628d1b2ec048 > > (3) https://issues.apache.org/jira/browse/CASSANDRA-16555 > > (4) https://github.com/wiremock/wiremock/blob/master/LICENSE.txt > > > > Regards >
Re: Adding wiremock to test dependencies
I was concerned about 'jre8' being in the dependency name and looked into which java versions were supported, and it looks like 17 is, so we should verify but I am +1 if that is the case. https://github.com/wiremock/wiremock/issues/1655 Kind Regards, Brandon On Tue, Jun 20, 2023 at 6:35 AM Miklosovic, Stefan wrote: > > Hi, > > we want to introduce wiremock library (1) into the project as a test > dependency to test CASSANDRA-16555. > > In that patch, (wip here (2)), we want to test how would such snitch behave > based on what Amazon EC2 Identity Service of version 2 returned to that > snitch. AWS Identity service of version 2 is necessary to call in order to > get a token with which a snitch is going to get AZ of a node it is called > from. > > The last comment of mine in (3) elaborates about approaches we were > considering and mocking http communication / requests with wiremock seems to > be like the most comfortable and straightforward solution. > > Wiremock is Apache licence 2.0 (4) and is well maintained. > > Are people OK with us introducing this to the build? > > (1) https://wiremock.org/ > (2) > https://github.com/apache/cassandra/pull/2403/files#diff-dc04778c6659040f1c00f37e97a9b1530a532d3d1e3620427bd6628d1b2ec048 > (3) https://issues.apache.org/jira/browse/CASSANDRA-16555 > (4) https://github.com/wiremock/wiremock/blob/master/LICENSE.txt > > Regards
Re: Adding wiremock to test dependencies
I forgot to mention that in the future this will not be used for testing AWS IDSv2 only. There are other snitches we have which are also calling similar "services" to get some metadata from an instance a node runs in and this communication is currently not tested at all. I can pretty much imagine that the testing efforts might be expanded to all other snitches as well. From: Miklosovic, Stefan Sent: Tuesday, June 20, 2023 13:35 To: dev@cassandra.apache.org Subject: Adding wiremock to test dependencies Hi, we want to introduce wiremock library (1) into the project as a test dependency to test CASSANDRA-16555. In that patch, (wip here (2)), we want to test how would such snitch behave based on what Amazon EC2 Identity Service of version 2 returned to that snitch. AWS Identity service of version 2 is necessary to call in order to get a token with which a snitch is going to get AZ of a node it is called from. The last comment of mine in (3) elaborates about approaches we were considering and mocking http communication / requests with wiremock seems to be like the most comfortable and straightforward solution. Wiremock is Apache licence 2.0 (4) and is well maintained. Are people OK with us introducing this to the build? (1) https://wiremock.org/ (2) https://github.com/apache/cassandra/pull/2403/files#diff-dc04778c6659040f1c00f37e97a9b1530a532d3d1e3620427bd6628d1b2ec048 (3) https://issues.apache.org/jira/browse/CASSANDRA-16555 (4) https://github.com/wiremock/wiremock/blob/master/LICENSE.txt Regards