Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove 'contents' parameter from remove_notes #8209

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

wes-turner
Copy link
Contributor

@wes-turner wes-turner commented Oct 19, 2023

Project notes have name and contents. There is no uniqueness constraint on name within a project. This gives an awkward interface for removing a note by its name.

Previously, we had logic that optionally took a "contents", so a user could narrow down which note to delete when multiple notes had the name as the note to be removed. But this interface is complicated, and what's the likelihood that a user will event want it. Even more, we hadn't implemented all the if/then casing right with "contents", and this method had a bug as implemented.

This fixes the bug by removing the feature.

Description

Test Plan

Test remove_note functionality for when multiple notes of the same name exist. These notes can be added in the web UI or with Project.add_note. Ex:

from determined.experimental import client

projects = client.get_workspace(<name>).list_projects()
proj = projects[<i>]

proj.add_note(...)
...

proj.remove_note(...)

Commentary (optional)

Checklist

  • Changes have been manually QA'd
  • User-facing API changes need the "User-facing API Change" label.
  • Release notes should be added as a separate file under docs/release-notes/.
    See Release Note for details.
  • Licenses should be included for new code which was copied and/or modified from any external code.

Ticket

Project notes have name and contents. There is no uniqueness constraint
on name within a project. This gives an awkward interface for removing a
note by its name.

Previously, we had logic that optionally took a "contents", so a user
could narrow down _which_ note to delete when multiple notes had the
name as the note to be removed. But this interface is complicated, and
what's the likelihood that a user will event want it. Even more, we
hadn't implemented all the if/then casing right with "contents", and
this method had a bug as implemented.

This fixes the bug by removing the feature.
@wes-turner wes-turner requested a review from a team as a code owner October 19, 2023 19:38
@cla-bot cla-bot bot added the cla-signed label Oct 19, 2023
@netlify
Copy link

netlify bot commented Oct 19, 2023

Deploy Preview for determined-ui canceled.

Name Link
🔨 Latest commit 4c2d20a
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/653185be36aa5c0008340800

Copy link
Contributor

@azhou-determined azhou-determined left a comment

Choose a reason for hiding this comment

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

lgtm

@wes-turner wes-turner enabled auto-merge (squash) October 19, 2023 19:54
@wes-turner wes-turner added the to-cherry-pick Pull requests that need to be cherry-picked into the current release label Oct 19, 2023
@wes-turner wes-turner merged commit facdc30 into main Oct 20, 2023
72 of 87 checks passed
@wes-turner wes-turner deleted the wes/remove-note-contents branch October 20, 2023 23:50
dai-release bot pushed a commit that referenced this pull request Oct 20, 2023
Project notes have name and contents. There is no uniqueness constraint
on name within a project. This gives an awkward interface for removing a
note by its name.

Previously, we had logic that optionally took a "contents", so a user
could narrow down _which_ note to delete when multiple notes had the
name as the note to be removed. But this interface is complicated, and
what's the likelihood that a user will event want it. Even more, we
hadn't implemented all the if/then casing right with "contents", and
this method had a bug as implemented.

This fixes the bug by removing the feature.

(cherry picked from commit facdc30)
@dannysauer dannysauer added this to the 0.26.3 milestone Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed to-cherry-pick Pull requests that need to be cherry-picked into the current release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants