Version 3.1

Release date: June 30, 2021

Zero downtime upgrade notes

Full Zero downtime upgrade is not guaranteed with this release. A subset of workspace and snapshot related write operations can trigger stack traces and 400 return status codes when an older version of PiCLI talks to version 3.1 of the PiServer. This does not cause any data corruption or loss of any kind. This situation could occur after the proxy releases queued requests, when the upgrade is done. To avoid those unusual but harmless errors, we suggest to block at the proxy layer write workspace-type and snapshot-type operations, during the upgrade window.

The following commands could exhibit this erroring behavior until PiCLI and PiServer are both upgraded to version 3.1.
- pi integrate
- pi ip load
- pi release
- pi snap add
- pi snap delete
- pi snap edit
- pi snap load
- pi update
- pi ws delete
- pi ws edit
- pi ws move
- pi ws upgrade-pwm

HaProxy rules for `frontend piserver-in` section are:
acl is_get method GET
acl is_post method POST
acl is_put method PUT
acl is_delete method DELETE
acl is_head method HEAD
acl is_patch method PATCH
acl is_snap path_beg /cli/v1/snapshots
acl is_workspace path_beg /cli/v1/workspaces
http-request deny if is_snap is_post
http-request deny if is_snap is_put
http-request deny if is_snap is_delete
http-request deny if is_workspace is_post
http-request deny if is_workspace is_put
http-request deny if is_workspace is_delete

With these haproxy rules in place, the proxy will return 403 response to picli. Example: if a command listed above is run, the result will be:
ERROR:<html><body><h1>403 Forbidden</h1>
Request forbidden by administrative rules.
</body></html>
CRITICAL:Workspace Error.
Could not connect to PiServer.

Workspace and snapshot migration

It was discovered that workspaces can be left in an incomplete state when workspace operation is interrupted or cancelled. Similarly, a creation of a snapshot from such workspaces could create an incomplete snapshot. These workspaces and snapshots are unusable in the system and should be reviewed and cleaned up (deleted)priorto upgrading to 3.1.x. 

These workspaces and snapshots can be identified by running the following scripts:

                    https://mdx.jfrog.io/mdx/mdx-generic/scripts/query_bad_snapshots.sh
                    
https://mdx.jfrog.io/mdx/mdx-generic/scripts/query_bad_workspaces.sh

Workspaces can be deleted by calling the following command:

pi ws delete --id <ws_uuid>

Snapshots can be deleted through the following command:

pi snap delete <snapshot_fqn>

Should IPLM discover any workspaces/snapshots in incomplete state, these objects will not be migrated to the new schema and no write commands other than delete will be supported. 

Enhancements

Bugs

  • [TAU-7131] - pi wrapper overrules pi_server setting from MDX_CONFIG_DIR/piclient.conf
  • [TAU-7196] - Advanced Query fails with property name starting with number
  • [TAU-7088] - Public API attribute operations need to validate empty string
  • [TAU-7261] - pi update slowness
  • [CLI-99] - pi ws rm --id deletes wrong p4 client with same ws path

Known issues

  • 3.1 Release Pi Anon does not anonymize the project property fields in Workspace and Snapshots. Please wait for hotfix.
  • Pi Client versions up to 3.1.6 have known issues in which workspace updates revert Perforce Helix files that aren't removed from the workspace. This negatively impacts Cadence users and calls duplicate p4 commands which negatively affects performance. It is recommended to upgrade to Pi version 3.1.7.