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: unpin OpenAPI specs from v2.0.0-alpha.2 URL refs, use REMOTE #3315

Conversation

petermetz
Copy link
Member

On a high level this is a find & replace operation where the occurrences of the
first bullet point were replaced with the second bullet point:

  • "$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v2.0.0-alpha.2
  • "$ref": "../../../../..

The firs bullet point above is called a URL reference while the second one is
called a REMOTE references (remote as in a different spec file on the file-system).

  1. With this change, we unlock the release process being able to issue code that
    is working on the latest OpenAPI specifications that we are cross-referencing
    from one package to another.
  2. Previously you had to manually update the references in about a hundred
    and fifty locations to make sure that the versions are bumped but after this
    change this happens automatically as the newly introduced bundling process
    and the usage of the REMOTE references instead of URL references.
  3. The problem so far with the release process was that with the URL references
    we dependended on the existence of a pushed git tag for a successful release build.
    But we cannot git push the tag before having performed a successful release build,
    so this was a chicken-egg problem that had to be somehow untangled from its
    circular dependency hell and this change is what makes it happen by no longer
    depending on the git tags having been pushed to the upstream repository.

Related to, but does not yet fix: #2175

Depends on #3288

Signed-off-by: Peter Somogyvari peter.somogyvari@accenture.com

Pull Request Requirements

  • Rebased onto upstream/main branch and squashed into single commit to help maintainers review it more efficient and to avoid spaghetti git commit graphs that obfuscate which commit did exactly what change, when and, why.
  • Have git sign off at the end of commit message to avoid being marked red. You can add -s flag when using git commit command. You may refer to this link for more information.
  • Follow the Commit Linting specification. You may refer to this link for more information.

Character Limit

  • Pull Request Title and Commit Subject must not exceed 72 characters (including spaces and special characters).
  • Commit Message per line must not exceed 80 characters (including spaces and special characters).

A Must Read for Beginners
For rebasing and squashing, here's a must read guide for beginners.

@petermetz petermetz enabled auto-merge (rebase) June 12, 2024 19:31
petermetz added a commit to petermetz/cacti that referenced this pull request Jun 12, 2024
1. After this change the steps within the release management documentation should
work without issues.
2. Currently the process is (was) broken due to our reliance on URL references
within the OpenAPI specifications which created a chicken-egg problem with the
release tag issuance and the building of the source code to be released.

This change depends on the other pull requests that are refactoring the cross-package
OpenAPI specification references:

Depends on hyperledger#3288
Depends on hyperledger#3315

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
On a high level this is a find & replace operation where the occurrences of the
first bullet point were replaced with the second bullet point:
* `"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v2.0.0-alpha.2`
* `"$ref": "../../../../..`

The firs bullet point above is called a URL reference while the second one is
called a REMOTE references (remote as in a different spec file on the file-system).

1. With this change, we unlock the release process being able to issue code that
is working on the latest OpenAPI specifications that we are cross-referencing
from one package to another.
2. Previously you had to manually update the references in about a hundred
and fifty locations to make sure that the versions are bumped but after this
change this happens automatically as the newly introduced bundling process
and the usage of the REMOTE references instead of URL references.
3. The problem so far with the release process was that with the URL references
we dependended on the existence of a pushed git tag for a successful release build.
But we cannot git push the tag before having performed a successful release build,
so this was a chicken-egg problem that had to be somehow untangled from its
circular dependency hell and this change is what makes it happen by no longer
depending on the git tags having been pushed to the upstream repository.

Related to, but does not yet fix: hyperledger#2175

Depends on hyperledger#3288

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
@petermetz petermetz force-pushed the refactor-openapi-tpl-json-unpin-from-v200-alpha-2-url-refs branch from 5aa78db to 3f2a67e Compare June 13, 2024 21:52
Copy link

This PR/issue depends on:

@petermetz petermetz merged commit c18b3fc into hyperledger:main Jun 14, 2024
141 of 149 checks passed
@petermetz petermetz deleted the refactor-openapi-tpl-json-unpin-from-v200-alpha-2-url-refs branch June 14, 2024 08:29
petermetz added a commit to petermetz/cacti that referenced this pull request Jun 14, 2024
1. After this change the steps within the release management documentation should
work without issues.
2. Currently the process is (was) broken due to our reliance on URL references
within the OpenAPI specifications which created a chicken-egg problem with the
release tag issuance and the building of the source code to be released.

This change depends on the other pull requests that are refactoring the cross-package
OpenAPI specification references:

Depends on hyperledger#3288
Depends on hyperledger#3315

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz added a commit that referenced this pull request Jun 14, 2024
1. After this change the steps within the release management documentation should
work without issues.
2. Currently the process is (was) broken due to our reliance on URL references
within the OpenAPI specifications which created a chicken-egg problem with the
release tag issuance and the building of the source code to be released.

This change depends on the other pull requests that are refactoring the cross-package
OpenAPI specification references:

Depends on #3288
Depends on #3315

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
fazzatti pushed a commit to fazzatti/cacti that referenced this pull request Jun 24, 2024
1. After this change the steps within the release management documentation should
work without issues.
2. Currently the process is (was) broken due to our reliance on URL references
within the OpenAPI specifications which created a chicken-egg problem with the
release tag issuance and the building of the source code to be released.

This change depends on the other pull requests that are refactoring the cross-package
OpenAPI specification references:

Depends on hyperledger#3288
Depends on hyperledger#3315

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
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.

build: fix release automation
3 participants