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

AUTOBLOCKS_REPLAY_ID -> AUTOBLOCKS_SIMULATION_ID #8

Merged
merged 2 commits into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion e2e/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { AUTOBLOCKS_API_KEY, AUTOBLOCKS_INGESTION_KEY } = process.env;

// We've created a view in our demo org to be used in CI tests.
// It has one filter, message == 'sdk.e2e', and its timespan is "last 1 hour"
const E2E_TESTS_VIEW_ID = 'clldzryfx0001i908okbbe5pf';
const E2E_TESTS_VIEW_ID = 'cllh1o6bz0001jr08kocrn1fw';
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 deleted this view so the sidebar would be clear of views for the demo video, but it occurred to me I could just hide it from the sidebar in the UI

const E2E_TESTS_EXPECTED_MESSAGE = 'sdk.e2e';

const sleep = (seconds: number) =>
Expand Down
6 changes: 3 additions & 3 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const zCommitSchema = z.object({
type Commit = z.infer<typeof zCommitSchema>;

const zEnvSchema = z.object({
AUTOBLOCKS_REPLAY_ID: z.string().optional(),
AUTOBLOCKS_SIMULATION_ID: z.string().optional(),
GITHUB_ACTIONS: z.string().optional(),
});

Expand Down Expand Up @@ -264,8 +264,8 @@ export class HeadersBuilder {
private makeReplayRun(): ReplayRun | null {
if (this.env.GITHUB_ACTIONS) {
return this.makeGitHubReplayRun();
} else if (this.env.AUTOBLOCKS_REPLAY_ID) {
return this.makeLocalReplayRun(this.env.AUTOBLOCKS_REPLAY_ID);
} else if (this.env.AUTOBLOCKS_SIMULATION_ID) {
return this.makeLocalReplayRun(this.env.AUTOBLOCKS_SIMULATION_ID);
}

return null;
Expand Down
2 changes: 1 addition & 1 deletion test/headers.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('Replay Headers', () => {

it('local replay', async () => {
replacedEnv = jest.replaceProperty(process, 'env', {
AUTOBLOCKS_REPLAY_ID: 'my-replay-id',
AUTOBLOCKS_SIMULATION_ID: 'my-replay-id',
});

const builder = new HeadersBuilder();
Expand Down