-
Notifications
You must be signed in to change notification settings - Fork 5
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
Run build_registry_docs as part of SDK build #1152
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this is the right place to put this command.
- It looks like we're running this on every parallel job in the build_sdk matrix, but it's doing exactly the same work in each branch.
- It doesn't look like we're doing anything with the result of the build - unless it's uploaded as part of each language's SDK, but my understanding from the
build_registry_docs
makefile target is it's just outputting thedocs/
directory. - If we're just trying to assert that the files are up to date, I think this needs to go before the "Check worktree clean" step.
Alternative options:
- Could we build this as part of the schema generation step? It's not exactly clear from the makefile what input files this target depends on running first.
- Perhaps we can model this dependency in the makefile rather than in CI so that it also runs automatically for anyone working on the provider locally?
Related to this .. I'm currently working on a larger piece of work to connect all the makefile targets together - so all dependencies are modelled even for local builds:
If it's a makefile change, I can make it as part of that PR instead.
I would implement this via the Makefile: -build_sdks: build_nodejs build_python build_dotnet build_go build_java build_registry_docs
+-build_sdks: build_nodejs build_python build_dotnet build_go build_java -tfgen: install_plugins upstream tfgen_no_deps
+tfgen: install_plugins upstream tfgen_no_deps build_registry_docs\ It feels like generating docs is more in the |
Unfortunately @iwahbe's suggestion won't work -
It sounds like two things should happen here:
|
This works for me (tested in random from a cleaned repo): Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 455c4723..225d1d7a 100644
--- a/Makefile
+++ b/Makefile
@@ -31,7 +31,7 @@ development: install_plugins provider build_sdks install_sdks
build: install_plugins provider build_sdks install_sdks
-build_sdks: build_nodejs build_python build_dotnet build_go build_java build_registry_docs
+build_sdks: build_nodejs build_python build_dotnet build_go build_java
install_go_sdk:
@@ -99,7 +99,7 @@ build_python: upstream
../venv/bin/python -m build .
# Run the bridge's registry-docs command to generated the content of the installation docs/ folder at provider repo root
-build_registry_docs:
+build_registry_docs: upstream tfgen_build_only
$(WORKING_DIR)/bin/$(TFGEN) registry-docs --out $(WORKING_DIR)/docs
clean:
@@ -155,7 +155,7 @@ test_provider:
@echo ""
cd provider && go test -v -short ./... -parallel $(TESTPARALLELISM)
-tfgen: install_plugins upstream tfgen_no_deps
+tfgen: install_plugins upstream tfgen_no_deps build_registry_docs
tfgen_no_deps: export PULUMI_HOME := $(WORKING_DIR)/.pulumi
tfgen_no_deps: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH) It incurs minimal overhead of |
5962328
to
9448a22
Compare
I'd been holding off on this due to #1151 - with those changes, we have |
pulumi/pulumi-snowflake#752 revealed that we weren't running registry docs build on pull requests.
This addresses that issue. Index docs will now be built on pull requests in CI.