Skip to content

Conversation

@honnix
Copy link
Member

@honnix honnix commented Oct 18, 2023

TL;DR

Make Scala BindingCollection and BindingMap case classes.

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

Complete description

Making them case classes to be able to support equality check. They should have been case classes in the first place, so this is a bug fix.

This change should have no user impact because both classes are package private.

Tracking Issue

NA

Follow-up issue

NA

Signed-off-by: Hongxin Liang <honnix@users.noreply.github.com>
@honnix honnix changed the title Update BindingMap.scala Case class for BindingCollection/Map Oct 18, 2023
@honnix honnix marked this pull request as ready for review October 18, 2023 20:45
Signed-off-by: Hongxin Liang <honnix@users.noreply.github.com>
* specific language governing permissions and limitations
* under the License.
*/
package org.flyte.flytekit
Copy link
Member Author

Choose a reason for hiding this comment

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

BTW why these classes are not under flytekitscala package?

Copy link
Member Author

Choose a reason for hiding this comment

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

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 cannot make it protected either as it would
  * be good for the own object but both implementations deal with list or maps
  * of [[SdkBindingData]] and therefore cannot call this method because it is in
  * a different class.

Not sure I understand what this refers to.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think I understand what this means.

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried revising it a bit in a latter commit.

Signed-off-by: Hongxin Liang <honnix@users.noreply.github.com>
@honnix honnix merged commit ee19d7d into master Oct 19, 2023
@honnix honnix deleted the honnix-patch-1 branch October 19, 2023 09:58
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