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

Use connection ids instead of names #3341

Merged
merged 7 commits into from Dec 13, 2023
Merged

Use connection ids instead of names #3341

merged 7 commits into from Dec 13, 2023

Conversation

seancolsen
Copy link
Contributor

@seancolsen seancolsen commented Dec 8, 2023

Related to #3328

This PR:

  • Fixes a bug where the user is unable to create new schemas.

    This bug stems from filter and create schemas using connection_id #3349 where we made some changes to the schemas API when listing schemas and creating a new schema.

    • In develop, creating a new schema is currently broken due to breaking API changes that we failed to handle. Whoops!

      This PR fixes that bug in 9feaca3 by changing the frontend code to follow the modified API.

    • Anish made the other API changes in a backwards-compatible manner, so they do not affect functionality in develop.

  • Changes the route for the Database Page and all child pages

    • Old: /db/<connection_nickname>/
    • New: /db/<connection_id>/
  • Modifies the data structures used for the front end stores to reference connections by their ids instead of by their names. The purpose of this change is to lay groundwork for Allow editing a connection nickname #3333.

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the develop branch of the repository
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@seancolsen
Copy link
Contributor Author

@mathemancer or @Anish9901 I'd like your help to determine whether additional backend changes are needed here.

I had to modify some of the Django routing, but I was unclear about some of the surrounding code. See this code. Before this PR, we had the connection name at that scope. Now we have the connection id at that scope instead. Some special logic seems to be necessary for the live demo, but I didn't take the time to fully understand it. I'd like a backend engineer to look over this to be see what other changes are necessary to use connection IDs in our routes instead of connection names.

@Anish9901
Copy link
Member

No additional backend changes should be necessary @seancolsen, you're gtg!

@seancolsen
Copy link
Contributor Author

Thanks @Anish9901!

@seancolsen seancolsen marked this pull request as ready for review December 12, 2023 20:20
@seancolsen seancolsen assigned pavish and unassigned seancolsen Dec 12, 2023
@seancolsen seancolsen added the pr-status: review A PR awaiting review label Dec 12, 2023
Copy link
Member

@pavish pavish left a comment

Choose a reason for hiding this comment

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

@seancolsen Looks good to me!

I added a commit a3c030f to fix formatting errors that were identified after the recent prettier fix in develop.

else:
# TODO: refactor connection names to ids
Copy link
Member

Choose a reason for hiding this comment

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

I do not think this will break the demo setup. I'd like @mathemancer to take a look and confirm once, post merge.

Copy link
Member

Choose a reason for hiding this comment

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

@seancolsen I hope you'll followup regarding this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Based on Anish's review, I'm assuming we're good to go and don't need @mathemancer to review. I'll follow up with a PR that removes that code comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed the code comment in #3354.

@pavish pavish added this pull request to the merge queue Dec 13, 2023
Merged via the queue into develop with commit 8c570e6 Dec 13, 2023
19 checks passed
@pavish pavish deleted the connection_ids branch December 13, 2023 17:56
@seancolsen seancolsen mentioned this pull request Dec 13, 2023
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-status: review A PR awaiting review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants