SpannerToCassandraSourceLT fails with FileNotFoundException for session.json#3342
Conversation
Summary of ChangesHello @aasthabharill, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3342 +/- ##
============================================
+ Coverage 51.03% 51.07% +0.03%
- Complexity 5210 5213 +3
============================================
Files 994 994
Lines 60672 60723 +51
Branches 6651 6657 +6
============================================
+ Hits 30966 31014 +48
- Misses 27528 27531 +3
Partials 2178 2178
🚀 New features to boost your workflow:
|
https://b.corp.google.com/issues/446480838
Cause/Issue:
The
SpannerToCassandraSourceLTtest was failing because the test base class (SpannerToSourceDbLTBase) unconditionally mandated the presence of asession.jsonfile. It attempted to upload this file to GCS and pass its path to the Dataflow job, causing aFileNotFoundExceptionbecause the Cassandra test setup does not (and should not need to) provide a session file. The session file is an optional parameter in thespanner-to-sourcedb, but the test harness was incorrectly treating it as required.Fix:
Modified
SpannerToSourceDbLTBaseto make thesession.jsonfile optional.launchDataflowJobto accept an optionalsessionFileNameargument and only include it in the pipeline parameters if it is not null.SpannerToCassandraSourceLTto pass null for the session file, effectively opting out of using it.