Aliases

This training page describes how to add and delete Aliases to and from IPVs, how to update IPVs in the workspace to an Alias, and how to load an IPV at an Alias. 

Aliases Overview

Alias are user definable strings that can be added to an IPV to distinguish it from other versions, usually to denote a level of quality or significance (ie tapeout). Aliases that are added to more than one IPV in a line are referred to as "Moving Aliases".

If an IP@ALIAS is referred to, the latest IPV in the IP Line will be returned by Perforce IPLM. In a workspace, a resource that is loaded at an Alias can then be updated to the latest version that carries this alias, without having to recreate the top level configuration each time a newer version of the resource is needed.

There are two types of moving aliases:

Moving Alias Type Description
System Defined

HEAD and LATEST are two system defined aliases, they cannot be edited or modified by users.

@LATEST returns the latest IPV on a line, and is updated every time there is a release on the line

@HEAD returns the Resources of the @LATEST IPV, and the latest files in the DM system

User Defined User created Aliases. These can be created, added, or removed as needed


Moving aliases are useful as they are a way to mark a release of interest, without the need for releasing the IP. This reduces the number of releases in the project, reducing the requirement for an integrator. The drawback with system defined aliases is that since it is not versioned, there is no way to know what the HEAD/LATEST was at a previous point in time. To learn more on this topic, refer to IP Aliases in the User Guide.

Adding an Alias

Aliases can be added to an IPV using the command:

> pi alias add <Identifier> <Alias>

Below is an example of the command:

pi alias add Command
> pi alias add tutorial.padring@5.TRUNK GOLD
Successfully added alias 'GOLD' on 'tutorial.padring@5.TRUNK'

Users can find out what aliases are applied to IPs by running a 'pi ip list' command.The Aliases column will show the current aliases applied to that version of the IP.

The below example shows how to check the Aliases applied to the latest version of a particular IPV.

Checking the Aliases Applied to the Latest Version
> pi ip list tutorial.padring
┌──────────────────────────┬────┬──────────────────┬────────────┬───────────────────────────────┬────────────────────┐
│ NAME                     │ DM │ ALIASES          │ CREATED BY │ CREATED ON                    │ VERSION MESSAGE    │
╞══════════════════════════╪════╪══════════════════╪════════════╪═══════════════════════════════╪════════════════════╡
│ tutorial.padring@1.L1    │ P4 │ HEAD LATEST      │ admin      │ 2020-06-19 10:14:50 -0400 EDT │ padring L1 release │
│ tutorial.padring@1.L2    │ P4 │ HEAD LATEST      │ admin      │ 2020-06-19 10:14:52 -0400 EDT │ padring L2 release │
│ tutorial.padring@1.L3    │ P4 │ HEAD LATEST      │ admin      │ 2020-06-19 10:14:54 -0400 EDT │ padring L3 release │
│ tutorial.padring@1.L4    │ P4 │ HEAD LATEST      │ admin      │ 2020-06-19 10:14:56 -0400 EDT │ padring L4 release │
│ tutorial.padring@5.TRUNK │ P4 │ GOLD HEAD LATEST │ admin      │ 2020-06-19 10:14:47 -0400 EDT │ tutorial release   │
└──────────────────────────┴────┴──────────────────┴────────────┴───────────────────────────────┴────────────────────┘
Found 5 matching object(s).

To see aliases on all the versions of an IP, use 'pi ip list -a' command.

pi ip list -a Command
> pi ip list tutorial.padring -a
┌──────────────────────────┬────┬──────────────────┬────────────┬───────────────────────────────┬────────────────────┐
│ NAME                     │ DM │ ALIASES          │ CREATED BY │ CREATED ON                    │ VERSION MESSAGE    │
╞══════════════════════════╪════╪══════════════════╪════════════╪═══════════════════════════════╪════════════════════╡
│ tutorial.padring@1.L1    │ P4 │ HEAD LATEST      │ admin      │ 2020-06-19 10:14:50 -0400 EDT │ padring L1 release │
│ tutorial.padring@0.L1    │ P4 │                  │ admin      │ 2020-06-19 10:14:48 -0400 EDT │ variant L1         │
│ tutorial.padring@1.L2    │ P4 │ HEAD LATEST      │ admin      │ 2020-06-19 10:14:52 -0400 EDT │ padring L2 release │
│ tutorial.padring@0.L2    │ P4 │                  │ admin      │ 2020-06-19 10:14:48 -0400 EDT │ variant L2         │
│ tutorial.padring@1.L3    │ P4 │ HEAD LATEST      │ admin      │ 2020-06-19 10:14:54 -0400 EDT │ padring L3 release │
│ tutorial.padring@0.L3    │ P4 │                  │ admin      │ 2020-06-19 10:14:48 -0400 EDT │ variant L3         │
│ tutorial.padring@1.L4    │ P4 │ HEAD LATEST      │ admin      │ 2020-06-19 10:14:56 -0400 EDT │ padring L4 release │
│ tutorial.padring@0.L4    │ P4 │                  │ admin      │ 2020-06-19 10:14:49 -0400 EDT │ variant L4         │
│ tutorial.padring@5.TRUNK │ P4 │ GOLD HEAD LATEST │ admin      │ 2020-06-19 10:14:47 -0400 EDT │ tutorial release   │
│ tutorial.padring@4.TRUNK │ P4 │                  │ admin      │ 2020-06-19 10:14:47 -0400 EDT │ tutorial release   │
│ tutorial.padring@3.TRUNK │ P4 │                  │ admin      │ 2020-06-19 10:14:46 -0400 EDT │ tutorial release   │
│ tutorial.padring@2.TRUNK │ P4 │ GOLD             │ admin      │ 2020-06-19 10:14:46 -0400 EDT │ tutorial release   │
│ tutorial.padring@1.TRUNK │ P4 │ GOLD             │ admin      │ 2020-06-19 10:14:44 -0400 EDT │ tutorial release   │
│ tutorial.padring@0.TRUNK │ P4 │                  │ admin      │ 2020-06-19 10:14:37 -0400 EDT │ Initial version    │
└──────────────────────────┴────┴──────────────────┴────────────┴───────────────────────────────┴────────────────────┘
Found 14 matching object(s).

Loading a Workspace with IP@ALIAS

Users can then load a workspace based on an alias applied to an IP. The workspace will be loaded with the latest IPV the alias has been added to. Users do not need to keep track of which version of the IP, the alias has been added to.

In the example below, when the user loads the IP at alias "GOLD", the workspace will be loaded with the IPV on which GOLD was last applied, in this case @5.TRUNK which will be indicated when first loading as well as when checking the status of a workspace

Loading the IP at Alias "GOLD"
> pi ip load tutorial.padring@GOLD.TRUNK
Loading IPV 'tutorial.padring@GOLD.TRUNK' into Workspace '/tmp/tutorial.padring'.
┌────────────────────┬─────────────────┬───────┬──────────────────┐
│ NAME               │     VERSION     │  MODE │ RELATIVE PATH    │
╞════════════════════╪═════════════════╪═══════╪══════════════════╡
│ tutorial.padring   │ GOLD.TRUNK [@5] │ Refer │ blocks/padring   │
│ tutorial.MS90G     │     1.TRUNK     │ Refer │ blocks/MS90G     │
│ tutorial.io5v      │     1.TRUNK     │ Refer │ blocks/io5v      │
│ tutorial.io_tsmc18 │     1.TRUNK     │ Refer │ blocks/io_tsmc18 │
└────────────────────┴─────────────────┴───────┴──────────────────┘
> cd tutorial.padring/
> pi ip local --all
Switching 'tutorial.MS90G@1.TRUNK, tutorial.io5v@1.TRUNK, tutorial.io_tsmc18@1.TRUNK, tutorial.padring@GOLD.TRUNK' to local mode.
Successfully switched 'tutorial.MS90G@1.TRUNK, tutorial.io5v@1.TRUNK, tutorial.io_tsmc18@1.TRUNK, tutorial.padring@GOLD.TRUNK' to local mode.
> pi ws st -v
Workspace ID : 39f0db1c-0f89-4931-826e-035e3365e8d0
Directory    : /tmp/tutorial.padring
IP           : tutorial.padring@GOLD.TRUNK [@5]
Resources    :
┌────────────────────┬──────────────────┬─────────────────┬───────────┬───────────────┬───────┐
│ NAME               │ EXPECTED VERSION │  LOCAL VERSION  │ WS STATUS │ SERVER STATUS │  MODE │
╞════════════════════╪══════════════════╪═════════════════╪═══════════╪═══════════════╪═══════╡
│ tutorial.padring   │ GOLD.TRUNK [@5]  │ GOLD.TRUNK [@5] │     OK    │       OK      │ Local │
│ tutorial.MS90G     │     1.TRUNK      │     1.TRUNK     │     OK    │       OK      │ Local │
│ tutorial.io5v      │     1.TRUNK      │     1.TRUNK     │     OK    │       OK      │ Local │
│ tutorial.io_tsmc18 │     1.TRUNK      │     1.TRUNK     │     OK    │       OK      │ Local │
└────────────────────┴──────────────────┴─────────────────┴───────────┴───────────────┴───────┘

Updating a Workspace to the Latest IP@ALIAS

Let's see what happens when there is a newer released version of the IP to which the alias GOLD is also applied.

First, edit the top level IP and change one of the values to create a new version ( 'pi ip edit tutorial.padring' and change 'repo_path' to '//mdx_test/tutorial/padring/trunk/new')

For this example, lets use 'pi ip edit tutorial.padring' and change one of the fields, say 'project_props' to '* --path $IP'. 

pi ip edit tutorial.padring
> pi ip edit tutorial.padring
 
< go to bottom of template >< change 'project_props' field to: > 
project_props = * --path $IP
 
< save and exit template >

Editing the Top Level IP
> pi ip list tutorial.padring -a
┌──────────────────────────┬────┬─────────────┬────────────┬───────────────────────────────┬────────────────────┐
│ NAME                     │ DM │ ALIASES     │ CREATED BY │ CREATED ON                    │ VERSION MESSAGE    │
╞══════════════════════════╪════╪═════════════╪════════════╪═══════════════════════════════╪════════════════════╡
│ tutorial.padring@1.L1    │ P4 │ HEAD LATEST │ admin      │ 2020-06-19 10:14:50 -0400 EDT │ padring L1 release │
│ tutorial.padring@0.L1    │ P4 │             │ admin      │ 2020-06-19 10:14:48 -0400 EDT │ variant L1         │
│ tutorial.padring@1.L2    │ P4 │ HEAD LATEST │ admin      │ 2020-06-19 10:14:52 -0400 EDT │ padring L2 release │
│ tutorial.padring@0.L2    │ P4 │             │ admin      │ 2020-06-19 10:14:48 -0400 EDT │ variant L2         │
│ tutorial.padring@1.L3    │ P4 │ HEAD LATEST │ admin      │ 2020-06-19 10:14:54 -0400 EDT │ padring L3 release │
│ tutorial.padring@0.L3    │ P4 │             │ admin      │ 2020-06-19 10:14:48 -0400 EDT │ variant L3         │
│ tutorial.padring@1.L4    │ P4 │ HEAD LATEST │ admin      │ 2020-06-19 10:14:56 -0400 EDT │ padring L4 release │
│ tutorial.padring@0.L4    │ P4 │             │ admin      │ 2020-06-19 10:14:49 -0400 EDT │ variant L4         │
│ tutorial.padring@6.TRUNK │ P4 │ HEAD LATEST │ admin      │ 2020-06-19 17:10:13 -0400 EDT │ tutorial release   │
│ tutorial.padring@5.TRUNK │ P4 │ GOLD        │ admin      │ 2020-06-19 10:14:47 -0400 EDT │ tutorial release   │
│ tutorial.padring@4.TRUNK │ P4 │             │ admin      │ 2020-06-19 10:14:47 -0400 EDT │ tutorial release   │
│ tutorial.padring@3.TRUNK │ P4 │             │ admin      │ 2020-06-19 10:14:46 -0400 EDT │ tutorial release   │
│ tutorial.padring@2.TRUNK │ P4 │ GOLD        │ admin      │ 2020-06-19 10:14:46 -0400 EDT │ tutorial release   │
│ tutorial.padring@1.TRUNK │ P4 │ GOLD        │ admin      │ 2020-06-19 10:14:44 -0400 EDT │ tutorial release   │
│ tutorial.padring@0.TRUNK │ P4 │             │ admin      │ 2020-06-19 10:14:37 -0400 EDT │ Initial version    │
└──────────────────────────┴────┴─────────────┴────────────┴───────────────────────────────┴────────────────────┘

Apply the GOLD alias:

Applying the GOLD Alias
> pi alias add tutorial.padring@6.TRUNK GOLD
Successfully added alias 'GOLD' on 'tutorial.padring@6.TRUNK'.

where the user has loaded a workspace with the IP @GOLD.TRUNK , which was applied on 5.TRUNK. If there is a newer released version of the IP to which the alias GOLD is applied, the workspace status will indicate a newer version of the alias, and by running the "pi update" command, the system will update the workspace with the latest IPV@GOLD. 

pi update Command
> pi ws st -v
Workspace ID : 39f0db1c-0f89-4931-826e-035e3365e8d0
Directory    : /tmp/tutorial.padring
IP           : tutorial.padring@GOLD.TRUNK [@5]
Resources    :
┌────────────────────┬──────────────────┬─────────────────┬───────────┬─────────────────────┬───────┐
│ NAME               │ EXPECTED VERSION │  LOCAL VERSION  │ WS STATUS │    SERVER STATUS    │  MODE │
╞════════════════════╪══════════════════╪═════════════════╪═══════════╪═════════════════════╪═══════╡
│ tutorial.padring   │ GOLD.TRUNK [@5]  │ GOLD.TRUNK [@5] │     OK    │ New @GOLD available │ Local │
│ tutorial.MS90G     │     1.TRUNK      │     1.TRUNK     │     OK    │          OK         │ Local │
│ tutorial.io5v      │     1.TRUNK      │     1.TRUNK     │     OK    │          OK         │ Local │
│ tutorial.io_tsmc18 │     1.TRUNK      │     1.TRUNK     │     OK    │          OK         │ Local │
└────────────────────┴──────────────────┴─────────────────┴───────────┴─────────────────────┴───────┘

As seen above, workspace status shows that a newer version of the IP @GOLD.TRUNK exists.  pi update will bring in the newer IP and associated files and resources.

Loading the Newer IP
> pi up
Updating Workspace to Alias 'GOLD'. For large IP this could take a while.
┌────────────────────┬─────────────────┬─────────────────┬───────┬───────────┐
│ NAME               │   OLD VERSION   │   NEW VERSION   │  MODE │ PATH      │
╞════════════════════╪═════════════════╪═════════════════╪═══════╪═══════════╡
│ tutorial.MS90G     │     1.TRUNK     │     1.TRUNK     │ Local │ MS90G     │
│ tutorial.io5v      │     1.TRUNK     │     1.TRUNK     │ Local │ io5v      │
│ tutorial.io_tsmc18 │     1.TRUNK     │     1.TRUNK     │ Local │ io_tsmc18 │
│ tutorial.padring   │ GOLD.TRUNK [@5] │ GOLD.TRUNK [@6] │ Local │ padring   │
└────────────────────┴─────────────────┴─────────────────┴───────┴───────────┘
> pi ws st -v
Workspace ID : 39f0db1c-0f89-4931-826e-035e3365e8d0
Directory    : /tmp/tutorial.padring
IP           : tutorial.padring@GOLD.TRUNK [@6]
Resources    :
┌────────────────────┬──────────────────┬─────────────────┬───────────┬───────────────┬───────┐
│ NAME               │ EXPECTED VERSION │  LOCAL VERSION  │ WS STATUS │ SERVER STATUS │  MODE │
╞════════════════════╪══════════════════╪═════════════════╪═══════════╪═══════════════╪═══════╡
│ tutorial.padring   │ GOLD.TRUNK [@6]  │ GOLD.TRUNK [@6] │     OK    │       OK      │ Local │
│ tutorial.MS90G     │     1.TRUNK      │     1.TRUNK     │     OK    │       OK      │ Local │
│ tutorial.io5v      │     1.TRUNK      │     1.TRUNK     │     OK    │       OK      │ Local │
│ tutorial.io_tsmc18 │     1.TRUNK      │     1.TRUNK     │     OK    │       OK      │ Local │
└────────────────────┴──────────────────┴─────────────────┴───────────┴───────────────┴───────┘

Deleting an Alias

Users can remove an alias from the IP using the 'pi alias del' command. Note that user would have to specify the IPV from which the alias has to be removed, previous versions of the IP will still retain the alias.

pi alias del Command
> pi ip list tutorial.padring -a
┌──────────────────────────┬────┬──────────────────┬────────────┬───────────────────────────────┬────────────────────┐
│ NAME                     │ DM │ ALIASES          │ CREATED BY │ CREATED ON                    │ VERSION MESSAGE    │
╞══════════════════════════╪════╪══════════════════╪════════════╪═══════════════════════════════╪════════════════════╡
│ tutorial.padring@1.L1    │ P4 │ HEAD LATEST      │ admin      │ 2020-06-19 10:14:50 -0400 EDT │ padring L1 release │
│ tutorial.padring@0.L1    │ P4 │                  │ admin      │ 2020-06-19 10:14:48 -0400 EDT │ variant L1         │
│ tutorial.padring@1.L2    │ P4 │ HEAD LATEST      │ admin      │ 2020-06-19 10:14:52 -0400 EDT │ padring L2 release │
│ tutorial.padring@0.L2    │ P4 │                  │ admin      │ 2020-06-19 10:14:48 -0400 EDT │ variant L2         │
│ tutorial.padring@1.L3    │ P4 │ HEAD LATEST      │ admin      │ 2020-06-19 10:14:54 -0400 EDT │ padring L3 release │
│ tutorial.padring@0.L3    │ P4 │                  │ admin      │ 2020-06-19 10:14:48 -0400 EDT │ variant L3         │
│ tutorial.padring@1.L4    │ P4 │ HEAD LATEST      │ admin      │ 2020-06-19 10:14:56 -0400 EDT │ padring L4 release │
│ tutorial.padring@0.L4    │ P4 │                  │ admin      │ 2020-06-19 10:14:49 -0400 EDT │ variant L4         │
│ tutorial.padring@6.TRUNK │ P4 │ GOLD HEAD LATEST │ admin      │ 2020-06-19 17:10:13 -0400 EDT │ tutorial release   │
│ tutorial.padring@5.TRUNK │ P4 │ GOLD             │ admin      │ 2020-06-19 10:14:47 -0400 EDT │ tutorial release   │
│ tutorial.padring@4.TRUNK │ P4 │                  │ admin      │ 2020-06-19 10:14:47 -0400 EDT │ tutorial release   │
│ tutorial.padring@3.TRUNK │ P4 │                  │ admin      │ 2020-06-19 10:14:46 -0400 EDT │ tutorial release   │
│ tutorial.padring@2.TRUNK │ P4 │ GOLD             │ admin      │ 2020-06-19 10:14:46 -0400 EDT │ tutorial release   │
│ tutorial.padring@1.TRUNK │ P4 │ GOLD             │ admin      │ 2020-06-19 10:14:44 -0400 EDT │ tutorial release   │
│ tutorial.padring@0.TRUNK │ P4 │                  │ admin      │ 2020-06-19 10:14:37 -0400 EDT │ Initial version    │
└──────────────────────────┴────┴──────────────────┴────────────┴───────────────────────────────┴────────────────────┘
Found 15 matching object(s).
> pi alias del tutorial.padring@2.TRUNK GOLD
Successfully deleted Alias 'GOLD' from 'tutorial.padring@2.TRUNK'.
> pi ip list tutorial.padring -a
┌──────────────────────────┬────┬──────────────────┬────────────┬───────────────────────────────┬────────────────────┐
│ NAME                     │ DM │ ALIASES          │ CREATED BY │ CREATED ON                    │ VERSION MESSAGE    │
╞══════════════════════════╪════╪══════════════════╪════════════╪═══════════════════════════════╪════════════════════╡
│ tutorial.padring@1.L1    │ P4 │ HEAD LATEST      │ admin      │ 2020-06-19 10:14:50 -0400 EDT │ padring L1 release │
│ tutorial.padring@0.L1    │ P4 │                  │ admin      │ 2020-06-19 10:14:48 -0400 EDT │ variant L1         │
│ tutorial.padring@1.L2    │ P4 │ HEAD LATEST      │ admin      │ 2020-06-19 10:14:52 -0400 EDT │ padring L2 release │
│ tutorial.padring@0.L2    │ P4 │                  │ admin      │ 2020-06-19 10:14:48 -0400 EDT │ variant L2         │
│ tutorial.padring@1.L3    │ P4 │ HEAD LATEST      │ admin      │ 2020-06-19 10:14:54 -0400 EDT │ padring L3 release │
│ tutorial.padring@0.L3    │ P4 │                  │ admin      │ 2020-06-19 10:14:48 -0400 EDT │ variant L3         │
│ tutorial.padring@1.L4    │ P4 │ HEAD LATEST      │ admin      │ 2020-06-19 10:14:56 -0400 EDT │ padring L4 release │
│ tutorial.padring@0.L4    │ P4 │                  │ admin      │ 2020-06-19 10:14:49 -0400 EDT │ variant L4         │
│ tutorial.padring@6.TRUNK │ P4 │ GOLD HEAD LATEST │ admin      │ 2020-06-19 17:10:13 -0400 EDT │ tutorial release   │
│ tutorial.padring@5.TRUNK │ P4 │ GOLD             │ admin      │ 2020-06-19 10:14:47 -0400 EDT │ tutorial release   │
│ tutorial.padring@4.TRUNK │ P4 │                  │ admin      │ 2020-06-19 10:14:47 -0400 EDT │ tutorial release   │
│ tutorial.padring@3.TRUNK │ P4 │                  │ admin      │ 2020-06-19 10:14:46 -0400 EDT │ tutorial release   │
│ tutorial.padring@2.TRUNK │ P4 │                  │ admin      │ 2020-06-19 10:14:46 -0400 EDT │ tutorial release   │
│ tutorial.padring@1.TRUNK │ P4 │ GOLD             │ admin      │ 2020-06-19 10:14:44 -0400 EDT │ tutorial release   │
│ tutorial.padring@0.TRUNK │ P4 │                  │ admin      │ 2020-06-19 10:14:37 -0400 EDT │ Initial version    │
└──────────────────────────┴────┴──────────────────┴────────────┴───────────────────────────────┴────────────────────┘
Found 15 matching object(s).

Locking/Unlocking an Alias

To halt additional instances of a Moving Alias on a Line, user can 'lock" the alias:

Locking the Alias
> pi alias lock tutorial.padring@GOLD.TRUNK
Successfully locked Alias 'tutorial.padring@GOLD.TRUNK'.

A locked Alias cannot be added to or removed from any IP Version in the Line. This ensures that the current version the alias refers to will not change, unless the alias is unlocked first as seen below.

Unlocking the Alias
> pi alias lock tutorial.padring@GOLD.TRUNK
Successfully locked Alias 'tutorial.padring@GOLD.TRUNK'.
> pi alias del tutorial.padring@1.TRUNK GOLD
ERROR:Client error : 400 Client Error.
  The Alias 'GOLD' is locked for Line 'tutorial.padring@.TRUNK'.
> pi alias unlock tutorial.padring@GOLD.TRUNK
Successfully unlocked Alias 'tutorial.padring@GOLD.TRUNK'.
> pi alias del tutorial.padring@1.TRUNK GOLD
Successfully deleted Alias 'GOLD' from 'tutorial.padring@1.TRUNK'.

If a workspace tutorial.padring@GOLD.TRUNK is loaded, an error will show up as below. User will need to remove that workspace before the alias can be deleted.

Cannot remove referenced alias 'GOLD' from its last IPV 'tutorial.padring@2.TRUNK'

What permission level is needed to lock/unlock Aliases, as well as which Aliases can be locked or unlocked, is fully configurable via Server Side Hooks.