{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":130685543,"defaultBranch":"main","name":"juju","ownerLogin":"SimonRichardson","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2018-04-23T11:21:20.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/2562584?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1723825901.0","currentOid":""},"activityList":{"items":[{"before":null,"after":"fbc9a4b22dc9cef2ae08a6cc574fcbace6d641f3","ref":"refs/heads/remove-environ-getter","pushedAt":"2024-08-16T16:31:41.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"},"commit":{"message":"feat: start to remove environ config getter\n\nStart to remove the environ config getter from the facades.","shortMessageHtmlLink":"feat: start to remove environ config getter"}},{"before":"c65cd1593acc23189ea773bef239ff9a5c4f1632","after":"19872488930cbf5447e55aa6c743d20db6d3c79b","ref":"refs/heads/main","pushedAt":"2024-08-16T08:49:50.000Z","pushType":"push","commitsCount":10,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"},"commit":{"message":"Merge pull request #17926 from SimonRichardson/state-base-context-run\n\nhttps://github.com/juju/juju/pull/17926\n\nRunAtomic starts to add the ability to call discrete state methods within a transaction scope, without exposing the underlying transaction implementation at the service layer.\n\nIt solves the problem of trying to execute business logic at the service layer without exposing sql.Tx or sqlair.TX types. The AtomicContext interface type is a typed context.Context that can be provided as a parameter to the Run closure.\n\nThe RunAtomic method gets a DB and then creates a transaction. Within that transaction, a txContext is then created that captures both the context and the sqlair.TX. This tuple can then be passed as an argument to the closure. The txContext ensures that the sqlair.TX can only be within the closure for the lifetime of the transaction. This is to prevent capturing the AtomicContext and using it outside of the RunAtomic method. This type of usage will cause an error later on in the state code if someone does attempt to use it. The tuple was defined this way, as it's not possible to modify a generic context.Value without creating a new context, or creating a bespoke implementation. Thus the tuple presents the best approach to ensuring safety and easy access.\n\nIt should be noted that because of go invariance it's not possible to swap a RunAtomic closure for the following type:\n\n st.RunAtomic(ctx, func(ctx context.Context) error { ... })\n\nThis will simply not compile. The RunAtomic function must be of instance type:\n\n st.RunAtomic(ctx, func(txCtx AtomicContext) error { ... })\n\nLastly, I've added a note that the AtomicContext implementation (txContext) can be pooled[1] to keep the allocations of the txContext low. That is not part of this changeset and can be done in future work.\n\n 1. https://pkg.go.dev/sync#Pool\n\n\n\n\n\n## Checklist\n\n\n\n- [x] Code style: imports ordered, good names, simple structure, etc\n- [x] Comments saying why design decisions were made\n- [x] Go unit tests, with comments saying what you're testing\n\n## QA steps\n\nNothing is using this, more patches will be added to build upon this infrastructure. \n\n## Links\n\n\n**Jira card:** JUJU-","shortMessageHtmlLink":"Merge pull request juju#17926 from SimonRichardson/state-base-context…"}},{"before":"ea5fca4fa020343a7d21f03b024953716104aa0a","after":null,"ref":"refs/heads/state-base-context-run","pushedAt":"2024-08-16T08:39:58.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"}},{"before":"c094908b766910b6dd1279259ca94476e22c6fc7","after":"ea5fca4fa020343a7d21f03b024953716104aa0a","ref":"refs/heads/state-base-context-run","pushedAt":"2024-08-16T08:17:44.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"},"commit":{"message":"refactor: rename clear to close\n\nClose the context vs clear the context.","shortMessageHtmlLink":"refactor: rename clear to close"}},{"before":"8d69585d408ac67224c8487bb4718245b1e2585b","after":"c094908b766910b6dd1279259ca94476e22c6fc7","ref":"refs/heads/state-base-context-run","pushedAt":"2024-08-16T08:12:53.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"},"commit":{"message":"refactor: rename clear to close\n\nClose the context vs clear the context.","shortMessageHtmlLink":"refactor: rename clear to close"}},{"before":"3c7d100d39704c66d711519132657af35ea0cb37","after":"c65cd1593acc23189ea773bef239ff9a5c4f1632","ref":"refs/heads/main","pushedAt":"2024-08-15T19:34:16.000Z","pushType":"push","commitsCount":13,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"},"commit":{"message":"Merge pull request #17862 from jack-w-shaw/JUJU-6447_ports_state_layer\n\nhttps://github.com/juju/juju/pull/17862\n\nAfter inspecting our current usage of opened ports in MongoDB, I have\ncome to the conclusion that the new state layer only needs two\nfunctions.\n\nOne to open and/or close ports on a particular unit, across that unit's\nendpoints, and another one to get the opened ports of a unit across it's\nvarious endpoints.\n\nI have done this by adding a PortRanges type into core/network, which\nrepresents a slice of PortRange, along with a constructor + methods\nwhich merge port ranges, ensure they're sorted, etc.\n\n\nI have not yet implemented a system to reconcile the global endpoint\n(represented by the empty string). I suspect this can be handled\nentirely within the service layer.\n\nThe same for the grouping of units by machine / applications. I suspect this\nwill no longer need to be done\n\nAs a flyby, rename 0022-resource.sql to 0023-resource.sql\n\n## Checklist\n\n- [x] Code style: imports ordered, good names, simple structure, etc\n- [x] Comments saying why design decisions were made\n- [x] Go unit tests, with comments saying what you're testing\n- [ ] [Integration tests](https://github.com/juju/juju/tree/main/tests), with comments saying what you're testing\n- [ ] [doc.go](https://discourse.charmhub.io/t/readme-in-packages/451) added or updated in changed packages\n\n## QA steps\n\nUnit test pass","shortMessageHtmlLink":"Merge pull request juju#17862 from jack-w-shaw/JUJU-6447_ports_state_…"}},{"before":"0c8a78edf4487cc7c1f8ce6fb05c22e4aa9e92e2","after":"8d69585d408ac67224c8487bb4718245b1e2585b","ref":"refs/heads/state-base-context-run","pushedAt":"2024-08-15T16:32:56.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"},"commit":{"message":"refactor: rename clear to close\n\nClose the context vs clear the context.","shortMessageHtmlLink":"refactor: rename clear to close"}},{"before":"d4d23110ac078dac5cefe1ee809ce2be438d6408","after":"0c8a78edf4487cc7c1f8ce6fb05c22e4aa9e92e2","ref":"refs/heads/state-base-context-run","pushedAt":"2024-08-15T16:31:35.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"},"commit":{"message":"refactor: drop tx in favour of atomic - drop me\n\nRename tx in favour of atomic. This patch will be dropped before\nlanding.","shortMessageHtmlLink":"refactor: drop tx in favour of atomic - drop me"}},{"before":"e716fb01df5d82d02a3fd9527ffde31d4539b80d","after":"6772899098c08f3ab8a996ec9756c00c601cca06","ref":"refs/heads/3.5","pushedAt":"2024-08-15T08:55:55.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"},"commit":{"message":"Merge pull request #17929 from hmlanigan/update-juju-client-backup-download\n\nhttps://github.com/juju/juju/pull/17929\n\nRather than a 404 message, print a nice error message if attempting to download a backup archive from a 4.0 controller, or any other which does not support the action.\n\n## Checklist\n\n- [ ] Code style: imports ordered, good names, simple structure, etc\n- [ ] Comments saying why design decisions were made\n- [ ] Go unit tests, with comments saying what you're testing\n- [ ] [Integration tests](https://github.com/juju/juju/tree/main/tests), with comments saying what you're testing\n- [ ] [doc.go](https://discourse.charmhub.io/t/readme-in-packages/451) added or updated in changed packages\n\n## QA steps\n\nIf it hasn't been merged into main yet, use #17928 to bootstrap juju.\n\n```\n# Bootstrap juju from #17928 unless it's already merged. In that case use juju 4.0.\n$ juju bootstrap lxd no-backup-download\n\n# using the juju client built from this PR\n$ juju download-backup -m controller /tmp/testme\nDownload of backup archive files is not supported by this controller.\n```\n\n## Links\n\n**Jira card:** JUJU-6470","shortMessageHtmlLink":"Merge pull request juju#17929 from hmlanigan/update-juju-client-backu…"}},{"before":"16904deeac8987452b22295a4a13f88898f20c93","after":"d4d23110ac078dac5cefe1ee809ce2be438d6408","ref":"refs/heads/state-base-context-run","pushedAt":"2024-08-14T19:39:09.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"},"commit":{"message":"feat: implement run tx example\n\nTo prove out an example of run tx and to ensure that the workflow\ncorrectly works. The DeleteApplication at the service level was\nused. This has the potential to be a good candidate for using this\ntype of change (tbh: set charm is a REALLY good example of wanting\nto move to this model, but that would require a lot of code changes\nand wouldn't be a good example to just show people).\n\nWhat did I learn when implementing this?\n\n 1. This feels (emphasis on emotion and not logic here), really,\n really nice to use. I feel like I can explain what the service\n is doing, without have to understand what state is hiding.\n\n Discrete methods on state hide complexity and business logic\n rises. This is a good thing.\n\n 2. Testing the state layer feels easy.\n\n 3. Testing the service layer is harder. How do we test the logic\n in the closure easily. This isn't to do with a transaction, it\n is just hard to test closures with mocks. What is our plan here?\n\n 4. It feels too easy to shove a call to the provider in this\n closure. It's so damn easy to see what's going on. I feel like\n I could just call a function to the provider. This feels like\n the biggest concern for me.\n\nNot withstanding point 4, I like it.","shortMessageHtmlLink":"feat: implement run tx example"}},{"before":"1d06fa9bd08021ab010be45fd57e36633a901188","after":"16904deeac8987452b22295a4a13f88898f20c93","ref":"refs/heads/state-base-context-run","pushedAt":"2024-08-14T18:55:53.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"},"commit":{"message":"feat: execute run tx context\n\nNow that we have a TxContext we need to be able to run it. The\npackage level Run method allows the unpacking of a txContext and\nexposes the two parts of the tuple. It provides consistency\nchecks to ensure that the user isn't doing the wrong thing, and\nthen executes the closure.\n\nThe CoerceError at the end prevents the leaking of sql errors\nto the service layer.\n\nThe Run function could be a method on the StateBase if we're looking\nto track logs and metrics, but currently all the metrics and logs\nare captured by the database/transaction package.","shortMessageHtmlLink":"feat: execute run tx context"}},{"before":"9af2aa6720f56518b1510b8d3cdce89e1d77116c","after":"1d06fa9bd08021ab010be45fd57e36633a901188","ref":"refs/heads/state-base-context-run","pushedAt":"2024-08-14T18:17:39.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"},"commit":{"message":"refactor: rename db to tx for context changes\n\nRenames DBContext to TxContext. This is to imply that the closure\nis being run as a transaction, not against a database directly.","shortMessageHtmlLink":"refactor: rename db to tx for context changes"}},{"before":"3caf79988f00523ddf0a19930f00dfdaf87e393c","after":"9af2aa6720f56518b1510b8d3cdce89e1d77116c","ref":"refs/heads/state-base-context-run","pushedAt":"2024-08-14T18:11:42.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"},"commit":{"message":"feat: state base run transaction\n\nRun starts to add the ability to call discrete state methods within\na transaction scope, without exposing the underlying transaction\nimplementation at the service layer.\n\nIt solves the problem of trying to execute business logic at the\nservice layer without exposing sql.Tx or sqlair.TX types. The\nDBContext interface type is a typed context.Context that can be\nprovided as paramter to the Run closure.\n\nThe Run method gets a DB and then creates a transaction. Within\nthat transaction a dbContext is then created which captures both\nthe context and the sqlair.TX. This tuple can then be passed as\nan argument to the closure. The dbContext ensures that the sqlair.TX\ncan only be within the closure for the lifetime of the transaction.\nThis is to prevent capturing the DBContext and using it outside of\nthe Run method. This will cause a error later on in the state\ncode. The tuple was deinfed in this way, as it's not possible to\nmodify a generic context.Value without creating a new context, or\ncreating a bespoke impelementation. Thus the tuple presents the\nbest approach of ensuring safety and easy access.\n\nIt should be noted that because of go invariance it's not possible\nto swap a Run closure for the following type:\n\n st.Run(ctx, func(ctx context.Context) error { ... })\n\nThis will simply not compile. The Run function must be of instance\ntype:\n\n st.Run(ctx, func(dbCtx DBContext) error { ... })\n\nLastly, I've added a note that the DBContext implementation (dbContext)\ncan be pooled[1] to keep the allocations of the dbContext low. That\nis not part of this changeset and can be done in future work.\n\n 1. https://pkg.go.dev/sync#Pool","shortMessageHtmlLink":"feat: state base run transaction"}},{"before":null,"after":"3caf79988f00523ddf0a19930f00dfdaf87e393c","ref":"refs/heads/state-base-context-run","pushedAt":"2024-08-14T16:38:29.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"},"commit":{"message":"feat: state base run transaction\n\nRun starts to add the ability to call discrete state methods within\na transaction scope, without exposing the underlying transaction\nimplementation at the service layer.\n\nIt solves the problem of trying to execute business logic at the\nservice layer without exposing sql.Tx or sqlair.TX types. The\nDBContext interface type is a typed context.Context that can be\nprovided as paramter to the Run closure.\n\nThe Run method gets a DB and then creates a transaction. Within\nthat transaction a dbContext is then created which captures both\nthe context and the sqlair.TX. This tuple can then be passed as\nan argument to the closure. The dbContext ensures that the sqlair.TX\ncan only be within the closure for the lifetime of the transaction.\nThis is to prevent capturing the DBContext and using it outside of\nthe Run method. This will cause a error later on in the state\ncode. The tuple was deinfed in this way, as it's not possible to\nmodify a generic context.Value without creating a new context, or\ncreating a bespoke impelementation. Thus the tuple presents the\nbest approach of ensuring safety and easy access.\n\nIt should be noted that because of go invariance it's not possible\nto swap a Run closure for the following type:\n\n st.Run(ctx, func(ctx context.Context) error { ... })\n\nThis will simply not compile. The Run function must be of instance\ntype:\n\n st.Run(ctx, func(dbCtx DBContext) error { ... })\n\nLastly, I've added a note that the DBContext implementation (dbContext)\ncan be pooled[1] to keep the allocations of the dbContext low. That\nis not part of this changeset and can be done in future work.\n\n 1. https://pkg.go.dev/sync#Pool","shortMessageHtmlLink":"feat: state base run transaction"}},{"before":"96ba82f690c9bcdd0b5ef47db1decefa2ecdd86a","after":"3c7d100d39704c66d711519132657af35ea0cb37","ref":"refs/heads/main","pushedAt":"2024-08-14T11:38:03.000Z","pushType":"push","commitsCount":30,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"},"commit":{"message":"Merge pull request #17917 from juju/increment-to-4.0-beta5\n\nhttps://github.com/juju/juju/pull/17917\n\nchore: increment juju to 4.0-beta5","shortMessageHtmlLink":"Merge pull request juju#17917 from juju/increment-to-4.0-beta5"}},{"before":"f6084595e1b2913a612c278c5b366443d3076761","after":"18acb104c576eb2e179e889105652297fd54a936","ref":"refs/heads/model-logger","pushedAt":"2024-08-13T21:11:25.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"},"commit":{"message":"feat: model logger","shortMessageHtmlLink":"feat: model logger"}},{"before":null,"after":"f6084595e1b2913a612c278c5b366443d3076761","ref":"refs/heads/model-logger","pushedAt":"2024-08-13T20:51:59.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"},"commit":{"message":"feat: model logger","shortMessageHtmlLink":"feat: model logger"}},{"before":"ba73a48836efa20b0bf666dea1449e02bcc8f84d","after":null,"ref":"refs/heads/api-client-context-aware","pushedAt":"2024-08-13T20:11:14.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"}},{"before":"fbb927ebb60cbdd3fa461c5b693fef9e578482d0","after":"ba73a48836efa20b0bf666dea1449e02bcc8f84d","ref":"refs/heads/api-client-context-aware","pushedAt":"2024-08-13T19:48:01.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"},"commit":{"message":"fix: dynamic patch values are the worst","shortMessageHtmlLink":"fix: dynamic patch values are the worst"}},{"before":"3faf37d20128a9271ec146a8f4bcc4b21a408d80","after":"fbb927ebb60cbdd3fa461c5b693fef9e578482d0","ref":"refs/heads/api-client-context-aware","pushedAt":"2024-08-13T19:27:01.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"},"commit":{"message":"chore: context aware api client package\n\nThis is the final work in a long running effort to make the api\npackages context aware. Prior to this set of changes, both the\ncontroller and agent api packages were changed to use the context\npackage. This moves everything across.\n\nThis unlocks a lot of potential for numerous reasons:\n\n 1. Tracing thoughout the code base should now be possible for wiring\n up. There are some parts of the code base that is already setup\n it requires more workers to create trace roots to full complete\n this move.\n 2. Log output can now include a trace id, once the logger accepts\n a context.\n 3. Model loggers based on the context. Instead of having multiple\n loggers everywhere, we have one logger that can handle multiple\n models. Only on output do we write the log or not. This is\n required for status history.\n\nThe code is just one big labourious change. Adding a context.Context\nto every api/client method. Fun times.","shortMessageHtmlLink":"chore: context aware api client package"}},{"before":"17bffd69d0d6a01e41d13e6cd0a1abf42700e1c8","after":"ea6aee4ed5ed15b4a401b04c599f98ecd3280b0e","ref":"refs/heads/expose-application-get-charm","pushedAt":"2024-08-13T16:51:42.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"},"commit":{"message":"feat: use services for charm retrieval\n\nWe can use the charm and application services to get the charm\ninformation without using state.","shortMessageHtmlLink":"feat: use services for charm retrieval"}},{"before":"491f27d5462e6b4e77e32608c4d46a712c0bf509","after":"17bffd69d0d6a01e41d13e6cd0a1abf42700e1c8","ref":"refs/heads/expose-application-get-charm","pushedAt":"2024-08-13T15:17:45.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"},"commit":{"message":"feat: add get application charm\n\nApplicationCharmInfo in the apiserver package requires the whole\ncharm package to be sent back, including the lxd profile. This is\nsomewhat painful, as it has no guarantees to exactly look like\nthe charm metadata (et al). However this is a requirement to keep\nAPI compatability.\n\nThe code has to be moved to the commonStateBase to be able to\nbe read from the other service. I think potentially we should just\nhave one service, as the cross over is large.","shortMessageHtmlLink":"feat: add get application charm"}},{"before":"8f803fc610e25ac525ebb628e4704a287f2b59e3","after":null,"ref":"refs/heads/import-domain-charm","pushedAt":"2024-08-13T12:51:54.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"}},{"before":"a443050e1267792c7e203885f954d8ac2d2be416","after":"e716fb01df5d82d02a3fd9527ffde31d4539b80d","ref":"refs/heads/3.5","pushedAt":"2024-08-13T12:37:18.000Z","pushType":"push","commitsCount":189,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"},"commit":{"message":"Merge pull request #17904 from hpidcock/merge-3.4-3.5-20240812\n\nhttps://github.com/juju/juju/pull/17904\n\nForward ports:\n- #17756\n- #17700\n- #17772\n- #17747\n- #17789\n- #17792\n- #17788\n- #17793\n- #17794\n- #17811\n- #17816\n- #17825\n- #17826\n- #17867\n- #17871\n- #17868\n- #17870\n- #17877\n- #17879\n- #17896\n- #17901\n- #17903\n\nConflicts:\n- cmd/modelcmd/base.go\n- go.sum\n- scripts/win-installer/setup.iss\n- snap/snapcraft.yaml\n- version/version.go","shortMessageHtmlLink":"Merge pull request juju#17904 from hpidcock/merge-3.4-3.5-20240812"}},{"before":"956c85e0fb829a90207a0b118d035eb948bbea6f","after":"96ba82f690c9bcdd0b5ef47db1decefa2ecdd86a","ref":"refs/heads/main","pushedAt":"2024-08-13T10:20:31.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"},"commit":{"message":"Merge pull request #17775 from Aflynn50/usename-type-in-access\n\nhttps://github.com/juju/juju/pull/17775\n\nAdd a new type to represent a username. Before this PR, juju user names\nwere represented either as a tag, or as a string. The tag represented\nthem as two distinct parts, the domain, and the username. For example,\n`alastair@somewhere`. The part after the `@` is the domain. When the access\nservice was initially implemented, only the part before the domain was\nused. i.e. just the user name. However, it was quickly relised that the\ndomain would also be needed, or external and internal users would get\nlumped together when they should not be.\n\nThis meant that to pass a username into domain you had to do\n`userTag.Id()`, and NOT `userTag.Name()`. Using the Name would cause issues\nwith external users that were often missed in testing.\n\nLater on, handling of external users was explicitly added to the access domain.\nThis meant that the external users had to be distinguished from the local\nusers. This meant re-parsing the username string inside the domain to\ndetermine if there was a domain included and if it was an external\ndomain.\n\nBoth of these together meant that usernames could be a serious cause of\nbugs.\n\nTo fix this, this PR adds a user.Name type that represents a username\nand has a `.IsLocal` method. It enforces type correctness around\nusernames and removes the need for a lot of checks on user names. There\nis a function to convert a tag into a user.Name type.\n\n\n#### Where are the primary changes?\nThe main content for this PR is in `core/user`. Thats where the new type is.\nThere are also some changes to the `keymanager` files in the apiserver. This is changed to store a `UserTag` rather than a `Tag` in the struct. Previously, each method checked that the the tag was a user one, now it does it on the creation of the facade.\nLogs were added to the model info state. (`modelstate.go`)\nThe other changes were generally all just test fixes or piping through. \n\n\n\n\n\n## Checklist\n\n\n\n- [x] Code style: imports ordered, good names, simple structure, etc\n- [x] Comments saying why design decisions were made\n- [x] Go unit tests, with comments saying what you're testing\n~- [ ] [Integration tests](https://github.com/juju/juju/tree/main/tests), with comments saying what you're testing~\n~- [ ] [doc.go](https://discourse.charmhub.io/t/readme-in-packages/451) added or updated in changed packages~\n\n## QA steps\n```\n$ juju bootstrap lxd test-user-name\n$ juju add-model default\n$ juju add-user fred\n$ juju add-user \"\"\n$ juju users\nName Display name Access Date created Last connection\nadmin* admin superuser 27 minutes ago just now\njuju-metrics Juju Metrics login 27 minutes ago never connected\nfred login 19 seconds ago never connected\n$ juju grant fred superuser\n$ juju change-user-password\n$ juju change-user-password fred\n$ juju logout\n$ juju login -u fred\nplease enter password for fred on test-user-name: \nWelcome, fred. You are now logged into \"test-user-name\".\n\nThere are 2 models available. Use \"juju switch\" to select\none of them:\n - juju switch admin/controller\n - juju switch admin/default\n$ juju models --all\nController: test-user-name\n\nModel Cloud/Region Type Status Access Last connection\nadmin/controller lxd/default lxd - - never connected\nadmin/default* lxd/default lxd - - never connected\n$ juju users\nController: test-user-name\n\nName Display name Access Date created Last connection\nadmin admin superuser 4 minutes ago 22 seconds ago\njuju-metrics Juju Metrics login 3 minutes ago never connected\nfred* superuser 34 seconds ago just now\n\n\n```\n\n\n\n## Documentation changes\n\n\n\n## Links\n\n\n\n**Launchpad bug:** https://bugs.launchpad.net/juju/+bug/\n\n**Jira card:** [JUJU-6460](https://warthogs.atlassian.net/browse/JUJU-6460)\n\n\n[JUJU-6460]: https://warthogs.atlassian.net/browse/JUJU-6460?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ","shortMessageHtmlLink":"Merge pull request juju#17775 from Aflynn50/usename-type-in-access"}},{"before":"192ece17b193ad8f0f6baeec1bbea0976cecddb6","after":"956c85e0fb829a90207a0b118d035eb948bbea6f","ref":"refs/heads/main","pushedAt":"2024-08-13T09:59:45.000Z","pushType":"push","commitsCount":20,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"},"commit":{"message":"Merge pull request #17905 from jack-w-shaw/JUJU-6431_move_gomock_controller_from_SetUpTest\n\nhttps://github.com/juju/juju/pull/17905\n\nRefactor apisserver bundle facade tests to ensure we do not instantiate a gomock controller within suite SetUpTest\n\nThe reason for this is the *gc.C in SetUpTest is not the same as in the tests themselves, which can lead to false positives tests.\n\nRefactor to the accepted pattern, placing \"defer c.setUpMocks(c).Finish()\" at the start of each test method.\n\nWe also then need to construct the facade, since it depends on our mock.\n\n## QA steps\n\n```\ngo test github.com/juju/juju/apiserver/facades/client/bundle\n```","shortMessageHtmlLink":"Merge pull request juju#17905 from jack-w-shaw/JUJU-6431_move_gomock_…"}},{"before":"ccc34af877f571ec5696b97394b2ecd79894449a","after":"3faf37d20128a9271ec146a8f4bcc4b21a408d80","ref":"refs/heads/api-client-context-aware","pushedAt":"2024-08-13T09:36:12.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"},"commit":{"message":"chore: context aware api client package\n\nThis is the final work in a long running effort to make the api\npackages context aware. Prior to this set of changes, both the\ncontroller and agent api packages were changed to use the context\npackage. This moves everything across.\n\nThis unlocks a lot of potential for numerous reasons:\n\n 1. Tracing thoughout the code base should now be possible for wiring\n up. There are some parts of the code base that is already setup\n it requires more workers to create trace roots to full complete\n this move.\n 2. Log output can now include a trace id, once the logger accepts\n a context.\n 3. Model loggers based on the context. Instead of having multiple\n loggers everywhere, we have one logger that can handle multiple\n models. Only on output do we write the log or not. This is\n required for status history.\n\nThe code is just one big labourious change. Adding a context.Context\nto every api/client method. Fun times.","shortMessageHtmlLink":"chore: context aware api client package"}},{"before":"2177fa04c1e1fbe226226915cb9f1351123f9d80","after":"ccc34af877f571ec5696b97394b2ecd79894449a","ref":"refs/heads/api-client-context-aware","pushedAt":"2024-08-13T09:16:09.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"},"commit":{"message":"chore: context aware api client package\n\nThis is the final work in a long running effort to make the api\npackages context aware. Prior to this set of changes, both the\ncontroller and agent api packages were changed to use the context\npackage. This moves everything across.\n\nThis unlocks a lot of potential for numerous reasons:\n\n 1. Tracing thoughout the code base should now be possible for wiring\n up. There are some parts of the code base that is already setup\n it requires more workers to create trace roots to full complete\n this move.\n 2. Log output can now include a trace id, once the logger accepts\n a context.\n 3. Model loggers based on the context. Instead of having multiple\n loggers everywhere, we have one logger that can handle multiple\n models. Only on output do we write the log or not. This is\n required for status history.\n\nThe code is just one big labourious change. Adding a context.Context\nto every api/client method. Fun times.","shortMessageHtmlLink":"chore: context aware api client package"}},{"before":"52bcecfc5e1fa34c50497cd39fe70465e437781d","after":null,"ref":"refs/heads/remove-remote-application-icon-lookup","pushedAt":"2024-08-13T08:33:03.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"}},{"before":"83da49eb0811280e74211b7a6d9b56f2840c8d36","after":"2177fa04c1e1fbe226226915cb9f1351123f9d80","ref":"refs/heads/api-client-context-aware","pushedAt":"2024-08-12T21:38:11.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"SimonRichardson","name":"Simon Richardson","path":"/SimonRichardson","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/2562584?s=80&v=4"},"commit":{"message":"WIP","shortMessageHtmlLink":"WIP"}}],"hasNextPage":true,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAEnFJ1qgA","startCursor":null,"endCursor":null}},"title":"Activity · SimonRichardson/juju"}