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

Merge 3.2 to 3.3 #16461

Merged
merged 29 commits into from
Oct 19, 2023
Merged

Merge 3.2 to 3.3 #16461

merged 29 commits into from
Oct 19, 2023

Conversation

hpidcock and others added 29 commits October 13, 2023 11:57
juju#16426

Add mantic.

Bump critical packages:
- golang.org/x/crypto v0.13.0 => v0.14.0
- golang.org/x/net v0.15.0 => v0.17.0
- golang.org/x/oauth2 v0.6.0 => v0.13.0
- golang.org/x/sync v0.1.0 => v0.4.0
- golang.org/x/sys v0.12.0 => v0.13.0
- golang.org/x/tools v0.7.0 => v0.14.0
- google.golang.org/api v0.78.0 => v0.126.0
corecharm is explicitly github.com/juju/juju/core/charm. Very confusing
to see corecharm used for githubm.com/juju/charm. The two packages are
no way interchangable. Uniter has its own charm pkg.
…jujucharm

juju#16435

Rename corecharm to jujucharm on imports for worker/uniter. corecharm should be github.com/juju/juju/core/charm to be consistent with other juju code. Very confusing to see corecharm used for githubm.com/juju/charm. The two packages are no way interchangable. Uniter has its own charm pkg.

## QA steps
Successful unit test runs.
On the status command, when passing the --watch flag, we pass the entire
command line arguments (including 'juju status') along with all the
flags except --watch to viddy, which will run the command indefinitely
with an interval.

To do this, we must remove the --watch flag along with its value from
the list of OS arguments to be passed to viddy. This was incorrectly
done because it only accepted unix-style flags.

The fix is to remove both unix and gnu style when passing the watch
flag.
juju#16445

On the status command, when passing the --watch flag, we pass the entire command line arguments (including 'juju status') along with all the flags except --watch to viddy, which will run the command indefinitely with an interval.

To do this, we must remove the --watch flag along with its value from the list of OS arguments to be passed to viddy. This was incorrectly done because it only accepted unix-style flags.

The fix is to remove both unix and gnu style when passing the watch flag.

## Checklist

- [X] Code style: imports ordered, good names, simple structure, etc
- [X] Comments saying why design decisions were made
- [X] Go unit tests, with comments saying what you're testing
- [ ] ~[Integration tests](https://github.com/juju/juju/tree/main/tests), with comments saying what you're testing~
- [ ] ~[doc.go](https://discourse.charmhub.io/t/readme-in-packages/451) added or updated in changed packages~

## QA steps

After bootstrapping and adding a model, get the status with --watch on two different styles:
```
juju status --watch 1s --relations
juju status --watch=1s --relations 
```
also, 
```
go test github.com/juju/juju/cmd/juju/status/... -gocheck.v
```

## Links

**Launchpad bug:** https://bugs.launchpad.net/juju/+bug/2037914

**Jira card:** JUJU-4782
TestRemoteRelationProviderRoleConsumingSide around the arg copying for
macaroon comparison. We observed panics in CI testing.
…e-test

juju#16452

A panic was observed in CI for one of the firewaller worker cross-model tests.

This patch likely doesn't address the panic, but does make diagnosis easier via simpler comparisons. 

## QA steps

`TestRemoteRelationProviderRoleConsumingSide` in _worker/firewaller_ passes consistently.
The machine addition operations are not transactional, so we cannot be
deterministic about the changes we will observe in the cache.
juju#16451

This change improves the handling of errors returned from simplestreams datasource fetching. NotFound and Unauthorized are currently the only two recognised errors. Instead of ignoring connection errors, remote internal server errors, which lead to non-deterministic behaviour, this now treats unexpected errors as errors.

Additionally, this change implements small retry logic at the datasource level for unexpected errors to improve resilience to degraded network conditions.

This change also includes a drive-by fix to stop making live requests during TestNoWarn2xFirstRun.

## QA steps

This should fail, but can see it retries:
`juju boostrap aws --config image-metadata-url=https://not.worky --debug`

Try bootstrap lxd, then set image-metadata-url to https://not.worky, add machine, see failed provisioning, then unset image-metadata-url, retry provisioning, should work.
```
$ juju bootstrap localhost
$ juju model-config image-metadata-url=https://not.worky
$ juju add-machine --series jammy
$ juju status
<machine should be in error>
$ juju model-config --reset image-metadata-url
$ juju retry-provisioning 0
$ sleep <x>
$ juju status
<all happy>
```

## Documentation changes

N/A

## Links

Jenkins test failures due to failure to get image metadata
https://jenkins.juju.canonical.com/job/test-charmhub-test-charmhub-download-aws/1828/consoleText
https://jenkins.juju.canonical.com/job/test-constraints-test-constraints-common-google/1242/consoleText
https://jenkins.juju.canonical.com/job/test-spaces_ec2-test-upgrade-charm-with-bind-aws/1500/consoleText
https://jenkins.juju.canonical.com/job/test-unit-test-unit-series-aws/1241/consoleText
…e-test

juju#16453

The model cache test for adding a machine underwent some changes to fix failures on 3.2+ branches, but now we're seeing similar failures on 3.1.

Here we accrue said changes into this back-port.

## QA steps

`TestAddMachine` in _worker/modelcache_ passes consistently.
juju#16455

Merge from 3.1 to bring forward:
- juju#16453 from manadart/3.1-modelcache-add-machine-test
- juju#16452 from manadart/3.1-firewaller-CMR-consume-test
- juju#16445 from nvinuesa/juju-4782
- juju#16435 from hmlanigan/rename-uniter-corecharm-jujucharm

Trivial conflict in worker/modelcache/worker_test.go
juju#16456

Moves go from 1.20 to 1.21.

## QA steps

Unit tests + Github Actions + Watch jenkins

## Documentation changes

N/A

## Links

N/A
Conflicts:
- apiserver/facades/client/modelupgrader/upgrader_test.go
- core/base/supportedseries_linux_test.go
- core/base/supportedseries_test.go
- environs/bootstrap/bootstrap_test.go
- go.mod
- go.sum
- provider/openstack/local_test.go
- upgrades/upgradevalidation/migrate_test.go
- upgrades/upgradevalidation/upgrade_test.go
- upgrades/upgradevalidation/validation_test.go
juju#16457

Forward ports:
- juju#16426
- juju#16451
- juju#16456

Conflicts:
- apiserver/facades/client/modelupgrader/upgrader_test.go
- core/base/supportedseries_linux_test.go
- core/base/supportedseries_test.go
- environs/bootstrap/bootstrap_test.go
- go.mod
- go.sum
- provider/openstack/local_test.go
- upgrades/upgradevalidation/migrate_test.go
- upgrades/upgradevalidation/upgrade_test.go
- upgrades/upgradevalidation/validation_test.go
@hpidcock hpidcock added the 3.3 label Oct 19, 2023
Copy link
Member

@ycliuhw ycliuhw left a comment

Choose a reason for hiding this comment

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

LGTM, tyvm!

@hpidcock
Copy link
Member Author

/merge

@jujubot jujubot merged commit 0b4cd96 into juju:3.3 Oct 19, 2023
17 of 20 checks passed
@hpidcock hpidcock mentioned this pull request Oct 19, 2023
@ycliuhw ycliuhw mentioned this pull request Oct 19, 2023
jujubot added a commit that referenced this pull request Oct 20, 2023
#16462

Forward ports:
- #16426
- #16435
- #16445
- #16452
- #16451
- #16453
- #16455
- #16456
- #16457
- #16460
- #16461

Conflicts:
- apiserver/facades/agent/provisioner/imagemetadata_test.go
- environs/bootstrap/bootstrap.go
- environs/simplestreams/datasource.go
- environs/simplestreams/datasource_test.go
- go.sum
- worker/dbaccessor/package_test.go
- worker/firewaller/firewaller_test.go
- worker/modelcache/worker_test.go
- worker/uniter/charm/bundles_test.go
- worker/uniter/uniter_test.go
- worker/uniter/util_test.go
- cmd/juju/status/status_internal_test.go
jujubot added a commit that referenced this pull request Oct 23, 2023
#16470

Merge branch `3.3` into `main`:
- #16426
- #16435
- #16445
- #16452
- #16451
- #16453
- #16455
- #16456
- #16457
- #16460
- #16461
- #16454
- #16394
- #16469

```
# Conflicts:
# apiserver/common/secrets/access.go
# apiserver/common/secrets/access_test.go
# apiserver/common/secrets/drain.go
# apiserver/common/secrets/drain_test.go
# apiserver/common/secrets/mocks/commonsecrets_mock.go
# apiserver/common/secrets/watcher.go
# apiserver/common/secrets/watcher_test.go
# apiserver/facades/agent/provisioner/imagemetadata_test.go
# apiserver/facades/agent/secretsdrain/mocks/modelstate.go
# apiserver/facades/agent/secretsdrain/mocks/secretsprovider.go
# apiserver/facades/agent/secretsdrain/package_test.go
# apiserver/facades/agent/secretsdrain/register.go
# apiserver/facades/agent/secretsdrain/state.go
# cmd/jujud/agent/caasoperator/manifolds.go
# environs/bootstrap/bootstrap.go
# environs/simplestreams/datasource.go
# environs/simplestreams/datasource_test.go
# go.sum
# worker/dbaccessor/package_test.go
# worker/firewaller/firewaller_test.go
# worker/modelcache/worker_test.go
# worker/secretsdrainworker/manifold.go
# worker/secretsdrainworker/manifold_test.go
# worker/secretsdrainworker/package_test.go
# worker/uniter/charm/bundles_test.go
# worker/uniter/uniter_test.go
# worker/uniter/util_test.go
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants