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

scripts/have-news has an undocumented dependency upon src-prefix=a #9269

Closed
gibson042 opened this issue Apr 20, 2024 · 0 comments · Fixed by #9355
Closed

scripts/have-news has an undocumented dependency upon src-prefix=a #9269

gibson042 opened this issue Apr 20, 2024 · 0 comments · Fixed by #9355
Labels
bug Something isn't working

Comments

@gibson042
Copy link
Member

Originally posted by @gibson042 in #9268 (comment)

Describe the bug

scripts/have-news has an undocumented dependency upon src-prefix="a" that was disrupted by my local diff.mnemonicPrefix=true configuration, resulting in empty output until I tracked down the issue.

It also has an explicit dependency upon /usr/bin/perl that is probably best avoided.

To Reproduce

Steps to reproduce the behavior:

git checkout origin/dev-upgrade-15
git config diff.mnemonicPrefix false
scripts/have-news HEAD^ # observe that output is not empty
git config diff.mnemonicPrefix true
scripts/have-news HEAD^ # observe that output has become empty

Expected behavior

scripts/have-news should function correctly regardless of git configuration.

Suggestion: Rely on git rather than its consumer to diff only CHANGELOG.md files. Also, replace the Perl source with AWK or something comparably simple and portable:

git diff ${target:-HEAD^} '*/**/CHANGELOG.md' \
  | awk -v ignore='+**Note:** Version bump only for package ' '
    BEGIN {
      # Print the header.
      print "## Packages that have NEWS.md updates";
      print "";
      print "```diff";
    }
    /^diff / {
      # New file; flush the buffer (if relevant) and stop buffering.
      if (active) printf "%s", buf;
      active = 0;
    }
    /^---/ {
      # File name "a"; start buffering.
      active = 1;
      buf = "";
    }
    active {
      # Buffer this line, but deactivate upon seeing the ignore prefix.
      buf = buf $0 "\n";
      if (substr($0, 1, length(ignore)) == ignore) active = 0;
    }
    END {
      # Flush the buffer (if relevant) and print the footer.
      if (active) printf "%s", buf;
      print "```";
    }
  '
@gibson042 gibson042 added the bug Something isn't working label Apr 20, 2024
gibson042 added a commit that referenced this issue Apr 20, 2024
Created by following the [pending
MAINTAINERS.md](https://github.com/Agoric/agoric-sdk/pull/9235/files?short_path=39da3bd#diff-39da3bd6270d44ea37b6ed50bd42eeb9d93ac5e1639645871a69cbe08cbe29de),
branching from dev-upgrade-15.

NOTE:
[scripts/have-news](https://github.com/Agoric/agoric-sdk/blob/master/scripts/have-news)
has an undocumented dependency upon src-prefix="a" that was disrupted by
my local
[`diff.mnemonicPrefix=true`](https://git-scm.com/docs/diff-config/2.9.5#Documentation/diff-config.txt-diffmnemonicPrefix)
configuration, resulting in empty output until I tracked down the issue.
I've opened #9269 to track that.

## Packages that have NEWS.md updates

```diff
--- c/golang/cosmos/CHANGELOG.md
+++ w/golang/cosmos/CHANGELOG.md
@@ -3,6 +3,21 @@
 All notable changes to this project will be documented in this file.
 See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
 
+## [0.35.0-u15.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/cosmos@0.35.0-u14.1...@agoric/cosmos@0.35.0-u15.0) (2024-04-20)
+
+
+### Features
+
+* upgrade zcf: install bundle and call updateZcfBundleId() ([74662d7](74662d7)), closes [#9250](#9250)
+* **cosmos:** Next upgrade is `agoric-upgrade-15` ([6a84bb1](6a84bb1))
+
+
+### Bug Fixes
+
+* various fixes and features for u15 ([21e6f7c](21e6f7c))
+
+
+
 ## [0.35.0-u14.1](https://github.com/gibson042/agoric-sdk/compare/@agoric/cosmos@0.35.0-u14.0...@agoric/cosmos@0.35.0-u14.1) (2024-03-12)
 
 
--- c/packages/smart-wallet/CHANGELOG.md
+++ w/packages/smart-wallet/CHANGELOG.md
@@ -3,6 +3,20 @@
 All notable changes to this project will be documented in this file.
 See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
 
+### [0.5.4-u15.0](https://github.com/Agoric/agoric/compare/@agoric/smart-wallet@0.5.4-u14.1...@agoric/smart-wallet@0.5.4-u15.0) (2024-04-20)
+
+
+### Features
+
+* **smart-wallet:** tryExitOffer reclaims withdrawn payments ([6f01f63](6f01f63))
+
+
+### Bug Fixes
+
+* in SmartWallet, if invitation is invalid, don't process offer ([29078f7](29078f7))
+
+
+
 ### [0.5.4-u14.1](https://github.com/Agoric/agoric/compare/@agoric/smart-wallet@0.5.4-u14.0...@agoric/smart-wallet@0.5.4-u14.1) (2024-03-12)
 
 **Note:** Version bump only for package @agoric/smart-wallet
--- c/packages/vats/CHANGELOG.md
+++ w/packages/vats/CHANGELOG.md
@@ -3,6 +3,15 @@
 All notable changes to this project will be documented in this file.
 See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
 
+### [0.15.2-u15.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/vats@0.15.2-u14.1...@agoric/vats@0.15.2-u15.0) (2024-04-20)
+
+
+### Features
+
+* upgrade zcf: install bundle and call updateZcfBundleId() ([74662d7](74662d7)), closes [#9250](#9250)
+
+
+
 ### [0.15.2-u14.1](https://github.com/Agoric/agoric-sdk/compare/@agoric/vats@0.15.2-u14.0...@agoric/vats@0.15.2-u14.1) (2024-03-12)
 
 **Note:** Version bump only for package @agoric/vats
--- c/packages/zoe/CHANGELOG.md
+++ w/packages/zoe/CHANGELOG.md
@@ -3,6 +3,15 @@
 All notable changes to this project will be documented in this file.
 See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
 
+### [0.26.3-u15.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/zoe@0.26.3-u14.0...@agoric/zoe@0.26.3-u15.0) (2024-04-20)
+
+
+### Bug Fixes
+
+* fix ZCF to not await in first crank ([8e289fd](8e289fd)), closes [#8911](#8911)
+
+
+
 ### [0.26.3-u14.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/zoe@0.26.3-u13.0...@agoric/zoe@0.26.3-u14.0) (2024-02-27)
 
 
```
@mergify mergify bot closed this as completed in #9355 May 28, 2024
mergify bot added a commit that referenced this issue May 28, 2024
…figurations (#9355)

Fixes #9269

## Description

Replace perl with awk and support `git diff` output with file prefixes
other than "a/" and "b/" (specifically, the "c/" and "w/" of
[`diff.mnemonicPrefix=true`](https://git-scm.com/docs/diff-config/2.9.5#Documentation/diff-config.txt-diffmnemonicPrefix)).

### Security Considerations

n/a

### Scaling Considerations

n/a

### Documentation Considerations

n/a

### Testing Considerations

Verified manually.

### Upgrade Considerations

This should be used in the "Create the release PR" step for all future
upgrades (cf.
[MAINTAINERS.md](https://github.com/Agoric/agoric-sdk/blob/master/MAINTAINERS.md#repos-sticky-header:~:text=have%2Dnews)).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant