Skip to content

Releases

v2.0.1

Choose a tag to compare

@bcdobbs bcdobbs released this 01 Nov 07:35
73f725c

Fixes from a review of the changes since 1.0.2. Nothing in 2.0.1 needs a change to a notebook written for 2.0.0.

  • Cancelled group creates: a create interrupted by cancelling the cell, while it's being sent or once Graph has made the group, isn't made again by the same manager. The library gets an error row, as after a 5xx. One cancelled while waiting to retry is made on the next try.
  • Moved libraries: when retire_moved_libraries checks a moved library works on its new site, it finds the groups the manager has just created. A check that fails, such as when the new site keeps throttling or returns something that isn't JSON, is an error rather than retire_deferred, so the run isn't clean and the move is tried again.
  • Docs: the README says how to remove an old library's group access by hand when a move changes its group prefix.
  • Example notebook and recommended flow: both retire every moved library each run, so a move deferred until its new library works is retired by a later run. In the notebook, a live run that doesn't hold the lease stops at every check, including a cell run again by hand. A run refused because another holds the lease doesn't write the lease row.

What's Changed

  • Remember a group create interrupted by cancelling the cell by @bcdobbs in #150
  • Fix two ways retire's replacement check deferred a working move by @bcdobbs in #151
  • Retire every moved faculty each run in the notebook and README flow by @bcdobbs in #152
  • Document that retire finds the old groups under the current prefix by @bcdobbs in #153
  • Make the notebook lease fail closed and refuse without writing by @bcdobbs in #154
  • Release 2.0.1 by @bcdobbs in #155

Full Changelog: v2.0.0...v2.0.1

v2.0.0

Choose a tag to compare

@bcdobbs bcdobbs released this 31 Oct 20:40
7dd88a0

Breaking changes

2.0.0 renames 16 dry-run actions, so each one is the live action followed by (dry run). For example, add_to_group (dry run) is now added_to_group (dry run). Change anything that filters dry-run rows by name. Live actions, FATAL_ACTIONS, WARNING_ACTIONS and the action log's columns don't change.

Upgrading from 1.1.0 or 1.2.0: get_library_metadata returns a fifth column, status, which 1.3.0 added. In the faculty notebook, change the first Smoke Test cell to handle it.

Upgrading to 2.0.0 has:

  • every renamed action;
  • the notebook example;
  • a mapping for comparing dry runs logged before 2.0.0.

Also in 2.0.0

  • Each thread keeps its connections to Graph and SharePoint open between requests, rather than making a new one for every request.
  • Group lookups read each group's owners, so checking that the app owns a group takes no request of its own.
  • Following a redirect gets a current token, as each retry already did.
  • SharePointLibraryManager no longer needs GroupMember.ReadWrite.All: Group.ReadWrite.All covers member changes. The README says how to remove it safely.
  • The example notebook takes a lease in its sync-state table before a live run changes anything, so a second live run stops rather than syncing at the same time. It adds a new LEASE_MINUTES parameter.

What's Changed

  • Drop GroupMember.ReadWrite.All from the documented permissions by @bcdobbs in #143
  • Read group owners with the group lookup by @bcdobbs in #144
  • Add a run lease to the faculty notebook's sync-state table by @bcdobbs in #145
  • Name each dry-run action after the action a live run logs (breaking, for 2.0.0) by @bcdobbs in #146
  • Pin the workflows' actions to commit SHAs by @bcdobbs in #141
  • Reuse each thread's connections to Graph and SharePoint by @bcdobbs in #142
  • Make the lost-removal-response test remove the member before the retry by @bcdobbs in #148
  • Renew the token before following each redirect by @bcdobbs in #147
  • Release 2.0.0 by @bcdobbs in #149

Full Changelog: v1.3.0...v2.0.0

v1.3.0

Choose a tag to compare

@bcdobbs bcdobbs released this 31 Oct 16:56
f783b1c

What's Changed

  • Quote the mailbox and IDs Emails puts in URL paths by @bcdobbs in #62
  • Put Graph's error code and message in every Emails error by @bcdobbs in #63
  • Give the service's error code and message in SharePoint failure rows by @bcdobbs in #65
  • Log an unhandled error against its library, without the work item by @bcdobbs in #66
  • Write whole numbers from float and Decimal columns without decimals by @bcdobbs in #67
  • Follow a redirect without sending the query string again by @bcdobbs in #68
  • Retry a dropped response body, not a TLS error, and fix the wrapper's docs by @bcdobbs in #69
  • Let send_email take one address as a string, and refuse none by @bcdobbs in #64
  • Report a membership row with no user or permission, not fail the sync by @bcdobbs in #70
  • Treat a member already gone as removed, and empty groups past failures by @bcdobbs in #71
  • Retry Emails requests Graph throttles or fails transiently by @bcdobbs in #72
  • Lock down each site once however it's spelt, and refuse a bare URL by @bcdobbs in #73
  • Report a site retire can't read as an error, not as gone or deferred by @bcdobbs in #74
  • Write library metadata only where it changed by @bcdobbs in #75
  • Leave a library's display name alone when it already has the new one by @bcdobbs in #76
  • Re-run unlink and retire without writing what's already done by @bcdobbs in #77
  • Write provenance metadata after the groups, so a failure can't block them by @bcdobbs in #78
  • Refuse a code SharePoint can't use as a URL in get_navigation_link by @bcdobbs in #79
  • Look users up one at a time when max_workers is 1 by @bcdobbs in #80
  • Remove a deleted library's navigation link when it's unlinked by @bcdobbs in #81
  • Say whether get_library_metadata read each library by @bcdobbs in #82
  • Document that two sites can share group names by @bcdobbs in #83
  • List attachments without downloading their content by @bcdobbs in #84
  • Search messages 1000 at a time, not 10 by @bcdobbs in #85
  • Don't put a sender's attachment name into a path in the README by @bcdobbs in #86
  • Say inline attachments of any type are left out, not only images by @bcdobbs in #87
  • Quote the certificate name, version and tenant in URL paths by @bcdobbs in #88
  • Test what Key Vault and Entra ID requests need, and Key Vault failures by @bcdobbs in #89
  • Say KeyVaultCertificateCredential works in Fabric notebooks, not Synapse by @bcdobbs in #90
  • Retry the Key Vault and token requests behind each token refresh by @bcdobbs in #91
  • Pin every package's public names in test_packaging by @bcdobbs in #92
  • Parse README examples in indented fences too by @bcdobbs in #93
  • Run the tests against the built wheel in CI by @bcdobbs in #94
  • Ship what the tests need in the source distribution by @bcdobbs in #95
  • Check the README's examples show the current version by @bcdobbs in #97
  • Only release a tagged commit that's on main by @bcdobbs in #98
  • Refuse notebook scope filters Spark SQL would misread by @bcdobbs in #99
  • Have Dependabot keep the workflows' actions up to date by @bcdobbs in #100
  • Send the example notebook, its write-up and tests to IT Approvers by @bcdobbs in #101
  • Use placeholders for the tenant's identifiers in the example notebook by @bcdobbs in #102
  • Use absolute links in the README, which is also the PyPI description by @bcdobbs in #96
  • Add Raises sections to the public methods that raise by @bcdobbs in #103
  • Test failed user and group lookups and the removal limit's boundary by @bcdobbs in #105
  • Test a navigation link isn't posted again after a server error by @bcdobbs in #106
  • Make tests check the behaviour their names promise by @bcdobbs in #107
  • Test that ErrorItemNotFound without a 404 is raised by @bcdobbs in #108
  • Test that a library's paged role assignments are all read by @bcdobbs in #109
  • Bring the install and build steps up to date by @bcdobbs in #110
  • Say a MemberOfGroup scope only covers the group's direct members by @bcdobbs in #112
  • Correct what the README says about the manager by @bcdobbs in #113
  • Bring the notebook write-up's test and smoke-test advice up to date by @bcdobbs in #114
  • Treat a null deleted as false in the recommended flow by @bcdobbs in #115
  • Correct the certificate setup wording by @bcdobbs in #111
  • Warn that excluding a provisioned library freezes its groups by @bcdobbs in #117
  • Say how to choose max_workers by @bcdobbs in #118
  • Count action names and their classes in the versioning rules by @bcdobbs in #119
  • Check the notebook's own flags are True or False by @bcdobbs in #120
  • Document how to run the flow from a pipeline by @bcdobbs in #121
  • Declare the licence as a PEP 639 License-Expression by @bcdobbs in #122
  • Don't create a group again after a create that may have succeeded by @bcdobbs in #123
  • Bring the test docstrings into line with CLAUDE.md by @bcdobbs in #125
  • Complete the public docstrings and type hints by @bcdobbs in #126
  • Send a decorated User-Agent with every Graph and SharePoint request by @bcdobbs in #127
  • Test bringing a library back: restored, moved back or re-created by @bcdobbs in #128
  • Make the fake refuse writes SharePoint ignores or rejects by @bcdobbs in #129
  • Make the fake check every request's token audience and odata=verbose by @bcdobbs in #130
  • Read sites in parallel when max_workers is above 1 by @bcdobbs in #131
  • Only register a group on a site when a library needs a new grant by @bcdobbs in #132
  • Report the group descriptions a create_libraries dry run would update by @bcdobbs in #133
  • Read the watermark in Spark's session time zone, pinned to UTC by @bcdobbs in #116
  • Document every action, and the warnings people ask about by @bcdobbs in #124
  • Bump the github-actions group with 4 updates by @dependabot[bot] in #104
  • Move the fakes' helpers that don't use self to module lev...
