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.1 into 3.2 #15886

Merged
merged 14 commits into from
Jul 10, 2023
Merged

Merge 3.1 into 3.2 #15886

merged 14 commits into from
Jul 10, 2023

Conversation

barrettj12
Copy link
Contributor

SimonRichardson and others added 14 commits June 30, 2023 20:25
The following allow migrating to a new version of juju without
explicitly stating the newer major version (3.x -> 4.x). Juju
shouldn't have to know about new major versions, so to fix this,
we check that it's not in the version map, before checking if we're
moving to a larger major version.

This is required as 3.1 has been ear marked as the last LTS before
releasing 4.0. The target controller will then validate where the
model is coming from, and ensure it's with it's own range before
allowing it to migrate.
The prior code had logic from the 2.9 branch. We can remove the
branching logic and just rely on the fact that the current version
can never downgrade.
This removes the hack to upgrade version, instead just remove all
source checks for source requests.
The following removes the target version from source prechecking.
The source check should __never__ know about the version it's moving
to. The source doesn't care. The target cares. Removing this logic
is the first step of cleaning all of this up. Inreality we should
send a big set of information for the target controller to validate.
Nothing should be checked on the source.
The following code is just not used anymore because we're no longer
checking the source.
…e-sink

juju#15876

There seems to be an issue with xenial on AWS, which seems to happen frequently in these jobs. Trying jammy to see if it is actually a xenial issue.

## QA steps

Run tests.

## Documentation changes

N/A

## Bug reference

https://jenkins.juju.canonical.com/job/test-cmr-test-offer-consume-aws/761/consoleText
…new-version

juju#15727

The following allows migrating to a new version of juju without explicitly stating the newer major version (3.x -> 4.x). Juju shouldn't have to know about new major versions, so to fix this requires removing the code that was recently added to pass the target controller version to the source pre-checks. In addition to this, I've also refactored the migration precheck context types to not allow target pre-check to explicitly know about model checking. This should prevent any target and source issues.

This is required as 3.1 was earmarked as the last LTS before releasing 4.0. The target controller will then validate where the model is coming from, and ensure it's within its own range before allowing it to migrate.

## 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

## QA steps

We require this [PR](juju#15715) one to land before we can fully test the workflow.

To ensure we didn't break any backward compatibility:

```sh
$ sudo snap install juju --channel 3.0/stable
$ juju bootstrap lxd test30
$ juju add-model default
$ juju deploy ubuntu
$ sudo snap remove juju --purge
$ make go-install
$ juju bootstrap lxd test31
$ juju switch controller
$ juju wait-for application controller
$ juju switch test30
$ juju wait-for application ubuntu
$ sleep 10
$ juju migrate default test31
$ juju switch test31
$ sleep 10
$ juju switch default
$ juju wait-for application ubuntu 
```
- add String() function to executeResults
- add GITHUB_TOKEN to workflow
juju#15883

Notify the *committer* instead of the commit *author*. This should fix the case where e.g. person X (committer) backports person Y's (author) commits. Person X should be notified here.

Furthermore, for each commit, check if it is already part of an open merge, and skip in this case.

Finally, some small QoL improvements to error log formatting.

Tested my changes locally and [here](https://github.com/barrettj12/juju/actions/runs/5502076733/jobs/10026091361).
juju#15884

Merges the following patches:
- juju#15883
- juju#15876

### Conflicts
- tests/suites/model/multi.sh
@barrettj12
Copy link
Contributor Author

/merge

@jujubot jujubot merged commit 967adcf into juju:3.2 Jul 10, 2023
20 of 21 checks passed
@barrettj12 barrettj12 deleted the merge-3.1-3.2-20230710 branch July 10, 2023 01:12
@barrettj12 barrettj12 mentioned this pull request Jul 10, 2023
jujubot added a commit that referenced this pull request Jul 11, 2023
@hpidcock hpidcock mentioned this pull request Jul 11, 2023
jujubot added a commit that referenced this pull request Jul 11, 2023
#15896

Forward ports:
- #15845
- #15725
- #15852
- #15854
- #15849
- #15855
- #15857
- #15861
- #15862
- #15860
- #15864
- #15825
- #15866
- #15863
- #15870
- #15871
- #15872
- #15873
- #15874
- #15876
- #15875
- #15881
- #15727
- #15883
- #15884
- #15880
- #15879
- #15886
- #15887
- #15877
- #15888
- #15893
- #15894

Conflicts:
- cmd/juju/ssh/debugcode_test.go
- cmd/juju/ssh/debughooks_test.go
- cmd/juju/ssh/scp_unix_test.go
- cmd/juju/ssh/ssh_machine.go
- cmd/juju/ssh/ssh_machine_test.go
- cmd/juju/ssh/ssh_unix_test.go
- worker/dbaccessor/worker.go
- caas/kubernetes/provider/k8s_test.go
- caas/kubernetes/provider/operator_test.go
- caas/kubernetes/provider/package_test.go
- caas/kubernetes/provider/rbac.go
- cmd/juju/application/deployer/bundlehandler.go
- cmd/juju/application/deployer/bundlehandler_test.go
- cmd/jujud/agent/model/manifolds.go
- core/bundle/changes/changes.go
- worker/caasapplicationprovisioner/application.go
- worker/caasapplicationprovisioner/application_test.go
- worker/caasapplicationprovisioner/mock_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
4 participants