Skip to content

Conversation

@kevinmessiaen
Copy link
Member

Description

Limit size of artifact name and display_name to 255 chars when uploading to Giskard Hub

Related Issue

Type of Change

  • 📚 Examples / docs / tutorials / dependencies update
  • 🔧 Bug fix (non-breaking change which fixes an issue)
  • 🥂 Improvement (non-breaking change which improves an existing feature)
  • 🚀 New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 🔐 Security fix

Checklist

  • I've read the CODE_OF_CONDUCT.md document.
  • I've read the CONTRIBUTING.md guide.
  • I've updated the code style using make codestyle.
  • I've written tests for all new methods and classes that I created.
  • I've written the docstring in Google format for all the methods and classes that I used.

@linear
Copy link

linear bot commented Nov 27, 2023

GSK-2179 Slicing function DB insert fails because of the long name #1605

#1605

If the feature name is long, it will cause issues when uploading scan result since generated function name will exceed the db max char allowed

…b-insert-fails-because-of-the-long-name' into 1605-gsk-2179-slicing-function-db-insert-fails-because-of-the-long-name
Copy link
Member

@Inokinoki Inokinoki left a comment

Choose a reason for hiding this comment

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

LGTM

Tested with titanic (even though without special characters or exceeded length)

@kevinmessiaen
Copy link
Member Author

LGTM

Tested with titanic (even though without special characters or exceeded length)

You can try with this code:

import giskard

@giskard.slicing_function(name="🏃" * 500)
def sf_long_name(row):
    return True

client = giskard.GiskardClient(
    url="http://localhost:9000",  # URL of your Giskard instance
    key="gsk-...")

sf_long_name.upload(client, "project_key")

I tried with different emojis and it worked (🧑‍🚒 counted as 5 characters, 👩‍👩‍👧‍👦 counted as 11, ...).

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

83.3% 83.3% Coverage
0.0% 0.0% Duplication

@kevinmessiaen kevinmessiaen merged commit e5edf42 into main Nov 29, 2023
@kevinmessiaen kevinmessiaen deleted the 1605-gsk-2179-slicing-function-db-insert-fails-because-of-the-long-name branch November 29, 2023 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

[GSK-2179] Slicing function DB insert fails because of the long name

3 participants