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

Confusion around meaning of name in Records and UI #373

Closed
humphd opened this issue Mar 17, 2023 · 6 comments
Closed

Confusion around meaning of name in Records and UI #373

humphd opened this issue Mar 17, 2023 · 6 comments

Comments

@humphd
Copy link
Contributor

humphd commented Mar 17, 2023

A recent change has broken our code for string the name of a record in the db and UI.

In the example below, you can see an old record I created, which shows the full name (ignore the missing . which is #359). The second record shows only the subdomain part, and is missing the rest:

Screenshot 2023-03-17 at 3 04 20 PM

On staging, in the database, a similar thing is happening:

Screenshot 2023-03-17 at 3 06 56 PM

Is this related to @Genne23v's recent work to separate subdomain and fqdn? What should we be storing for name in the Records table (cc @cychu42).

@humphd
Copy link
Contributor Author

humphd commented Mar 17, 2023

I think the bug is in add-record-flow.server.ts:

export const addDnsRequest = async (data: AddDnsRequestData) => {
  const { username, type, subdomain, value } = data;

  const fqdn = buildDomain(username, subdomain);

  // Before running workflow. Add a record to DB
  const recordId = await createUserRecord({
    username,
    type,
    name: subdomain,           // <--- should this be `fqdn` instead?
    value,
  });

@humphd
Copy link
Contributor Author

humphd commented Mar 17, 2023

Or is the issue that the front-end needs to construct the fqdn from this subdomain + the user's baseDomain?

@Eakam1007
Copy link
Contributor

Eakam1007 commented Mar 17, 2023

If we are renaming the name column to subdomain (#377), maybe this should be done by front-end when displaying the records?

@humphd
Copy link
Contributor Author

humphd commented Mar 17, 2023

Yes, we can fix in front-end

@Myrfion
Copy link
Contributor

Myrfion commented Mar 19, 2023

@humphd As far as I understand this issue got resolved in #369, right?

@humphd
Copy link
Contributor Author

humphd commented Mar 19, 2023

Yes, we're good.

@humphd humphd closed this as completed Mar 19, 2023
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

No branches or pull requests

3 participants