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

Remove unused functions + drop series before focal #22

Merged

Conversation

jack-w-shaw
Copy link
Member

@jack-w-shaw jack-w-shaw commented Apr 12, 2024

We wish to remove the concept of a series from the juju extended codebase. Series is something that juju/packaging relies on quite heavily

We can change this by removing a number of unused functions/methods which take in series as parameters.

Also, since we no longer support series before focal, we can take out a lot of the special cases and make the PackingingConfigurers series agnostic

NOTE:
RequiresBackport is used in 1 place in juju/juju, but since RequiresBackport always returns false for the supported bases, we can still drop it

QA Steps

Compile into juju by checking out juju/juju#17194
NOTE: You will have to change the replace line to point to where you have clone this PR

and run make install

Then:

$ juju bootstrap aws aws
$ juju add-model m
$ juju add-machine
$ juju add-machine lxd:0
$ juju add-machine lxd:0 --base [email protected]
(wait)
$ juju status
Model  Controller  Cloud/Region   Version      SLA          Timestamp
m      aws         aws/eu-west-2  3.5-beta1.1  unsupported  13:25:13+01:00

Machine  State    Address         Inst id              Base          AZ          Message
0        started  18.170.114.179  i-0a1c12a72964544fe  [email protected]  eu-west-2c  running
0/lxd/0  started  252.41.183.122  juju-d23f30-0-lxd-0  [email protected]  eu-west-2c  Container started
0/lxd/1  started  252.41.183.143  juju-d23f30-0-lxd-1  [email protected]  eu-west-2c  Container started

We wish to remove the concept of a series from the juju extended
codebase. Series is something that juju/packaging relies on quite
heavily

We can change this by removing a number of unused functions/methods
which take in series as parameters.

Also, since we no longer support series before focal, we can take out a
lot of the special cases and make the PackingingConfigurers series
agnostic
@jack-w-shaw jack-w-shaw force-pushed the JUJU-4948_remove_unused_series_function branch from a2c4439 to ebe0361 Compare April 12, 2024 11:59
Copy link
Member

@SimonRichardson SimonRichardson left a comment

Choose a reason for hiding this comment

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

As this is a breaking change, make the version in go.mod v3 and update all the imports to v3.

@jack-w-shaw
Copy link
Member Author

As this is a breaking change, make the version in go.mod v3 and update all the imports to v3.

Done

@jack-w-shaw jack-w-shaw requested a review from hmlanigan April 15, 2024 16:40

// ubuntuToCentOSPackageNameMap is a map for converting package names from their
// names in Ubuntu repositories to their equivalent CentOS names.
var ubuntuToCentOSPackageNameMap = map[string]string{
Copy link
Member

Choose a reason for hiding this comment

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

This looks like a miss-feature. We probably shouldn't have added this in the first place.

@jack-w-shaw jack-w-shaw merged commit 0573320 into juju:master Apr 16, 2024
3 checks passed
@jack-w-shaw jack-w-shaw deleted the JUJU-4948_remove_unused_series_function branch April 16, 2024 14:06
jujubot added a commit to juju/juju that referenced this pull request Apr 17, 2024
…n_packaging

#17194

juju/packaging v3 no longer uses series in a bunch of places

See the changes to juju/packaging here:
juju/packaging#22

Fix places where we use function from packagings which no taek a series
param

This drops our external dependency on series, so start pushing bases to
replace series up the stack

In most places, we're blocked by HostSeries. We are soon to replace this
with HostBase, which would elimate series entirely in a bunch of places

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

```
$ juju bootstrap aws aws
$ juju add-model m
$ juju add-machine
$ juju add-machine lxd:0
$ juju add-machine lxd:0 --base [email protected]
(wait)
$ juju status
Model Controller Cloud/Region Version SLA Timestamp
m aws aws/eu-west-2 3.5-beta1.1 unsupported 13:25:13+01:00

Machine State Address Inst id Base AZ Message
0 started 18.170.114.179 i-0a1c12a72964544fe [email protected] eu-west-2c running
0/lxd/0 started 252.41.183.122 juju-d23f30-0-lxd-0 [email protected] eu-west-2c Container started
0/lxd/1 started 252.41.183.143 juju-d23f30-0-lxd-1 [email protected] eu-west-2c Container started
```

## Links

**Jira card:** https://warthogs.atlassian.net/browse/JUJU-4948
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.

3 participants