Read more

v1.2.0

Choose a tag to compare

@bcdobbs bcdobbs released this 31 Oct 11:09
88e19c5

Adds a way to make missing OneDrive shortcuts and a limit on removals across a whole membership sync, and fixes more problems from the review of 1.0.2. Argument names, defaults of existing options and action-log columns are unchanged, but check the points under Before upgrading.

New

  • ensure_onedrive_shortcuts(df) makes OneDrive shortcuts that update_memberships couldn't, most often because the user's OneDrive didn't exist yet. It isn't part of the usual flow: run it when onedrive_shortcut_failed rows build up. A shortcut to the library that's already there, even renamed, is left alone. The README also describes the fix by hand.
  • max_removals_per_run (default 100): update_memberships adds up its removals across the whole call before making any. If they'd remove more than the limit, none are made, and one removal_guardrail_triggered row with no library says how many. The per-group limit alone couldn't stop an empty or truncated members table emptying every small group.

SharePoint library manager

  • A library_code SharePoint can't use as a library's URL raises ValueError before anything is changed. A code can contain letters, digits, spaces, -, _ and ., can't start or end with a space or ., and can't contain _vti_. SharePoint changed other codes, such as D&T or a padded MATH , when it made the URL, so no later run found the library and its members were never synced.
  • retire_moved_libraries only retires a library once its replacement works on the new site: it exists, has its own permissions, and gives at least one of its groups access (retire_deferred until then). A failed create, or a _MOVED leftover from an earlier move back, no longer lets the working library be retired.
  • create_libraries logs library_created and library_renamed, and its dry run reports them (library_created (dry run), rename_library (dry run)) and a navigation label it would create.
  • Dry runs read what a live run reads. For rename_libraries and set_library_metadata, a missing library gives an error row as a live run does, instead of a dry-run row saying it would succeed. A dry run of grant_group_access reports missing groups and libraries (group_not_found, library_not_found) and grants already held.
  • A group the manager created moments ago is reused, not created again, while Graph's name lookups still miss it. Its owner is checked and its members read like any group's.
  • Graph's 400 "objects being referenced don't exist" for a new group is waited out like its 404.
  • A removal that fails with a timeout or dropped connection is logged as remove_failed against its library, group and member.
  • With max_workers above 1, cancelling a cell stops queued libraries starting.

Throttling and tokens

  • A 503 with Retry-After, which SharePoint and Graph send when throttling, is waited out like a 429, instead of giving up after about 36 seconds.
  • Each attempt of a request gets a current token from the credential, so a request retried for several minutes doesn't fail with a 401 because its token expired while it waited.

Before upgrading

  • Removal limit: if a normal run removes more than 100 members in total (for example at the start of a school year), pass a higher max_removals_per_run, or every removal in that run is skipped. The example notebook has a MAX_REMOVALS_PER_RUN setting.
  • Library codes: check your codes only use the characters above. Trim codes from a padded (CHAR) column in the query that reads them, as a padded code now raises ValueError.
  • New action names: library_created, library_renamed, onedrive_shortcut_exists and the dry-run rows above. A removal_guardrail_triggered row can have no library.

See Installation in the README for the full list.

What's Changed

  • Honour Retry-After on 503 responses as well as 429 by @bcdobbs in #48
  • Wait for replication on Graph's 400 for a new group, not only its 404 by @bcdobbs in #49
  • Make the grant_group_access dry run read what a live run reads by @bcdobbs in #50
  • Find the library and groups in dry runs as a live run does by @bcdobbs in #51
  • Log creating a library and changing its display name by @bcdobbs in #52
  • Stop starting queued libraries when a parallel run is cancelled by @bcdobbs in #53
  • Only retire a moved library once its replacement is working by @bcdobbs in #54
  • Reuse groups the manager created when a name lookup misses them by @bcdobbs in #55
  • Document fixing a failed OneDrive shortcut by hand by @bcdobbs in #56
  • Limit removals across a whole membership sync, not only per group by @bcdobbs in #57
  • Add ensure_onedrive_shortcuts to make missing OneDrive shortcuts later by @bcdobbs in #58
  • Send a current token with each attempt of a request by @bcdobbs in #59
  • Refuse library codes SharePoint can't use as a library's URL by @bcdobbs in #60
  • Bump version to 1.2.0 by @bcdobbs in #61

Full Changelog: v1.1.0...v1.2.0

v1.1.0

Choose a tag to compare

@bcdobbs bcdobbs released this 31 Oct 09:06
c1cee11

Fixes problems found in a review of 1.0.2, mostly in how SharePointLibraryManager changes permissions and groups. Argument names, defaults and action-log columns are unchanged, but check the points under Before upgrading.

Security

  • A site URL, redirect or akv_url with a backslash or a user name before its host is refused with ValueError. Python's URL parser and requests read such URLs differently, so a URL that passed the host check could send the SharePoint or Key Vault token to another host.

SharePoint library manager

  • Taking over an existing library keeps the permissions of its folders and files. It was resetting them, which opened restricted folders to the library's groups. Taking over a library that still inherits the site's permissions now logs inheritance_broken.
  • A library gets its own permissions and groups before its display name is set. If another list already has that name, it keeps its code as its title (library_name_conflict) rather than being left open to the whole site.
  • retire_moved_libraries leaves a library alone (retire_skipped) when its new site is the same site, spelt differently (in case, or with a trailing slash). It used to retire the live library.
  • unlink_libraries skips a code whose group names are another library's (group_name_collision), such as PEKS3 after PE-KS3. It used to empty the other library's groups.
  • A dry run of update_memberships reads each group's members. It now shows the members a live run would remove (remove_from_group (dry run)), and removals_skipped and removal_guardrail_triggered where they apply.
  • A membership row with an unknown permission (such as edit) no longer removes anyone from the library's groups. Its skip row is now in WARNING_ACTIONS.
  • Options must be of their documented type: a string such as "False" raises TypeError rather than counting as true, which turned the removal guardrail off. Blanks in create_libraries' flag columns take their defaults.
  • rename_libraries no longer accepts old_library_code, and raises ValueError if given one. It never worked, as the library was looked up by its new code, so it's removed without a major version.

Before upgrading

  • Pipeline parameters: a Notebook activity parameter of type String reaches the notebook as text. If one is passed straight to a manager option, such as DRY_RUN or ALLOW_MASS_REMOVAL, give it the type Bool or Int.
  • Dry-run rows: if anything reads the update_memberships dry-run rows, note that reconcile_group (dry run) is gone. remove_from_group (dry run) and group_assigned (dry run) are new.
  • First run: do a dry run first. It now lists the removals a live run would make.

See Installation in the README for the full list.

What's Changed

  • Refuse site and Key Vault URLs that requests reads as another host by @bcdobbs in #38
  • Keep folder and file permissions when taking over an existing library by @bcdobbs in #39
  • Give a library its own permissions before setting its display name by @bcdobbs in #40
  • Don't retire a library whose new site is the same site by @bcdobbs in #41
  • Skip unlinking a code whose group names are another library's by @bcdobbs in #42
  • Show removals and the guardrail in update_memberships dry runs by @bcdobbs in #43
  • Never remove members because of a row with an unknown permission by @bcdobbs in #44
  • Refuse options and flag columns that aren't really True or False by @bcdobbs in #45
  • Remove old_library_code from rename_libraries by @bcdobbs in #46
  • Release fixes from the 1.0.2 review (1.1.0) by @bcdobbs in #47

Full Changelog: v1.0.2...v1.1.0

v1.0.2

Choose a tag to compare

@bcdobbs bcdobbs released this 29 Oct 18:54
f73baa6

Safe to upgrade from 1.0.x: no changes to argument names, defaults or action-log columns.

Fixes how SharePointLibraryManager takes ownership of security groups created before 0.5.0, which have no owner.

  • update_memberships now checks the owners of an Auto group even when it has no members to add. Before, it skipped the check for those groups, so an ownerless Auto group (such as an Auto-Read group with nobody in it) was never adopted. It also emptied a same-named group someone else owns without checking. Now the app is added as owner of an ownerless group (group_owner_added), and a group someone else owns is left alone (group_not_owned), in both live and dry runs.
  • A dry run of create_libraries now reads each existing group's owners, so it reports the groups a live run would adopt (group_owner_added (dry run)) or refuse (group_not_owned), as update_memberships already did.
  • The README and the faculty notebook write-up now explain how to adopt existing Manual groups in one go, by running the create pass once over every live library. See Adopting groups created by earlier versions.

After upgrading, expect group_owner_added rows in the first live run's action log as existing groups are adopted. Any group_not_owned rows are groups owned by someone other than the app: check who created each one, then add the app's service principal as a co-owner or delete the group.

What's Changed

  • Check ownership of Auto groups membership sync would empty (1.0.2) by @bcdobbs in #37

Full Changelog: v1.0.1...v1.0.2

v1.0.1

Choose a tag to compare

@bcdobbs bcdobbs released this 27 Oct 21:13
7ebbaf7

What's Changed

  • Fix command syntax for certificate creation by @bcdobbs in #35
  • Name Graph, Exchange and SharePoint as the main auth APIs in the README (1.0.1) by @bcdobbs in #36

Full Changelog: v1.0.0...v1.0.1

v1.0.0 – First stable release

Choose a tag to compare

@bcdobbs bcdobbs released this 27 Oct 15:37
Immutable release. Only release title and notes can be modified.
3418f97

First stable release. From 1.0.0 the package follows semantic versioning: only a new major version (2.0.0) can break existing notebooks.

1.0.0 removes the old names that 0.x versions kept working with a FutureWarning. Nothing else changes, so a notebook that runs on 0.7.x without a FutureWarning runs unchanged on 1.0.0.

  • alt_fabric_m365.graph_api is removed. Import from alt_fabric_m365.exchange instead, for example from alt_fabric_m365.exchange import Emails, MessageNotFoundError.
  • The fabric_python_helper forwarding package is no longer maintained. Change fabric_python_helper to alt_fabric_m365 in your imports, and remove fabric_python_helper from your Fabric environments: its last release, 0.6.0, requires alt-fabric-m365 0.6, so it can't be installed alongside 1.0.0.

See Upgrading to 1.0.0 in the README.

What's Changed

  • Remove graph_api and the fabric_python_helper forwarding package (1.0.0) by @bcdobbs in #34

Full Changelog: v0.7.2...v1.0.0

v0.7.2

Choose a tag to compare

@bcdobbs bcdobbs released this 27 Oct 09:33
f46772b

Safe to upgrade from 0.7.x: no behaviour changes, and argument names, order and defaults are the same.

  • Type hints on KeyVaultCertificateCredential and Emails, so editors such as VS Code and Fabric notebooks show argument and return types.
  • Docstrings in one style (Google style) across the package, so help text reads the same everywhere.
  • Internal tidy-up and contributor guidelines; no changes to how the package works.

What's Changed

  • Use module-level helpers and Google-style docstrings throughout, and add CLAUDE.md (0.7.2) by @bcdobbs in #32

Full Changelog: v0.7.1...v0.7.2

v0.7.1

Choose a tag to compare

@bcdobbs bcdobbs released this 23 Oct 20:08
0475c09

What's Changed

  • Explain scopes in app-only auth and document setting up Sites.Selected (0.7.1) by @bcdobbs in #31

Full Changelog: v0.7.0...v0.7.1