Skip to content

[ENH] add regeneration script for js library #4115

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 10 commits into from
Apr 15, 2025
Merged

Conversation

jairad26
Copy link
Contributor

@jairad26 jairad26 commented Mar 30, 2025

Description of changes

This PR updates the regeneration script for the JS library to fix failing generation on the new openapi spec. It also overhauls the used functions, renaming the V2 references back to the normal references as per the openapi spec.

  • Improvements & Bug fixes
    • ...
  • New functionality
    • ...

Test plan

How are these changes tested?

  • Tests pass locally with pytest for python, yarn test for js, cargo test for rust

Documentation Changes

Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs repository?

Copy link

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

Copy link
Contributor Author

jairad26 commented Mar 30, 2025

@jairad26 jairad26 force-pushed the jai/js-client-regen branch from 8eb42a0 to fc6c500 Compare March 30, 2025 08:48
@jairad26 jairad26 force-pushed the jai/js-client-regen branch 6 times, most recently from 14ca0bb to e899a42 Compare March 30, 2025 18:45
@jairad26 jairad26 marked this pull request as ready for review March 30, 2025 19:23
@jairad26 jairad26 linked an issue Mar 31, 2025 that may be closed by this pull request
@jairad26 jairad26 force-pushed the jai/js-client-regen branch 11 times, most recently from 48d0344 to e5513bc Compare April 1, 2025 17:20
Copy link
Member

@philipithomas philipithomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - can you bump the version in the package.json fields so we can push a release?

@jairad26 jairad26 force-pushed the jai/js-client-regen branch from fc4ab73 to db274a6 Compare April 4, 2025 18:44
@jairad26 jairad26 changed the base branch from 03-25-server-coll-config-response to graphite-base/4115 April 14, 2025 17:11
@jairad26 jairad26 force-pushed the jai/js-client-regen branch from ce1b2c1 to 3140593 Compare April 14, 2025 17:11
@jairad26 jairad26 force-pushed the graphite-base/4115 branch from b29f535 to 7a3f562 Compare April 14, 2025 17:11
@jairad26 jairad26 changed the base branch from graphite-base/4115 to main April 14, 2025 17:11
@jairad26 jairad26 marked this pull request as ready for review April 14, 2025 17:12
@jairad26 jairad26 force-pushed the jai/js-client-regen branch 6 times, most recently from 794ec4e to d0fc2ff Compare April 14, 2025 22:11
@jairad26 jairad26 force-pushed the jai/js-client-regen branch from d0fc2ff to 8af4235 Compare April 14, 2025 22:23
Compaction assumes that enumeration position t_i means t_i was the last
record seen and therefore next reader should read from t_i + 1.

Log service was built and tested for t_i meaning t_i was the first
record to return.

Note:  I changed the go code, but only by moving a +1 out a layer.  The
inner version was inconsistent with convention, so I updated it.
Copy link
Member

@philipithomas philipithomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor thing to look into

@philipithomas
Copy link
Member

Do we need genapi.json and transform-openapi.py as separate files? Can we just fold them into one genapi.py?

@jairad26 jairad26 enabled auto-merge (squash) April 15, 2025 17:34
@jairad26 jairad26 merged commit babb036 into main Apr 15, 2025
69 checks passed
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.

[Bug]: OpenAPI generation failing for js client library
4 participants