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

[Heartbeat] Plan for handling synthetics dependencies #22928

Closed
andrewvc opened this issue Dec 4, 2020 · 3 comments · Fixed by #24777
Closed

[Heartbeat] Plan for handling synthetics dependencies #22928

andrewvc opened this issue Dec 4, 2020 · 3 comments · Fixed by #24777
Assignees
Labels
Heartbeat Team:obs-ds-hosted-services Label for the Observability Hosted Services team test-plan-ok This PR passed manual testing v7.13.0

Comments

@andrewvc
Copy link
Contributor

andrewvc commented Dec 4, 2020

This picks up from #22837 and strives to answer the question of how we handle synthetics deps.

There are two situations here:

  1. The user is running an inline script, (no package.json), and uses the globally installed synthetics version
  2. The user is running a suite (like our TODOS example), and has a package.json.

The proposal this issue sets forth is that:

  • For inline scripts we bundle the latest version of synthetics available at build time for the release, and use that for all runs unless the synthetics.version config variable is set to a specific value.
    • If a value is set it will be interpolated into the npm command npm install '@elastic/synthetics@${synthetics.version} letting users use semver syntax like ^1.0.0 if they so desire.
    • Heartbeat will ensure that the installed version does not exceed its most recent compatible major version (initially no major greater than 1.0 using npm list -g @elastic/synthetics
  • For suites, users already have a package.json which inherently handles setting deps with semver
    • We will ensure using npm list @elastic/synthetics that the major version of synthetics does not exceed version 1.
    • We will run an npm i on each update of the suite code to ensure deps are installed
@andrewvc andrewvc self-assigned this Dec 4, 2020
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Dec 4, 2020
@andresrc andresrc added the Team:obs-ds-hosted-services Label for the Observability Hosted Services team label Dec 5, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/uptime (Team:Uptime)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Dec 5, 2020
@ruflin
Copy link
Contributor

ruflin commented Dec 7, 2020

In the inline case, you state config variable is set to a specific value. Is this 1.2.3 or something like ^1.2.3?

andrewvc pushed a commit that referenced this issue Apr 21, 2021
…tics version compatability for suites * address review and fix notice * fix lowercase struct * fix version conflict and rebase * update go.* stuff to master * fix notice.txt * move validate inside sourcempatability for suites (#24777)

 fixes #22928
 Loads the synthetics suites and validates if the synthetics version is within the specified range and errors incase of compatibility mismatch. Current I have it set to fixed <2.0.0 to make sure we allow all synthetics version <2.0.0 from all suites directory.

Why is it important?
andrewvc pushed a commit to andrewvc/beats that referenced this issue Apr 21, 2021
…tics version compatability for suites * address review and fix notice * fix lowercase struct * fix version conflict and rebase * update go.* stuff to master * fix notice.txt * move validate inside sourcempatability for suites (elastic#24777)

 fixes elastic#22928
 Loads the synthetics suites and validates if the synthetics version is within the specified range and errors incase of compatibility mismatch. Current I have it set to fixed <2.0.0 to make sure we allow all synthetics version <2.0.0 from all suites directory.

Why is it important?
andrewvc pushed a commit to andrewvc/beats that referenced this issue Apr 22, 2021
…tics version compatability for suites * address review and fix notice * fix lowercase struct * fix version conflict and rebase * update go.* stuff to master * fix notice.txt * move validate inside sourcempatability for suites (elastic#24777)

 fixes elastic#22928
 Loads the synthetics suites and validates if the synthetics version is within the specified range and errors incase of compatibility mismatch. Current I have it set to fixed <2.0.0 to make sure we allow all synthetics version <2.0.0 from all suites directory.

Why is it important?
@justinkambic justinkambic added the test-plan Add this PR to be manual test plan label May 4, 2021
@justinkambic
Copy link
Contributor

I created a custom zip with a suite including a package.json file that specifies a 2.0+ version of synthetics. The run failed.

@justinkambic justinkambic self-assigned this May 5, 2021
@justinkambic justinkambic added test-plan-ok This PR passed manual testing and removed test-plan Add this PR to be manual test plan labels May 5, 2021
andrewvc added a commit that referenced this issue Jul 22, 2021
…tics version compatability for suites * address review and fix notice * fix lowercase struct * fix version conflict and rebase * update go.* stuff to master * fix notice.txt * move validate inside sourcempatability for suites (#24777) (#25200)

fixes #22928
 Loads the synthetics suites and validates if the synthetics version is within the specified range and errors incase of compatibility mismatch. Current I have it set to fixed <2.0.0 to make sure we allow all synthetics version <2.0.0 from all suites directory.

Why is it important?

Co-authored-by: Vignesh Shanmugam <[email protected]>
mergify bot pushed a commit that referenced this issue Jul 22, 2021
…tics version compatability for suites * address review and fix notice * fix lowercase struct * fix version conflict and rebase * update go.* stuff to master * fix notice.txt * move validate inside sourcempatability for suites (#24777) (#25200)

fixes #22928
 Loads the synthetics suites and validates if the synthetics version is within the specified range and errors incase of compatibility mismatch. Current I have it set to fixed <2.0.0 to make sure we allow all synthetics version <2.0.0 from all suites directory.

Why is it important?

Co-authored-by: Vignesh Shanmugam <[email protected]>
(cherry picked from commit d553335)
andrewvc added a commit that referenced this issue Jul 23, 2021
…tics version compatability for suites * address review and fix notice * fix lowercase struct * fix version conflict and rebase * update go.* stuff to master * fix notice.txt * move validate inside sourcempatability for suites (#24777) (#25200) (#27027)

fixes #22928
 Loads the synthetics suites and validates if the synthetics version is within the specified range and errors incase of compatibility mismatch. Current I have it set to fixed <2.0.0 to make sure we allow all synthetics version <2.0.0 from all suites directory.

Why is it important?

Co-authored-by: Vignesh Shanmugam <[email protected]>
(cherry picked from commit d553335)

Co-authored-by: Andrew Cholakian <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Heartbeat Team:obs-ds-hosted-services Label for the Observability Hosted Services team test-plan-ok This PR passed manual testing v7.13.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants