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

build(swagger): Fix Swagger build problems #3084

Merged
merged 9 commits into from May 26, 2020

Conversation

alexec
Copy link
Contributor

@alexec alexec commented May 22, 2020

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this is a chore.
  • The title of the PR is (a) conventional, (b) states what changed, and (c) suffixes the related issues number. E.g. "fix(controller): Updates such and such. Fixes #1234".
  • I've signed the CLA.
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My builds are green. Try syncing with master if they are not.
  • My organization is added to USERS.md.

@simster7 this can be merged as soon as green.

@@ -318,7 +318,6 @@ $(VERSION_FILE):
touch $(VERSION_FILE)

dist/$(DB).yaml: $(MANIFESTS) $(E2E_MANIFESTS) $(VERSION_FILE)
# We additionally disable ALWAYS_OFFLOAD_NODE_STATUS
Copy link
Contributor Author

Choose a reason for hiding this comment

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

comment no longer correct

.PHONY: start-aux
start-aux: $(GOPATH)/bin/goreman
.PHONY: start
start: status stop install controller cli executor-image $(GOPATH)/bin/goreman
Copy link
Contributor Author

Choose a reason for hiding this comment

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

because start-aux now blocks, we do not run wait or env

Copy link
Member

Choose a reason for hiding this comment

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

Great! This is better imo

@@ -451,7 +448,7 @@ $(GOPATH)/bin/swagger:
.PHONY: swagger
swagger: api/openapi-spec/swagger.json

pkg/apis/workflow/v1alpha1/openapi_generated.go:
pkg/apis/workflow/v1alpha1/openapi_generated.go: $(shell find pkg/apis/workflow/v1alpha1 -type f -not -name openapi_generated.go)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the main bug fix

@@ -461,20 +458,29 @@ pkg/apis/workflow/v1alpha1/openapi_generated.go:
--report-filename pkg/apis/api-rules/violation_exceptions.list
$(call restore_go_mod)

dist/kubernetes.swagger.json:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've reordered this section of the make file to reflect its execution order

@@ -2196,6 +2196,10 @@
"type": "string"
}
},
"depends": {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

There it is!

pkg/apiclient/_.secondary.swagger.json: hack/secondaryswaggergen.go pkg/apis/workflow/v1alpha1/openapi_generated.go dist/kubernetes.swagger.json
go run ./hack secondaryswaggergen

dist/swagger.json: $(GOPATH)/bin/swagger $(SWAGGER_FILES) $(MANIFESTS_VERSION_FILE) hack/swaggify.sh
swagger mixin -c 684 $(SWAGGER_FILES) | sed 's/VERSION/$(MANIFESTS_VERSION)/' | ./hack/swaggify.sh > dist/swagger.json
# we always ignore the conflicts, so lets automated figuring out how many there will be and just use that
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sarabala1979 so we never have to change the -c again :)

@alexec alexec requested a review from simster7 May 22, 2020 16:54
@alexec alexec marked this pull request as ready for review May 22, 2020 16:54
Copy link
Member

@simster7 simster7 left a comment

Choose a reason for hiding this comment

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

LGTM

.PHONY: start-aux
start-aux: $(GOPATH)/bin/goreman
.PHONY: start
start: status stop install controller cli executor-image $(GOPATH)/bin/goreman
Copy link
Member

Choose a reason for hiding this comment

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

Great! This is better imo

@@ -2196,6 +2196,10 @@
"type": "string"
}
},
"depends": {
Copy link
Member

Choose a reason for hiding this comment

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

There it is!

@simster7
Copy link
Member

FYI: #3076 Changed some docstrings that were previously not present on the swagger file and therefore aren't reflected on this PR yet.

Please merge with master before merging this PR in order to avoid master having incorrect codegen

@sonarcloud
Copy link

sonarcloud bot commented May 22, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@alexec alexec changed the title build(swagger): Fix Swagger build prolems build(swagger): Fix Swagger build problems May 22, 2020
@alexec alexec requested a review from simster7 May 22, 2020 18:59
@alexec
Copy link
Contributor Author

alexec commented May 24, 2020

Synced with master. Can be merged as soon as approved.

@simster7 simster7 merged commit 4fd27c3 into argoproj:master May 26, 2020
@alexec alexec deleted the build-swagger branch July 1, 2020 16:41
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.

None yet

2 participants