snowflakedb / snowflakedb/snowflake-ingest-java

fake/noop implementations of SnowflakeStreamingIngestClient and SnowflakeStreamingIngestChannel

Open
#764 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
83
Forks
70
Avg merge
1d 7h
Merged PRs (30d)
6

Description

Is there any interest in a contribution of a set of fakes for the SnowflakeStreamingIngestClient and channel in order to support easier testing for downstream users. Understandably it adds overhead for support so I can understand a lack of interest. I'd be happy to upstream some simple internal fakes I am building for testing if that's interesting.

I see that there is support for a form of testing mode in the builder of the of client but AFAICT this does not extend to channels.

https://github.com/snowflakedb/snowflake-ingest-java/blob/5e93b3d7d645e8ca61a137081362e88319ee538f/src/main/java/net/snowflake/ingest/streaming/SnowflakeStreamingIngestClientFactory.java#L48-L51

Largely the fakes themselves can be very simple as the API itself is rather plain. The only possible complication is the table schema API since there is no obvious construction for it. https://github.com/snowflakedb/snowflake-ingest-java/blob/master/src/main/java/net/snowflake/ingest/streaming/SnowflakeStreamingIngestChannel.java#L282-L289

In particular fakes become very useful when working with many channels as mocking channels that are dynamically created but also dynamically closed etc is quite tedious.

Happy to hear thoughts and suggestions cheers.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with SnowflakeStreamingIngestClientFactory.java and SnowflakeStreamingIngestChannel.java, especially the builder testing mode and the table schema API around lines 282-289. Determine the fake client and channel behavior and the schema construction approach before confirming the contribution scope; done should include usable fakes for downstream tests across dynamically created and closed channels.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, stream-processing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.