#I don't really feel like I'm getting

1 messages ยท Page 1 of 1 (latest)

brittle star
#

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

brittle star
#

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?

drowsy yew
#

cc @ebon coyote @small plover

small plover
#

hmmm... maybe a good reason to include an example from each SDK in this new telemetry test suite

ebon coyote
#

Maybe OTEL isn't correctly initialized with Bun... That's interesting, could you try with Node?

brittle star
#

I tried with node

#

Same results

ebon coyote
#

Hmm okay so there's definitely something wrong, I'll dig that on monday, that's an important one

ebon coyote
# brittle star Pipeline: https://github.com/RawkodeAcademy/RawkodeAcademy/blob/feat/dagger/pro...

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?

GitHub

Rawkode Academy Monorepository. Contribute to RawkodeAcademy/RawkodeAcademy development by creating an account on GitHub.

ebon coyote
#

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?

ebon coyote
brittle star
#

That command is part of the deployment pipeline

ebon coyote
# brittle star That's not a TypeScript error?
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

brittle star
#

Have I helped or made it worse? ๐Ÿ˜‚

ebon coyote
#

I'm trying to run your run tests function to see if I can retrigger that issue

#

Because I can see some traces but it stopped when the function itselfs fails, this is not expected

brittle star
#

I haven't quite got the tests working correctly yet, apologies

ebon coyote
#

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

brittle star
#

Yeah

#

I thought that was weird

ebon coyote
#

Yeah it is

brittle star
#

The deployment pipeline is the same though

ebon coyote
#

Yeah, but I cannot run the dep pipeline either

brittle star
#

Do you want me to add a quick pipeline that finishes to completion?

ebon coyote
#

That would help

#

Did you saw that issue for pipeline that successfully completed?

brittle star
#

Cool. You'll have it in 10 mins

ebon coyote
#

Thanks!

brittle star
#

OK. git pull main && cd ./projects/rawkode-academy/technology-service && dagger call simple

ebon coyote
#

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?

brittle star
#

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

ebon coyote
#

I can see them in the sync

#

But yeah i agree, they shouldn't be there

brittle star
#

OK:

            .withExec(["bun", "install"])
            .withExec(["echo", `Cloudflare Account ID: ${cloudflareId}`])
            .withExec(["echo", "bun", "deploy"]);

These are there

#

but nodeJs() and withBun() are missing?

ebon coyote
#

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

brittle star
#

๐Ÿ‘๐Ÿผ

#

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!"

ebon coyote
#

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

brittle star
#

Ah

ebon coyote
#

This is because type cannot be decorated sadly

brittle star
#

No problem

#

Sorry for the segue, but that helps a lot!

ebon coyote
#

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

ebon coyote
brittle star
#

This works ๐Ÿ™‚

ebon coyote
#

Nice

ebon coyote
#

@brittle star So I think we caught your bug, now we need to fix it haha

brittle star
#

Awesome!

small plover
ebon coyote
#

I'll test

#

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

small plover
#

oh v0.12.0 - that's a pretty wide range

#

bisecting versions would be a good start yea

ebon coyote
#

I tried with dagger v0.12.0 (registry.dagger.io/engine) darwin/arm64

#

I'll try that to find it

ebon coyote
#

Should I bisect every commit now? ๐Ÿ˜ฎ

small plover
#

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 ๐Ÿ˜›

ebon coyote
#

I bisect with my big brain only lmao, just doing the middle commit, then half etc etc

small plover
#

lolol

#

it's more fun when you do git bisect <command> or whatever and just let it rip

ebon coyote
#

I need to check how it works then

small plover
#

i guess the hard part is getting the command to fail due to missing data thinkspin - so maybe no git bisect run here but the rest should help

ebon coyote
#

Yeah I'll find the way

#

Will be fun to build 10 different version of the dev engine lmao

ebon coyote
#

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

small plover
#

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

brittle star
#

Good work!

ebon coyote
small plover
#

that'll do it

#

that's a pretty major breakage, wonder what's diff

#

i guess it's a major semver bump ๐Ÿ˜›

ebon coyote
#

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

ebon coyote
#

Thanks

brittle star
#

What's the command to use a pr build again, please?

#

Got it

#

Nope, that didn't work ๐Ÿ˜…

ebon coyote
#

./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