#I don't really feel like I'm getting
1 messages ยท Page 1 of 1 (latest)
New trace to match pushed code:
https://dagger.cloud/RawkodeAcademy/traces/317aeec0351e8cec55c031af57490ee7
I've got an await on the data model module and it doesn't appear to run and I have no visibility into whether it idd
with the write model, I see that a command failed; but I have no insights into what ran before it
Maybe this is how I'm structuring things, but I feel like I'm doing what I am supposed to be doing
If this is working as intended, it would be nice to have some control over the spans and the ability to tag any line of code with @span()
There's a decent amount of code in this pipeline and all I see is one step:
exec bun /src/projects/rawkode-academy/technology-service/dagger/src/__dagger.entrypoint.ts
Running it with node/yarn to see if it's different
Same with node
Any ideas @drowsy yew ? Do you think it looks right?
I'm looking at the trace for initialising the module and it's full of details
Could this be a NodeJS regression?
cc @ebon coyote @small plover
previously (same issue I think): https://discord.com/channels/707636530424053791/1283489598663688202
hmmm... maybe a good reason to include an example from each SDK in this new telemetry test suite
Maybe OTEL isn't correctly initialized with Bun... That's interesting, could you try with Node?
Hmm okay so there's definitely something wrong, I'll dig that on monday, that's an important one
Hey, I was trying to check your code but I got a deadlink when I click on it.
Same when I directly go on your repo: https://github.com/RawkodeAcademy/RawkodeAcademy/tree/main/projects/rawkode-academy
Is there a specific branch or access I need to have to check it?
Oh I found it! https://github.com/RawkodeAcademy/RawkodeAcademy/tree/main/projects/rawkode-academy/technology-service/dagger
Ok so I could trigger some kind of error by executing your pipeline: https://dagger.cloud/Quartz/traces/859f7faaa974edfc2bbafda1ce7cda0c.
It's different but the issue is the same, I think it's because nothing is actually resolve before when you execute your function so no operations happens, it's a TypeScript error that is thrown before the code is sent to the engine.
So that's why you see part of traces but then nothing, because nothing has been executed.
Now a good question is "where bun x @restatedev/restate deployment register --force --yes --environment=production https://technology-service-write-model-production.rawkode-academy.workers.dev/" is executed in your traces?
Would be nice to check for every SDK just in case, but I think this is a pure TS issue there, if nothing is executed, not traces will be find in cloud
That's not a TypeScript error?
That command is part of the deployment pipeline
Error: resolve: process "bun x @restatedev/restate deployment register --force --yes --environment=production https://technology-service-write-model-production.rawkode-academy.workers.dev/
This is not a dagger command either
Ohhh
Interesting
Have I helped or made it worse? ๐
I'm trying to run your run tests function to see if I can retrigger that issue
That's strange: Error: resolve: start rua4ca319p8fk (aliased as restate-handler): exited: exit code: 7
https://dagger.cloud/Quartz/traces/1303f954180de99882f0c1779bee5e8d?span=4833a7f059b97706#4833a7f059b97706:L1
Because I can see some traces but it stopped when the function itselfs fails, this is not expected
I haven't quite got the tests working correctly yet, apologies
What I'm confused about is that we can see the technnologyService and writeModel.runTests being called in cloud, these traces come from the TS SDK, what I don't understand is why we cannot see more traces after
Maybe it's because in runTests, the service() fails so nothing is executed
Yeah it is
The deployment pipeline is the same though
Yeah, but I cannot run the dep pipeline either
Do you want me to add a quick pipeline that finishes to completion?
Cool. You'll have it in 10 mins
Thanks!
OK. git pull main && cd ./projects/rawkode-academy/technology-service && dagger call simple
Here you're getting all your traces no?
Oh it looks like the children inside in the parent
I'm not sure, could you confirm?
All I see is simple()
Is that expected?
Shouldn't wee see withExec() 3 times, plus the nodeJs() and withBun() stuff, which has more nested calls?
I don't see anywhere near what I expect to
OK:
.withExec(["bun", "install"])
.withExec(["echo", `Cloudflare Account ID: ${cloudflareId}`])
.withExec(["echo", "bun", "deploy"]);
These are there
but nodeJs() and withBun() are missing?
I'm still confused because sync should be a children of simple, and it's not the case in your trace
But you're using a dependency, I wonder if that's what is breaking the traces
Maybe I'm doing something wrong when I forward the parentID
I'll try a simpler repo with and without dep, just to see if I can catch it
๐๐ผ
Would you expect this to work?
import { object, func } from "@dagger.io/dagger"
type GlobalConfig = {
cloudflare: {
accountId: string;
}
}
@object()
class Config {
/**
* Returns global config for the Rawkode Academy monorepository
*/
@func()
get(): GlobalConfig {
return {
cloudflare: {
accountId: "0aeb879de8e3cdde5fb3d413025222ce"
}
};
}
}
Error: get module name: input: failed to get schema: failed to get schema for module "config": failed to create function "get": failed to find mod type for function "get" return type: "ConfigGlobalConfig!"
Nope, type is not supported yet in Typescript,you'll need to create a custom class with @object() to let the engine know the type exist
Ah
This is because type cannot be decorated sadly
To use type, I'll need to change how the introspection of the code works in order to start from the global module and find all references to register them, it's a bit more complex than what I'm doing for now
No problem! Happy to help
This works ๐
Nice
Ok that's weird, I can repro it with a very simple case:
TS: https://dagger.cloud/Quartz/traces/f5ca5f93bdb2e05d98228e1fc3d5491b
GO: https://dagger.cloud/Quartz/traces/272ba55d888ff747a16e529c118c7ca4
@small plover Did you change the way traces are forward from SDK to engine? This was not like that when I integrated traces to module.
@brittle star So I think we caught your bug, now we need to fix it haha
Awesome!
not that I know of. you could try against older Engine versions to see if it's a regression ๐ค
I'll test
v0.12 <- https://dagger.cloud/Quartz/traces/c23165ed64cd62e8a47638efd8160918
There's a regression introduced in 0.13
Should I "bisect" every version to find the broken one or you have an idea?
I didn't touch the TS tracing code during 0.13, I wonder what broke it
/cc @small plover in case you missed it
is that v0.12.7?
oh v0.12.0 - that's a pretty wide range
bisecting versions would be a good start yea
I tried with dagger v0.12.0 (registry.dagger.io/engine) darwin/arm64
I'll try that to find it
12.7 is fine: https://dagger.cloud/Quartz/traces/9b5299f455fbea7451b3a623217fabb9
So it's 0.13 who's breaking it ๐ฆ
Should I bisect every commit now? ๐ฎ
huh - if it were OTel I'd have expected it to be broken as of v0.12.5 since that was the last big change
yeah guess so
thankfully that's a somewhat small range
assuming you actually use git bisect ๐
I bisect with my big brain only lmao, just doing the middle commit, then half etc etc
lolol
it's more fun when you do git bisect <command> or whatever and just let it rip
I need to check how it works then
i guess the hard part is getting the command to fail due to missing data
- so maybe no git bisect run here but the rest should help
Yeah I'll find the way
Will be fun to build 10 different version of the dev engine lmao
Seems that https://github.com/dagger/dagger/pull/8237 is breaking the traces
Which is so weird, I wonder if it comes from execca killing the process before traces are correctly sent
I'll try to see what is breaking
I've rollback graphql-request from 7.0.1 to 6.0.1 and the issue is fixed:
6.0.1: https://dagger.cloud/Quartz/traces/2f5ae757d0711178b756945e97a69d3b
7.0.1: https://dagger.cloud/Quartz/traces/10e48048955a345b2e9bdc8d2104efff
I'll dig into what changed, I think this might be related to the parent trace ID not being forwarded properly with the new version
nice find
I'll add a TODO to make sure we have TypeScript coverage for this in the new telemetry test suite - seems like an easy win
Good work!
I see traceparent is missing in the gql request header with 7.0.1
6.0.1: https://dagger.cloud/Quartz/traces/acb964ee400df39b0b0a22bed64e22e1
7.0.1: https://dagger.cloud/Quartz/traces/dbace2ff194184ed62d0f597a651067c#b530681af39121cf
that'll do it
that's a pretty major breakage, wonder what's diff
i guess it's a major semver bump ๐
That's so weird yes, I'm gonna make a custom injector to fix this issue, I see that the header type has change between 6.0.1 and 7.0.1 and now it's contained inside an object and not a plain JSON
Yeaaaaah! PR fixed by https://github.com/dagger/dagger/pull/8467, you should give it a try when you have time @brittle star
Could I get a review on it @small plover ?
Thanks
What's the command to use a pr build again, please?
Got it
Nope, that didn't work ๐
./hack/dev
then you need to set the environment to use the binary and the engine
Here's an example of .envrc:
export DAGGER_DIR=~/Documents/github.com/quartz-technology/playground/rawcode_test/RawkodeAcademy/projects/rawkode-academy/technology-service/dagger/dagger
export _EXPERIMENTAL_DAGGER_CLI_BIN=$DAGGER_DIR/bin/dagger
export _EXPERIMENTAL_DAGGER_RUNNER_HOST=docker-container://dagger-engine.dev
export PATH=$_EXPERIMENTAL_DAGGER_CLI_BIN:$PATH
I'll try on your simple, just to verify
It worked on my side: https://dagger.cloud/Quartz/traces/8c10208d4d0baf285a1c53a5981d0494 did you tried with the right setup?