-
Notifications
You must be signed in to change notification settings - Fork 60
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
Feature/sdl #184
Feature/sdl #184
Conversation
3ea323b
to
4803bca
Compare
Also remove relevant local barrel index files. refs akash-network/support#184
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this file is not used anymore. Let's remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure we can clean it up
export let selectedNetworkId: string; | ||
|
||
export function initDeploymentData() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was used to support different versions on different networks at the same time. Most of the time it's not used, but when new features are released on the sandbox for a few weeks, it's useful to have it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mean, you manually update the code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes... I will revert it back to what it was.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a funky way to do stuff. types and refs are lost this way I IDEs which can cause untraceable errors. there should be no dynamic exports
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
smth like this would do much better
import * as v1beta3 from "./v1beta3";
import { mainnetId, testnetId, sandboxId } from "../constants";
import { getSelectedNetwork } from "@src/hooks/useSelectedNetwork";
import { NetworkId } from "@akashnetwork/akashjs/build/types/network";
export * from "./helpers";
const NETWORK_SDL: Record<NetworkId, typeof v1beta3> = {
[mainnetId]: v1beta3,
[testnetId]: v1beta3,
[sandboxId]: v1beta3
};
export let selectedNetwork = getSelectedNetwork();
export let selectedNetworkId = selectedNetwork.id;
export const deploymentData = NETWORK_SDL[selectedNetworkId];
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea that works and looks better 👍
try { | ||
SDL.validate(yamlStr); | ||
// TODO: use result of this in client code instead of just using validation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's only called at one place in NewDeploymentData
, maybe we can replace it there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, getSdl
is called multiple times DeploymentGroups
Manifest
ManifestVersion
, perhaps there's a better to handle this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, definitely. I've just left it for the upcoming changes. When I move out all the validation it would be easier to streamline code duplication
to acquire credentials email default value assignment refs #133
## [0.9.1](v0.9.0...v0.9.1) (2024-05-14) ### Bug Fixes * **api:** rollback deprecated protobuf generated code ([4d2479d](4d2479d)), closes [akash-network/console#184](akash-network/console#184)
Changes:
Note: