#compat mode feedback
1 messages ยท Page 1 of 1 (latest)
What's the exact situation you're running into it? Just to double check it's expected
Two distinct situations:
-
I'm developing a module targeting 0.11.9, but while debugging it I want to take advantage of the new
Terminal. For that to kick in, I have to manually rundev dagger develop(devis my dev wrapper). Initially I tried removing theengineVersionfield manually, but that actually defaults to latest stable -
I'm working on upgrading a module to the latest engine version. That involves switching back and forth between engine versions as I develop, to understand what version of my code works on which version - this gives me the status of my upgrading task. Again this requires manually
dagger develop/dev dagger developwhich has other side effects and is generally a distraction
I will add:
- Sometimes I'm debugging something and I'm not sure what's going on. Maybe compat mode is kicking in, maybe not - it's an extra variable to juggle. If I had a flag that gave me the confidence that I know 100% which version of the schema is served, either directly by passing the version I want, or indirectly by setting compat mode on/off, that would help me rule out that dimension of my problem
For 1., that makes total sense but seems highly specific to this exact moment in time, so I'm unsure if it by itself calls for adding knobs.
2+3 do seem like annoyances though. Some way of disabling the compat mode would do it
Also related, it would be very useful to get some sort of info message when compat mode is enabled
(there was originally a flag to specify version on dagger develop when I reviewed it but it got removed before merge, seeing if there's context on why)
That's obviously different than a flag to disable entirely though
I think there's probably too much bikeshedding required to add a flag for disabling this before the release tomorrow, so just an issue would be good for now imo.
But printing info messages might be relatively quick, I'll check if that's doable
oh yeah it's not urgent at all (or rather I don't have an opinion on how urgent it is)
just dumping feedback as I go
Hm even printing when compat mode is enabled raises some questions:
- Should it be for just the module you are directly
dagger call'ing or that plus all the transitive deps loaded - Should it be printed whenever the module has an engine version lower than the current one, or only when the module actually makes a call that triggers emulation of an older API (in which case it should probably only print once per-module rather than every time that happens)
We could definitely bikeshed bring back the --engine-version flag - but I'd rather not have the a flag for call to disable the compat, I'd like to keep it tied to init/develop, so it keeps the engineVersion in dagger.json in sync.
We wouldn't want users to disable the compat in their CI (for example) if there was a call flag
- It definitely shouldn't be printed for transitive deps imo, that feels like it could be potentially noisy - and you might not be able to anything about it if it's not your code.
- I think whenever the engine version is lower - the alternative is reasonably annoying to implement imo, and also doesn't account for introspection results being different (which affects codegen, so like Void removal)
Also fyi to @charred drum, we discussed this previously
I think a nice readable span in the TUI might be enough?
I'm pretty pro restoring the engine-version flag - we already had our first user @heavy forge ask for it almost exactly, so I think that's good reasoning for having it
Or perhaps add the schema version used, as extra detail on an existing span? Preferably a visible one
@charred drum wdyt?
I wouldn't call it --engine-version specifically, because that's confusing if you're not intimately familiar with compat mode
Also another option is a bool flag --compat / --no-compat
Hm ๐ค I'd rather have a flag to specify the schema that the module should be served/codegened (which is the same as setting the engineVersion field in dagger.json)
Yeah I don't have an opinion on which would be more useful in practice
I don't think disabling it is quite right (since that's just equivalent to the default right? Using latest)
Disabling it for me as a user, means removing a variable while debugging things.
"Did I do something wrong? Or is this compat mode playing tricks on me? Let me disable it and see"
I guess if it was on dagger call, it might make sense to disable it, but see here
But dagger develop will update to the latest - there's not really of way of "disabling" compat mode internally, it's like a fundamental change to the routing (where requests are also routed by the target version)
Potentially, --no-compat is just equal to dagger develop, while --compat=version pins engineVersion to that target
I think its different because it also affects dependencies
Instead of --engine-version, we could have --compat
Hm I don't think we should allow disabling it for dependencies
there's also the case where I'm running a remote module (so dagger develop is not an option at all)
I think that causes potentially very annoying errors
๐ค but if you're disabling compat for a remote module, then why would you expect it to work?
It'll likely just break if you disable it
I'm not necessarily expecting it to work. I just want to know what happens, to eliminate a variable in understanding "what the hell is going on" โข๏ธ
The logic of putting this all in dagger develop is that it kicks in when you start to develop your module, calling a module should just work
Granted I haven't been using this for more than a day. So maybe we just wait for more usage experience, before adding a flag?
Here are my use cases so far ๐
It spells out specifically why using dagger develop is a PITA
Mm I think 2 is the case I'm most interested in
OK but to be clear I actually experienced both, so selfishly I'm interested in both ๐
Erik made the point that the first might be super specific to this point in time
Mm I agree with that I think
So do we have a takeaway? Are we going to change anything before releasing?
Or get feedback, and bikeshed before v0.12.1?
I think this one
Out of curiosity - is this experience worse or better than previous breaking changes we made in modules? Back before ga of modules
By the way a related problem: when I do get errors in my dependency (compat-related, but maybe not relevant), the actual 'go build' error doesn't show in the output. Just a cryptic message. dagger call -i saved the day, I had to manually run go build /runtime and there was the error
Do you mean the experience of lacking the flags specifically? Or the underlying compat errors I was looking at, when I experienced the lack of flags?
I think the most painful parts in the overall experience (navigating compat-related issues) were:
-
Cryptic error messages that did't show the actual Go errors. Without
call -iI never would have know even where to start. Which felt unusual, maybe related to errors in dependencies? This may not be related to compat mode at all. -
The lack of idempotency. The same
dagger callordagger developwith the same dagger version may yield different results depending on what ran before (because of modified dagger.json and compat mode)
Mm so I actually think that I might have a fix for the deps compat issue here
The primary thing happening here is that we aren't doing version comparison on dev versions
But the last version compat pr in flight should fix that
Ideally we won't break dependencies in this way then
I think that would go a long way to sorting that issue out
R.e. 2, dagger develop should always to idempotent, but agreed, dagger call isn't any more
By the way this is easy to reproduce, I was looking at our own pipelines. You removed much of the go aliases, but some of them are still there. If you run them in a dev engine with compat mode disabled, the module won't load. And, the errors won't be visible
Bleh I'll have a look at the error surfacing, that one sounds like a tui issue
compat mode feedback