Skip to content

fix: ship the script tools/generate.sh sources - #44

Merged
gierschv merged 1 commit into
masterfrom
fix/generate-script-not-in-repo
Sep 11, 2026
Merged

fix: ship the script tools/generate.sh sources#44
gierschv merged 1 commit into
masterfrom
fix/generate-script-not-in-repo

Conversation

@gierschv

Copy link
Copy Markdown
Member

A clone of this repository cannot regenerate itself. From the pipeline:

./tools/generate.sh: line 22: tools/lib/generate-common.sh: No such file or directory

.gitignore carries the standard Python set, whose patterns are unanchored, so lib/ matches at any depth and swallowed tools/lib/. The file was never added, and nothing noticed because every local checkout already had it sitting there untracked.

This is the promise the whole design rests on: each SDK regenerates through its own tools/generate.sh, so a regeneration is reproducible from the SDK repository alone. It has not been true here since the directory was created, and 2.0.0 and 2.0.1 were both published from a tree that could not rebuild itself.

  • Anchors lib/ and lib64/ to the repository root, where they were meant to apply.
  • Adds tools/lib/generate-common.sh.

The other three SDKs track it already; only this repository carries the Python ignore set.

A clone of this repository cannot regenerate itself:

  ./tools/generate.sh: line 22: tools/lib/generate-common.sh: No such file or directory

.gitignore carries the standard Python set, and its patterns are unanchored, so
lib/ matches at any depth and swallowed tools/lib/. The file was never added,
and nothing noticed because every local checkout already had it untracked.

This is the one promise the whole design rests on: each SDK regenerates through
its own tools/generate.sh, so any regeneration is reproducible from the SDK
repository alone. It has not been true here since the directory was created,
and 2.0.0 and 2.0.1 were both published from a tree that could not rebuild
itself.

Anchors lib/ and lib64/ to the root, where they were meant to apply, and adds
the missing file. The other three SDKs track it already; only this repository
carries the Python ignore set.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-11T10:19:27.017697Z 020e6cf PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 020e6cf274

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +18 to +20
key = sys.argv[1].split(".")
doc = yaml.safe_load(open(".sdkgen.yaml"))
print(functools.reduce(operator.getitem, key, doc))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Declare PyYAML before invoking the helper

On a clean checkout with only the dependencies declared in pyproject.toml or requirements.txt, yaml is unavailable, so every generation run exits with ModuleNotFoundError while reading .sdkgen.yaml before OpenAPI Generator can run. Add a documented/installable tooling dependency on PyYAML or parse the manifest without an undeclared package so the newly shipped script is actually runnable from a clone.

Useful? React with 👍 / 👎.

@gierschv
gierschv merged commit d4dd24e into master Sep 11, 2026
5 checks passed
@gierschv
gierschv deleted the fix/generate-script-not-in-repo branch September 11, 2026 12:32
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.

1 participant