Skip to content
This repository was archived by the owner on Nov 15, 2024. It is now read-only.
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 api_server/lib/grok/grok_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ class GrokClient {
content += `Analyze this stack trace:\n\`\`\`\n${errorText}\n${stackTrace}\n\`\`\`\n`;

if (code) {
content += `\nAnd fix the following code:\n\`\`\`\n${code}\n\`\`\``;
content += `\nAnd fix the following code, but only if a fix is truly needed:\n\`\`\`\n${code}\n\`\`\``;
}

const initialPrompt = [
Expand Down
8 changes: 2 additions & 6 deletions api_server/modules/users/check_signup_request.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class CheckSignupRequest extends RestfulRequest {
user: this.user,
loginType: this.loginType,
dontSetFirstSession: this.signupToken.provider && !this.signupToken.teamId,
nrAccountId: this.request.body.nrAccountId
nrAccountId: this.request.body.nrAccountId,
}).login();
this.responseData.signupStatus = this.signupToken.signupStatus;
this.responseData.provider = this.signupToken.provider;
Expand All @@ -125,7 +125,7 @@ class CheckSignupRequest extends RestfulRequest {
}
},
returns: {
summary: 'Returns an updated user object, plus access token and PubNub subscription key, and teams the user is on as well as repos owned by those teams',
summary: 'Returns an updated user object, plus access token and PubNub subscription key, and teams the user is on',
looksLike: {
user: '<@@#user object#user@@>',
accessToken: '<user\'s access token, to be used in future requests>',
Expand All @@ -136,10 +136,6 @@ class CheckSignupRequest extends RestfulRequest {
teams: [
'<@@#team object#team@@>',
'...'
],
repos: [
'<@@#repo object#repo@@>',
'...'
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion api_server/modules/users/initial_data_fetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class InitialDataFetcher {
await this.getTeams(); // get the teams they are a member of
await this.getCompanies(); // get the companies associated with these teams
this.updateTeamPlans(); // copy company plan info to their teams
await this.getRepos(); // get the repos owned by their teams
// await this.getRepos(); // get the repos owned by their teams
await this.getStreams(); // get streams owned by the teams
return this.initialData;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class InitialDataTest extends ConfirmationTest {
// been invited to by accepting the invite ... so we should see NO team data in the initial data
Assert(data.companies.length === 0, 'found companies in one-user-per-org response');
Assert(data.teams.length === 0, 'found teams in one-user-per-org response');
Assert(data.repos.length === 0, 'found repos in one-user-per-org response');
Assert(!data.repos || data.repos.length === 0, 'found repos in one-user-per-org response');
Assert(!data.streams, 'found streams in one-user-per-org response');
if (!this.usingNRLogins) {
Assert(data.user.eligibleJoinCompanies.length > 0, 'did not get an eligible join company in one-user-per-org response');
Expand Down
4 changes: 2 additions & 2 deletions api_server/modules/users/test/login/initial_data_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ class InitialDataTest extends LoginTest {
this.validateMatchingObject(this.company.id, data.companies[0], 'company');
Assert(data.teams.length === 1, 'no team in response');
this.validateMatchingObject(this.team.id, data.teams[0], 'team');
Assert(data.repos.length === 1, 'no repo in response');
this.validateMatchingObject(this.repo.id, data.repos[0], 'repo');
Assert(!data.repos, 'repo in response');
// this.validateMatchingObject(this.repo.id, data.repos[0], 'repo');
Assert(data.streams.length === 3, 'expected 3 streams');
const teamStream = data.streams.find(stream => stream.isTeamStream);
const fileStream = data.streams.find(stream => stream.type === 'file');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class InitialDataTest extends LoginByCodeTest {
this.validateMatchingObject(this.company.id, data.companies[0], 'company');
Assert(data.teams.length === 1, 'no team in response');
this.validateMatchingObject(this.team.id, data.teams[0], 'team');
Assert(data.repos.length === 1, 'no repo in response');
this.validateMatchingObject(this.repo.id, data.repos[0], 'repo');
Assert(!data.repos, 'repo in response');
// this.validateMatchingObject(this.repo.id, data.repos[0], 'repo');
Assert(data.streams.length === 3, 'expected 3 streams');
const teamStream = data.streams.find(stream => stream.isTeamStream);
const fileStream = data.streams.find(stream => stream.type === 'file');
Expand Down
4 changes: 2 additions & 2 deletions api_server/modules/users/test/raw_login/initial_data_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ class InitialDataTest extends LoginTest {
this.validateMatchingObject(this.company.id, data.companies[0], 'company');
Assert(data.teams.length === 1, 'no team in response');
this.validateMatchingObject(this.team.id, data.teams[0], 'team');
Assert(data.repos.length === 1, 'no repo in response');
this.validateMatchingObject(this.repo.id, data.repos[0], 'repo');
Assert(!data.repos, 'repo in response');
// this.validateMatchingObject(this.repo.id, data.repos[0], 'repo');
Assert(data.streams.length === 3, 'expected 3 streams');
const teamStream = data.streams.find(stream => stream.isTeamStream);
const fileStream = data.streams.find(stream => stream.type === 'file');
Expand Down
1 change: 0 additions & 1 deletion api_server/modules/users/test/user_test_constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ const EXPECTED_LOGIN_RESPONSE = {
pubnubKey: true,

teams: true,
repos: true,
isOnPrem: true,
isProductionCloud: true,
runtimeEnvironment: true,
Expand Down
1 change: 1 addition & 0 deletions api_server/modules/web/newrelic_ide_redirect_request.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class NewRelicIdeRedirectRequest extends IdeRedirectRequest {
queryString: { ide: this.parsedPayload?.ide === '' ? 'default' : this.parsedPayload?.ide },
errorGroupGuid: this.parsedPayload.errorGroupGuid,
itemGuid,
nrUserId: this.parsedPayload.userId,
newToCodeStream: launcherModel?.isMru ? "false" : "true",
icons: {},
partial_launcher_model: launcherModel,
Expand Down
12 changes: 7 additions & 5 deletions api_server/modules/web/templates/ide_redirect.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,18 @@
window.segmentAnonymousId = decodeURIComponent(anonId);
}
}
analytics.track("codestream/ide_redirect page_viewed", {
properties: {
"event_type": "page_view",
analytics.track("codestream/ide_redirect displayed", {
//properties: {
"event_type": "modal_display",
"platform": "codestream",
"path": "N/A (codestream)",
"section": "N/A (codestream)",
"userId": "{{nrUserId}}",
"meta_data": "content: {{analyticsContentType}}",
"meta_data_2": "source: {{src}}",
"meta_data_3": "new_to_codestream: {{newToCodeStream}}",
"meta_data_4": "item_guid: {{itemGuid}}"
}
//}
});
}
}();
Expand All @@ -53,7 +54,8 @@
teamId: '{{teamId}}',
teamName: '{{teamName}}',
companyName: '{{companyName}}',
isLink: '{{isLink}}'
isLink: '{{isLink}}',
nrUserId: '{{nrUserId}}'
}
}
</script>
Expand Down
8 changes: 4 additions & 4 deletions api_server/modules/web/templates/partial_launcher.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -469,30 +469,30 @@ window.CODESTREAM.openEditor = function(ide) {
//fail
const source = "{{src}}" || "shared_link";
window.analytics.track("codestream/ide_redirect failed", {
properties: {
//properties: {
"event_type": "response",
"platform": "codestream",
"path": "N/A (codestream)",
"section": "N/A (codestream)",
"meta_data": `ide_detail: ${moniker}`,
"meta_data_2": `selection_method: ${ideSelection}`,
"meta_data_3": `source: ${source}`
}
//}
});
console.log(`CodeStream: failed in ${(new Date() - startTime)/1000}s for Moniker=${moniker} Path=${protocol} IDESelection=${ideSelection}`);
}, function () {
//success
const source = "{{src}}" || "shared_link";
window.analytics.track("codestream/ide selected", {
properties: {
//properties: {
"event_type": "response",
"platform": "codestream",
"path": "N/A (codestream)",
"section": "N/A (codestream)",
"meta_data": `ide_detail: ${moniker}`,
"meta_data_2": `selection_method: ${ideSelection}`,
"meta_data_3": `source: ${source}`
}
//}
});
console.log(`CodeStream: success in ${(new Date() - startTime)/1000}s for Moniker=${moniker} Path=${protocol} IDESelection=${ideSelection}`);
});
Expand Down
10 changes: 6 additions & 4 deletions api_server/modules/web/templates/partial_launcher_detailed.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -469,30 +469,32 @@ window.CODESTREAM.openEditor = function(ide) {
//fail
const source = "{{src}}" || "shared_link";
window.analytics.track("codestream/ide_redirect failed", {
properties: {
//properties: {
"event_type": "response",
"platform": "codestream",
"path": "N/A (codestream)",
"section": "N/A (codestream)",
"userId": options.nrUserId,
"meta_data": `ide_detail: ${moniker}`,
"meta_data_2": `selection_method: ${ideSelection}`,
"meta_data_3": `source: ${source}`
}
//}
});
console.log(`CodeStream: failed in ${(new Date() - startTime)/1000}s for Moniker=${moniker} Path=${protocol} IDESelection=${ideSelection}`);
}, function () {
//success
const source = "{{src}}" || "shared_link";
window.analytics.track("codestream/ide selected", {
properties: {
//properties: {
"event_type": "response",
"platform": "codestream",
"path": "N/A (codestream)",
"section": "N/A (codestream)",
"userId": options.nrUserId,
"meta_data": `ide_detail: ${moniker}`,
"meta_data_2": `selection_method: ${ideSelection}`,
"meta_data_3": `source: ${source}`
}
//}
});
console.log(`CodeStream: success in ${(new Date() - startTime)/1000}s for Moniker=${moniker} Path=${protocol} IDESelection=${ideSelection}`);
});
Expand Down
16 changes: 8 additions & 8 deletions api_server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api_server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "api-server",
"version": "15.3.0",
"version": "15.3.1",
"dependencies": {
"@microsoft/microsoft-graph-client": "3.0.7",
"@octokit/rest": "18.12.0",
Expand Down
2 changes: 1 addition & 1 deletion codestream-docker.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
"cloud": {
"apiKey": "${INTEGRATIONS_NEWRELICGROK_CLOUD_API_KEY}",
"apiUrl": "${INTEGRATIONS_NEWRELICGROK_CLOUD_API_URL}",
"prompt": "As a coding expert I am helpful and very knowledgeable about how to fix errors in code. I will be given errors, stack traces, and code snippets to analyze and fix. Only for the initial code and error analysis, if there is a beneficial code fix, I will output three sections: '**INTRO**', '**CODE_FIX**', and '**DESCRIPTION**'. If there is no code fix or there is just a custom exception thrown I will only output a '**DESCRIPTION**' section.\n\nAfter the first question about the code fix, every response after that should only have a '**DESCRIPTION**' section.\n\nThe output for each section should be markdown formatted.",
"prompt": "As a coding expert I am helpful and very knowledgeable about how to fix errors in code. I will be given errors, stack traces, and code snippets to analyze and fix. Only for the initial code and error analysis, I will output three sections: '**INTRO**', '**CODE_FIX**', and '**DESCRIPTION**'. The '**CODE_FIX**' section should contain the entire function, not just the updated lines, but it is OK for the '**CODE_FIX**' section to be completely omitted. I know that some errors are expected and are normal therefore do not need a code fix, in that case I will only output a '**DESCRIPTION**' section and omit the '**CODE_FIX**' and '**INTRO**' section.\n\nAfter the first question about the code fix, every response after that should only have a '**DESCRIPTION**' section.\n\nThe output for each section should be markdown formatted.",
"model": "gpt-4"
}
},
Expand Down
16 changes: 8 additions & 8 deletions outbound_email/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion outbound_email/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "outbound-email",
"version": "15.3.0",
"version": "15.3.1",
"dependencies": {
"@sendgrid/mail": "8.1.1",
"amqplib": "0.10.3",
Expand Down
7 changes: 5 additions & 2 deletions shared/codestream_configs/README.parameter-definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"replyToDomain": "email domain for routing replies back to codestream",
"senderEmail": "all generated emails will be sent as this user",
"supportEmail": "support email address to include on email and forms",
"suppressEmails": "Stop all email from being sent"
"suppressEmails": "Stop all email from being sent [CSSVC_SUPPRESS_EMAILS]"
},
"emailDeliveryService": {
"NodeMailer": {
Expand Down Expand Up @@ -203,6 +203,7 @@
"newRelicClientSecret": "NR Client Secret [CSSVC_NEWRELIC_IDENTITY_CLIENT_SECRET]",
"newRelicRegion": "NR Region [CSSVC_NEWRELIC_IDENTITY_REGION]",
"orgServiceHost": "NR Org Service Host [CSSVC_NEWRELIC_IDENTITY_ORG_SERVICE_HOST]",
"otherRegionGraphQLHost": "NR GraphQL Host [CSSVC_NEWRELIC_IDENTITY_OTHER_REGION_GRAPHQL_HOST]",
"passwordKey": "NR Password Key (we maintain for short lived encryption) [CSSVC_NEWRELIC_IDENTITY_PASSWORD_KEY]",
"signupServiceHost": "NR Signup Service Host [CSSVC_NEWRELIC_IDENTITY_SIGNUP_SERVICE_HOST]",
"userServiceHost": "NR User Service Host [CSSVC_NEWRELIC_IDENTITY_USER_SERVICE_HOST]",
Expand All @@ -222,7 +223,9 @@
"newrelicgrok": {
"<appProvider>": {
"apiKey": "API Key for New Relic Grok Requests (through Azure OpenAI) [CSSVC_NEWRELICGROK_API_KEY]",
"apiUrl": "API Url for New Relic Grok Requests (through Azure OpenAI) [CSSVC_NEWRELICGROK_API_URL]"
"apiUrl": "API Url for New Relic Grok Requests (through Azure OpenAI) [CSSVC_NEWRELICGROK_API_URL]",
"model": "Model for New Relic Grok Requests (through Azure OpenAI) [CSSVC_NEWRELICGROK_MODEL]",
"prompt": "Prompt for New Relic Grok Requests (through Azure OpenAI) [CSSVC_NEWRELICGROK_PROMPT]"
}
},
"okta": {
Expand Down
5 changes: 5 additions & 0 deletions shared/codestream_configs/parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,11 @@
"desc": "NR GraphQL Host",
"env": "CSSVC_NEWRELIC_IDENTITY_GRAPHQL_HOST"
},
"otherRegionGraphQLHost": {
"type": "string",
"desc": "NR GraphQL Host",
"env": "CSSVC_NEWRELIC_IDENTITY_OTHER_REGION_GRAPHQL_HOST"
},
"idpServiceHost": {
"type": "string",
"desc": "NR IdP Service Host",
Expand Down
2 changes: 1 addition & 1 deletion shared/codestream_configs/parameters.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
37
38