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

Case inconsistency inside lease-status #94

Open
cloud-j-luna opened this issue Dec 3, 2022 · 1 comment
Open

Case inconsistency inside lease-status #94

cloud-j-luna opened this issue Dec 3, 2022 · 1 comment
Assignees
Labels
P1 repo/provider Akash provider-services repo issues

Comments

@cloud-j-luna
Copy link
Member

cloud-j-luna commented Dec 3, 2022

As per the documentation (haven't verified yet through the CLI) the response from the lease-status command has an inconsistency in the casing as shown in the example:

{
  "services": {
    "web": {
      "name": "web",
      "available": 1,
      "total": 1,
      "uris": [
        "bnd9dtb1rddsl6gfcn3q0j771g.www.nocixp1.iptestnet.akashian.io"
      ],
      "observed_generation": 1,
      "replicas": 1,
      "updated_replicas": 1,
      "ready_replicas": 1,
      "available_replicas": 1
    }
  },
  "forwarded_ports": null,
  "ips": {
    "web": [
      {
        "Port": 3000,
        "ExternalPort": 80,
        "Protocol": "TCP",
        "IP": "198.204.231.229"
      }
    ]
  }
}

As seen the ips object follows a PascalCase notation, different to the snake_cased used across all the other responses. It's important to keep the consistency for systems that integrate with the provider-services. If it makes sense some form of guidelines could be developed for future contributions to make sure a standard is followed that will allow integrations to be developed with less friction points such as these. 😄

Update:
Based on this file there seems to be the "correct" json tags, although it is not reflected in the documentation:

type ProviderLeasedIPSpec struct {
	LeaseID      LeaseID `json:"lease_id"`
	ServiceName  string  `json:"service_name"`
	Port         uint32  `json:"port"`
	ExternalPort uint32  `json:"external_port"`
	SharingKey   string  `json:"sharing_key"`
	Protocol     string  `json:"protocol"`
}

I'm not sure whether this is the struct that is serialized by the CLI.

Update 2:

This seems to be the serialized structs but there is the IPs struct missing which confuses me https://github.com/ovrclk/provider-services/blob/main/cluster/types/v1beta2/types.go

@cloud-j-luna
Copy link
Member Author

Addressed in PR akash-network/provider#57

@troian troian transferred this issue from akash-network/provider Apr 17, 2023
@troian troian added repo/provider Akash provider-services repo issues P1 and removed awaiting-triage labels Apr 26, 2023
@anilmurty anilmurty moved this to Up Next (prioritized) in Core Product and Engineering Roadmap Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 repo/provider Akash provider-services repo issues
Projects
Status: Up Next (prioritized)
Development

No branches or pull requests

2 participants