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

Synthmanager Update command not uploading the whole file #24

Open
SaigeXSaige opened this issue Nov 28, 2018 · 2 comments
Open

Synthmanager Update command not uploading the whole file #24

SaigeXSaige opened this issue Nov 28, 2018 · 2 comments

Comments

@SaigeXSaige
Copy link

SaigeXSaige commented Nov 28, 2018

When calling npx synthmanager update -a API_KEY --filename FILENAME, the file is being uploaded to New Relic with the first few lines of code locally written removed from the updated synthetic file.

@SaigeXSaige
Copy link
Author

SaigeXSaige commented Nov 28, 2018

For example:
Locally existing synthetic:

1. \\This is a test
2. const urls = [
3. 'string-of-url.com',
4. 'another-string.com',

Synthetic in New Relic:

1. 'string-of-url.com',
2. 'another-string.com'

Tried adding multiple line spaces locally to be something like:

1.
2.
3. \\This is a test
4. const urls = [
5. 'string-of-url.com',
6. 'another-string.com',

and it still results the same in New Relic

@SaigeXSaige
Copy link
Author

SaigeXSaige commented Nov 28, 2018

Going through your lib files, I noticed this in Defaults.js:

"require('new-relic-synthetics-manager');\n//----- Add synthetic code below this line\n"

and realized there may be an assumption that the first two lines of any synthetic are those lines of code and funny enough it ignores empty line spaces to essentially remove those lines of code. Should probably be documented somewhere that our synthetics require that line.

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

1 participant