Skip to content
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

Merged
merged 3 commits into from
May 13, 2024
Merged

Feature/sdl #184

merged 3 commits into from
May 13, 2024

Conversation

ygrishajev
Copy link
Collaborator

@ygrishajev ygrishajev commented May 6, 2024

Changes:

  • Validation Movement: Shifts validation responsibilities from Cloudmos to Akashjs.
  • Integration: Updates code to address interface changes
  • Private Registries: Enables support for private registries

Note:

@ygrishajev ygrishajev marked this pull request as ready for review May 10, 2024 11:01
Copy link
Collaborator Author

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?

Copy link
Collaborator

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() {
Copy link
Collaborator

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.

Copy link
Collaborator Author

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?

Copy link
Collaborator

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.

Copy link
Collaborator Author

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

Copy link
Collaborator Author

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];

Copy link
Collaborator

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
Copy link
Collaborator

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.

Copy link
Collaborator

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.

Copy link
Collaborator Author

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
@ygrishajev ygrishajev merged commit c4c9318 into main May 13, 2024
5 checks passed
@ygrishajev ygrishajev deleted the feature/sdl branch May 13, 2024 15:33
ygrishajev added a commit to akash-network/akashjs that referenced this pull request May 14, 2024
ygrishajev added a commit to akash-network/akashjs that referenced this pull request May 14, 2024
github-actions bot pushed a commit to akash-network/akashjs that referenced this pull request May 14, 2024
## [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)
ilbertt pushed a commit to omnia-network/cloudmos that referenced this pull request May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants