Skip to content

fix: remove unused date object #445

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

Merged
merged 2 commits into from
Mar 4, 2025

Conversation

bcpeinhardt
Copy link
Collaborator

This date object doesn't get used for anything, I'm not sure why it's being passed.

@bcpeinhardt bcpeinhardt requested a review from Parkreiner March 4, 2025 14:40
Copy link
Member

@Parkreiner Parkreiner left a comment

Choose a reason for hiding this comment

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

Is this right? I just pulled down the PR branch, and I'm getting feedback from the IDE that we need the date argument.

This is the version of the function I see:

getWorkspaceBuildLogs = async (
  buildId: string,
  before: Date,
): Promise<TypesGen.ProvisionerJobLog[]> => {
  const response = await this.axios.get<TypesGen.ProvisionerJobLog[]>(
    `/api/v2/workspacebuilds/${buildId}/logs?before=${before.getTime()}`,
  );

  return response.data;
};

@bcpeinhardt
Copy link
Collaborator Author

sigh wtf mine doesn't have a date parameter. Hold on let me figure out if somethings wonky, I'll do a fresh clone.

@bcpeinhardt
Copy link
Collaborator Author

On a completely fresh clone for me there's no Date parameter, something's weird here.

@bcpeinhardt
Copy link
Collaborator Author

Okay so the difference appears to be in how yarn install vs npm install handles our vendored setup. yarn install leaves the date param there, whereas npm install removes the date param. In code/coder, the date param is not present.

@bcpeinhardt bcpeinhardt merged commit 4a0f23d into main Mar 4, 2025
2 checks passed
@bcpeinhardt bcpeinhardt deleted the bcpeinhardt/fix-old-type-error-hanging-around branch March 4, 2025 16:51
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

Successfully merging this pull request may close these issues.

2 participants