-
Notifications
You must be signed in to change notification settings - Fork 39
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
Journeys not being bundled correctly when using modules in journey/
subdirectory
#905
Comments
Thanks for raising the issue @renzedj, The way push command works is by
Since the factory contains the invocation of the We follow similar factory patterns, but try to do one of these things
import {createJourney} from "./helper";
import {journey} from "@elastic/synthetics";
journey("name", async() => {
createJourney();
}) Let us know if you have more questions or feedback. Thanks. |
This is what I suspected, when I compared it with the way that the
While I can see why the decision was made to go with this for bundling, IMO this limits the utility of the factory pattern, which would otherwise be able to return a complete journey to be invoked, like in the example I provided. If the synthetics agent looks for the While I realize that this would likely be lower in priority, I would like to request this as a change. This SHOULD NOT be a breaking change, as anything written assuming the current bundling method would still work, since it's defining the journey in the journey file.
The first is what I'm doing now and it's less than optimum. The second is the next thing I was going to try on this. Thanks for the confirmation. Thx also for the quick response, even if it's not what I wanted to hear. 😄 |
I initially thought that this was the same issue as Issue #693, but I did a deeper dive after the response I got on that issue and think that while it may be related, it's not the same issue.
I am using a factory pattern to generate identical tests which run against multiple endpoints. When I separate the factory module from the journey file, only the factory module is bundled by NPM and pushed to the cluster.
This has been validated with
@elastic/synthetics-1.7.2
.Steps to reproduce
@elastic/synthetics
project.npx @elastic/synthetics .
Results
Everything runs as expected when running locally from the command line with
npx @elastic/synthetics .
.When I push it to my Elastic Cluster, it generates the following error:
When I look at the correct folder on the Agent, I see the following:
When I examine the contents of
journey-factory.ts
, it corresponds to the module, I'm not able to find the actual journey file.If I define the factory class and instantiate it in the same file, everything runs as expected.
Originally posted by @renzedj in #693 (comment)
The text was updated successfully, but these errors were encountered: