Skip to content

REST API: genesis endpoint schema definition #6157

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

Merged
merged 9 commits into from
Apr 30, 2025

Conversation

PhearZero
Copy link
Contributor

@PhearZero PhearZero commented Oct 28, 2024

Summary

Adds Genesis definition for endpoint and fixes invalid "string" response.

Test Plan

  • Updated schema definition
  • Generated clients with make generate
  • Run make test to ensure nothing has changed

@PhearZero PhearZero force-pushed the fix/get-genesis-schema branch from 48a93f3 to 9ed9887 Compare October 28, 2024 20:17
@PhearZero PhearZero marked this pull request as ready for review October 28, 2024 20:28
Copy link

codecov bot commented Jan 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 51.60%. Comparing base (5c49e9a) to head (d3562f2).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6157   +/-   ##
=======================================
  Coverage   51.60%   51.60%           
=======================================
  Files         649      649           
  Lines       87013    87013           
=======================================
+ Hits        44903    44904    +1     
  Misses      39244    39244           
+ Partials     2866     2865    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cce
Copy link
Contributor

cce commented Jan 18, 2025

LGTM, added a test to ensure the OpenAPI spec matches the authoritative type and JSON codec tags in bookkeeping.Genesis, which found some missing fields.

@gmalouf
Copy link
Contributor

gmalouf commented Feb 20, 2025

@PhearZero - if you want to contribute this, you will need to rebase/merge in from master and then regenerate your schema definitions again after the recent changes.

@algorandskiy
Copy link
Contributor

@PhearZero please remerge with master and run make generate

@PhearZero
Copy link
Contributor Author

Thanks! Have been traveling, will bring this up to date.

@gmalouf
Copy link
Contributor

gmalouf commented Apr 14, 2025

@PhearZero checking if still wanted to get this to finish line

@PhearZero
Copy link
Contributor Author

Absolutely @gmalouf ! Tried to debug this a bit yesterday, I am running into an issue with the generate command:

make generate
./scripts/check_deps.sh
[./scripts/check_deps.sh] Required dependencies installed.
PATH=/home/zero/go/bin:$PATH go generate ./...
stringer: no value for constant noop
agreement/actions.go:29: running "stringer": exit status 1
local_defaults.go
2025/04/16 09:17:05 
The swagger spec at "./swagger.json" is valid against swagger specification 2.0
stringer: no value for constant NoOpOC
data/transactions/application.go:62: running "stringer": exit status 1
stringer: no value for constant Sender
data/transactions/logic/fields.go:26: running "stringer": exit status 1
stringer: no value for constant AccountHK
ledger/store/trackerdb/hashing.go:32: running "stringer": exit status 1
stringer: no value for constant RoundConcluded
logging/logspec/agreement.go:27: running "stringer": exit status 1
make: *** [Makefile:142: generate] Error 1

I ran make clean but was not able to resolve the issue. Any suggestions on a resolution?

(Ubuntu 24.04 go1.23.3 linux/amd64)

@gmalouf
Copy link
Contributor

gmalouf commented Apr 16, 2025

@PhearZero can you reinstall your dependencies and dev tools using Go 1.23? Perhaps you upgraded from 1.21 directly without this. See: golang/go#68882

# Conflicts:
#	daemon/algod/api/algod.oas3.yml
#	daemon/algod/api/server/v2/generated/data/routes.go
#	daemon/algod/api/server/v2/generated/experimental/routes.go
#	daemon/algod/api/server/v2/generated/model/types.go
#	daemon/algod/api/server/v2/generated/nonparticipating/private/routes.go
#	daemon/algod/api/server/v2/generated/nonparticipating/public/routes.go
#	daemon/algod/api/server/v2/generated/participating/private/routes.go
#	daemon/algod/api/server/v2/generated/participating/public/routes.go
@PhearZero
Copy link
Contributor Author

The error was unrelated and was a user error on my part, I was not targeting the appropriate Makefile.

Thank you for reminding me of this item @gmalouf, should be updated.

@algorandskiy
Copy link
Contributor

@PhearZero it is almost there, please resolve the remaining minor items

@gmalouf
Copy link
Contributor

gmalouf commented Apr 28, 2025

@PhearZero Check out the remaining codegen and reviewdog failing checks - minor, but important changes left to get this wrapped up!

@gmalouf
Copy link
Contributor

gmalouf commented Apr 29, 2025

@PhearZero because you changed one of the files in the API package, have to re-run the codegen locally and push (check out the codegen verification failure).

@gmalouf gmalouf requested a review from algorandskiy April 29, 2025 19:28
@gmalouf gmalouf merged commit 1f5c06b into algorand:master Apr 30, 2025
19 checks passed
cce added a commit to cce/go-algorand that referenced this pull request May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants