Skip to content

Conversation

@lucymhdavies
Copy link
Contributor

@lucymhdavies lucymhdavies commented Dec 2, 2024

Given #42 's root cause issue shows no sign of being addressed, just don't run mas account anymore

Then I'm implementing #49 (comment)

Given borksh#42 's root cause issue shows
no sign of being addressed, just don't run `mas account` anymore
@github-actions github-actions bot added the types Relates to types and assertions, i.e. not the core Bork code label Dec 2, 2024
github-actions[bot]
github-actions bot previously approved these changes Dec 2, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

1 Warning
⚠️ Are you sure we don't need to add/update tests?

Generated by 🚫 Danger

@github-actions
Copy link

github-actions bot commented Dec 2, 2024

1 Warning
⚠️ This PR does not refer to an existing milestone

Generated by 🚫 Danger

@lucymhdavies
Copy link
Contributor Author

Looking into the failed Checks...

not ok 230 mas status: returns FAILED_PRECONDITION when logged out
# (in test file test/type-mas.bats, line 23)
#   `[ "$status" -eq $STATUS_FAILED_PRECONDITION ]' failed

Yeah, that makes sense. I'll have to remove that test too.

Given we're no longer checking if the user has logged in, then the first
of these removed tests will always fail.

The second two are redundant.
github-actions[bot]
github-actions bot previously approved these changes Dec 30, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

✅ Nice work.
Are you sure we don't need to add/update tests?

Generated by 🚫 Danger

@lucymhdavies
Copy link
Contributor Author

Well... now this is a weird one, that wasn't broken before...

not ok 170 file compile: echoes base64 representation to screen
# (in test file test/type-file.bats, line 122)
#   `expected="borkfiles__UmVhZG1lLm1kCg=\"$(base64 Readme.md)\""' failed with status 64
# base64: invalid argument Readme.md
# Usage:	base64 [-Ddh] [-b num] [-i in_file] [-o out_file]
#   -b, --break    break encoded string into num character lines
#   -Dd, --decode   decodes input
#   -h, --help     display this message
#   -i, --input    input file (default: "-" for stdin)
#   -o, --output   output file (default: "-" for stdout)
ok 171 file compile: outputs warning to stderr on missing file
not ok 172 file status: if compiled, uses stored variable
# (in test file test/type-file.bats, line 142)
#   `borkfiles__cGF0aC9mcm9tL3NvdXJjZQo="$(base64 Readme.md)"' failed with status 64
# base64: invalid argument Readme.md
# Usage:	base64 [-Ddh] [-b num] [-i in_file] [-o out_file]
#   -b, --break    break encoded string into num character lines
#   -Dd, --decode   decodes input
#   -h, --help     display this message
#   -i, --input    input file (default: "-" for stdin)
#   -o, --output   output file (default: "-" for stdout)
not ok 173 file install: if compiled, uses stored variable
# (in test file test/type-file.bats, line 150)
#   `borkfiles__cGF0aC9mcm9tL3NvdXJjZQo="$(base64 Readme.md)"' failed with status 64
# base64: invalid argument Readme.md
# Usage:	base64 [-Ddh] [-b num] [-i in_file] [-o out_file]
#   -b, --break    break encoded string into num character lines
#   -Dd, --decode   decodes input
#   -h, --help     display this message
#   -i, --input    input file (default: "-" for stdin)
#   -o, --output   output file (default: "-" for stdout)

That one didn't fail on the previous run, on a similar macOS version
https://github.com/borksh/bork/actions/runs/12126958117/job/33810162265

$ bats --tap test/

fails on my machine also, and in the same way

… past 11 months

Previously, fails on macOS:

```
 not ok 173 file install: if compiled, uses stored variable
 # (in test file test/type-file.bats, line 150)
 #   `borkfiles__cGF0aC9mcm9tL3NvdXJjZQo="$(base64 Readme.md)"' failed with status 64
 # base64: invalid argument Readme.md
 # Usage:	base64 [-Ddh] [-b num] [-i in_file] [-o out_file]
 #   -b, --break    break encoded string into num character lines
 #   -Dd, --decode   decodes input
 #   -h, --help     display this message
 #   -i, --input    input file (default: "-" for stdin)
 #   -o, --output   output file (default: "-" for stdout)
```

(although, why it worked fine 11 months ago, i have no idea)

New syntax for the base64 part of the test should work the same on both
Darwin and Linux
@lucymhdavies
Copy link
Contributor Author

ah, it's one of those tests. one of those "how did this ever work?!" kind of tests.

Because indeed, base64 Readme.md fails on macOS, because on macOS we need to do base64 -i Readme.md

Whereas the linux version... https://linux.die.net/man/1/base64 just takes the filename.

(the answer to how it ever worked is probably that the GitHub Runner now runs a newer macOS version than it did 11 months ago, and previously it somehow had linux-flavor base64)

Thankfully, cat Readme.md | base64 should work in both

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

✅ Jolly good show.
Are you sure we don't need to add/update tests?

Generated by 🚫 Danger

@lucymhdavies
Copy link
Contributor Author

lucymhdavies commented Dec 30, 2024

@skylarmacdonald : Ready for review :)

@skylarmacdonald
Copy link
Member

LGTM! Thanks for taking this on.

@skylarmacdonald skylarmacdonald merged commit 9df2f54 into borksh:main Dec 30, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

types Relates to types and assertions, i.e. not the core Bork code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants