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

feat: add custom key to projects table, backfilling based on current project name, and API support #9134

Merged
merged 14 commits into from
Jun 10, 2024

Conversation

corban-beaird
Copy link
Contributor

@corban-beaird corban-beaird commented Apr 9, 2024

Ticket

ET-97
ET-101
ET-102
ET-164

Description

Introduce custom project key (similar to JIRA's project key), to be able to refer to projects. This adds the column to the DB & backfills existing projects based on their existing project name.

This also includes allowing the key to be specified in the CreateProject endpoint (PostProject).

Test Plan

  • Automated Integration Testing

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.

Commentary

Work will need to be done to allow updating project keys of existing projects (that is being handled in ET-98). This will likely include updating the logic for how we determine uniqueness, since the requirement will need to ensure no past project keys had been in use.

Copy link

netlify bot commented Apr 9, 2024

Deploy Preview for determined-ui canceled.

Name Link
🔨 Latest commit 47f19fc
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/66672f6bfc0e8b0008647028

Copy link

codecov bot commented Apr 9, 2024

Codecov Report

Attention: Patch coverage is 53.95480% with 163 lines in your changes missing coverage. Please review.

Project coverage is 48.99%. Comparing base (96c061b) to head (47f19fc).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9134      +/-   ##
==========================================
+ Coverage   48.96%   48.99%   +0.02%     
==========================================
  Files        1234     1235       +1     
  Lines      159823   160128     +305     
  Branches     2781     2780       -1     
==========================================
+ Hits        78264    78454     +190     
- Misses      81384    81499     +115     
  Partials      175      175              
Flag Coverage Δ
backend 43.82% <56.27%> (+0.11%) ⬆️
harness 63.96% <37.20%> (-0.03%) ⬇️
web 44.12% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
harness/determined/cli/workspace.py 21.23% <100.00%> (ø)
harness/determined/common/streams/wire.py 58.58% <100.00%> (+0.42%) ⬆️
harness/tests/common/streams/test_client.py 89.03% <ø> (ø)
master/internal/db/postgres.go 51.46% <ø> (ø)
master/internal/stream/projects.go 77.01% <ø> (ø)
master/test/streamdata/stream_data.go 100.00% <100.00%> (ø)
master/internal/project/authz_basic_impl.go 17.30% <75.00%> (+15.22%) ⬆️
master/pkg/model/project.go 0.00% <0.00%> (ø)
harness/determined/cli/project.py 17.64% <0.00%> (ø)
master/pkg/random/string.go 83.33% <83.33%> (ø)
... and 6 more

... and 5 files with indirect coverage changes

@corban-beaird corban-beaird changed the title chore: add custom project keys to project table and backfill feat: add custom key to projects table, backfilling based on current project name, and API support Apr 9, 2024
@corban-beaird corban-beaird marked this pull request as ready for review April 19, 2024 14:40
@corban-beaird corban-beaird requested review from a team as code owners April 19, 2024 14:40
Copy link
Contributor

@AmanuelAaron AmanuelAaron left a comment

Choose a reason for hiding this comment

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

Looks good overall.

master/internal/api_project.go Outdated Show resolved Hide resolved
@corban-beaird corban-beaird force-pushed the corban-beaird-add-project-key branch 2 times, most recently from 21c95ba to a165316 Compare May 10, 2024 23:26
Copy link
Contributor

@gt2345 gt2345 left a comment

Choose a reason for hiding this comment

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

Do we plan to allow changing project key after creation? My concern is that, it's possible that the generated key is an annoying/racist word, and the user might want to change that

@corban-beaird corban-beaird force-pushed the corban-beaird-add-project-key branch from fdabe47 to 059bb91 Compare June 3, 2024 15:38
Copy link
Contributor

@gt2345 gt2345 left a comment

Choose a reason for hiding this comment

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

Working as expected when testing on CLI, just a few questions

@gt2345 gt2345 self-requested a review June 7, 2024 19:08
@corban-beaird corban-beaird force-pushed the corban-beaird-add-project-key branch from bd97020 to 141ee7f Compare June 7, 2024 19:42
@corban-beaird corban-beaird merged commit 27e7307 into main Jun 10, 2024
84 of 98 checks passed
@corban-beaird corban-beaird deleted the corban-beaird-add-project-key branch June 10, 2024 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants