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

[KeyVault-Certificates] Rollup and test utils #4749

Merged
merged 2 commits into from
Aug 14, 2019

Conversation

sadasant
Copy link
Contributor

Related to #4623 and #4624

@sadasant sadasant added Client This issue points to a problem in the data-plane of the library. KeyVault labels Aug 12, 2019
@sadasant sadasant requested a review from sophiajt August 12, 2019 21:45
@sadasant sadasant self-assigned this Aug 12, 2019
@sadasant sadasant force-pushed the feature/rollupFor4623 branch from 5254c4c to fde5074 Compare August 14, 2019 18:37
dotenv.config({ path: "../.env" });

export function isBrowser(): boolean {
return typeof window !== "undefined";
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it better to do this or just say !isNode()?

Copy link
Contributor Author

@sadasant sadasant Aug 14, 2019

Choose a reason for hiding this comment

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

Yes! I agree. However: This recorder will be removed soon. This feedback is probably relevant in the new core recorder too. Should I still do the change?

export const isRecording = env.TEST_MODE === "record";
export const isPlayingBack = env.TEST_MODE === "playback";

// IMPORTANT: These are my attempts to make this more generic without changing it significantly
Copy link
Contributor

Choose a reason for hiding this comment

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

You probably want this comment not in the code but in the PR. Talk about what you changed and why you think the new version is better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a copy of the recorder.ts we have in keys and secrets. It will be replaced with a core recorder that Harsha is going to introduce soon. I can remove this comment if that's better!

}

class NiseRecorder extends Recorder {
private readonly sasQueryParameters = ["se", "sig", "sp", "spr", "srt", "ss", "st", "sv"];
Copy link
Contributor

Choose a reason for hiding this comment

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

What's this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is taken from Harsha's code! I will ask him.

for (const param in request.query) {
if (
recording.query[param] === undefined &&
!this.sasQueryParameters.includes(param) &&
Copy link
Contributor

Choose a reason for hiding this comment

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

Are sasQueryParameters part of the KV work too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a copy of the recorder.ts we have in keys and secrets. It will be replaced with a core recorder that Harsha is going to introduce soon.

For this specific change, I would need a bit of time to understand what's happening here, but it will be wasted since the core recorder is coming soon.

@sadasant sadasant merged commit e91dd1c into Azure:master Aug 14, 2019
@sadasant sadasant deleted the feature/rollupFor4623 branch August 14, 2019 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. KeyVault
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants