Is there any way to find the "feed size" in azure artifacts? - azure-devops

Is there any way to find the individual feed size in azure artifacts in azure devops? Using any kind of api call or any other way.
Microsoft is changing the lisencing for azure artifacts, I would wanna know which feed is taking up the most space, so I can take suitable steps to take care of this.
I've tried the feed management api to get the details of the feeds, but unfortunately that api doesn't display the size.

Use this in tfs database if you use Azure Devops Server.
select
[f].FeedName,
sum(cast([list].BlockFileLength as decimal(38)))/1024.0/1024.0 AS SizeInMb
from
BlobStore.tbl_Blob [blob]
join BlobStore.tbl_BlockList [list] on [list].BlobId = [blob].BlobId
join [Feed].[tbl_PackageVersionIndex] [fd] on '0x'+[fd].StorageId = CONVERT(varchar(max),blob.BlobId ,1)
join [Feed].[tbl_Feed] [f] on [fd].FeedId = [f].FeedId
join [Feed].[tbl_PackageIndex] [p] on [p].PackageId = [fd].PackageId
group by
[f].FeedName
order by
SizeInMb desc
select
[f].FeedName,
[p].PackageName,
sum(cast([list].BlockFileLength as decimal(38)))/1024.0/1024.0 AS SizeInMb,
(select count(pvi.PackageVersionId) from [Feed].[tbl_PackageVersionIndex] [pvi]
where pvi.FeedId = f.FeedId and pvi.PackageId = p.PackageId) as Versions
from
BlobStore.tbl_Blob [blob]
join BlobStore.tbl_BlockList [list] on [list].BlobId = [blob].BlobId
join [Feed].[tbl_PackageVersionIndex] [fd] on '0x'+[fd].StorageId = CONVERT(varchar(max),blob.BlobId ,1)
join [Feed].[tbl_Feed] [f] on [fd].FeedId = [f].FeedId
join [Feed].[tbl_PackageIndex] [p] on [p].PackageId = [fd].PackageId
group by
[f].FeedName,
[p].PackageName,
f.FeedId,
p.PackageId
order by SizeInMb desc

At the moment ,there is no directly way to get the size of the feed, either from the UI or the rest api. This feature is currently not supported in azure devops.
As an inconvenient method, you can get the size of each package through the download option, and then you can add the size of these packages to get the size of the feed.
I created a feature suggestion ticket for you on our Developer Community form , which is our main forum for product suggestions. You can comment and vote there to increase priority.

The suggestion ticket has been closed:
To see the feed size:
Go to your Azure DevOps Organization and pick a project
Select the Project setting -> Storage
Under Storage Type, Select “View storage breakdown”
Then you can see the storage size of your feeds.

Related

How to query advanced issue handling on github (use of milestones and projects)?

I'd like to get the repositories that make the most active use of milestones and/or projects. By "most active" I mean something like most cards moved on a project board or most issues added to a milestone.
I tried GH Archive which has yearly datasets on Google bigquery. I ran this query
SELECT
JSON_EXTRACT(payload, '$.action')
FROM
[githubarchive:year.2017]
WHERE
type in ("IssuesEvent")
and JSON_EXTRACT(payload, '$.action') in ("milestoned", "labeled", "assigned")
LIMIT
20
and this query
SELECT
type
FROM
[githubarchive:year.2017]
WHERE
type IN ("MilestoneEvent",
"ProjectEvent",
"ProjectCardEvent")
LIMIT
20
Both return zero results. Does GH Archive not import all events? Am I making a mistake in the queries? Is there another source where I can get this information?

TFS 2013 Kanban board Done column (multiple complete states)

In TFS 2013 Microsoft "fixed" a bug which allowed to map a WorkItem's state to the "Done" state in the Kanban board.
This feature was heavily used in our company. There is a petition to bring it back back but I don't think it will make it:
http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/5589316-allow-multiple-complete-meta-state-mapping-in-tfs
In order to migrate TFS2012 to TFS2013 I would like to know where the customized "Done" state columns in TFS 2012 is stored in the database to create a report which shows which team used which WorkItem state as their "Done" state.
TFS2012 Kanban Board looked like that (note the dropdown):
TFS2013 Kanban Board looks like that (note NO dropdown):
I do have access to the TFS Collection database and I would like to create a SQL query which shows me all the customization of this column in TFS 2012.
How can I get for "My WorkItem" the for every Team Project and every Team the customized "Done" state in TFS2012 database?
What other tables do I need to link to in order to get those states?
So far I could only get the TeamId, Name, ColumnType ProjectId but not the effective WorkItem and the "Done" column customization. How can I do that?
SELECT
tbl_Board.TeamId,
tbl_Board.Revision,
tbl_BoardColumn.Name,
tbl_BoardColumn.ColumnType,
tbl_WorkItemTypeExtensions.Description,
tbl_BoardColumn.[Order],
tbl_WorkItemTypeExtensions.ProjectId
FROM
tbl_WorkItemTypeExtensions
RIGHT OUTER JOIN tbl_Board ON
tbl_WorkItemTypeExtensions.Id = tbl_Board.ExtensionId
LEFT OUTER JOIN tbl_BoardColumn ON
tbl_Board.Id = tbl_BoardColumn.BoardId
Experts do not recommend accessing TFS DB but you can use Tfs_WarehouseDatabase if Reporting is configured and Data from all project collections is collected and stored in tables that are optimized for reporting.
I do not have a knowledge about the db structures of TFS but going through few important online articles I managed understood quiet a few about it and as I understood the information that is required for you is in WorkItemsAretable.
Team Foundation Server Databases
Work item field and database schema reference
Stack overflow Question Access the Kanban Column (a Team-Specific Field) for a Work Item
With those queries below you can get the state of a certain work item on the Kanban board:
USE Tfs_DefaultCollection
SELECT TOP(10)
MarkerField + 1 as FieldId,
*
FROM tbl_WorkItemTypeExtensions with(nolock)
JOIN tbl_projects on tbl_WorkItemTypeExtensions.ProjectId = tbl_projects.project_id
WHERE tbl_projects.project_name LIKE '%ProjectName%
Copy the result from "FieldId" column to below's query at position XXXXXXXX
SELECT TOP 1000
wid.Id,
wia.State,
wid.StringValue as Kanban,
wia.[Work Item Type],
wia.Title,
tn.Name as Iteration
FROM tbl_WorkItemData wid with(nolock)
JOIN WorkItemsAre wia on wia.ID = wid.Id
JOIN TreeNodes tn on wia.IterationID = tn.ID
WHERE FieldId = XXXXXXXX and RevisedDate = '9999-01-01 00:00:00.000'
ORDER BY Id
Create a Detailed Report using Report Designer
Hope the sources that I have provided above will help your problem!
I contacted the Microsoft Support and they provided me the following answer to my question:
SELECT
board.TeamId,
boardColumn.Name,
workItemTypeExtensions.Rules
FROM
tbl_Board board JOIN
tbl_WorkItemTypeExtensions workItemTypeExtensions ON board.ExtensionId = workItemTypeExtensions.Id JOIN
tbl_projects projects ON workItemTypeExtensions.ProjectId = projects.project_id JOIN
tbl_BoardColumn boardColumn ON board.Id = boardColumn.BoardId
WHERE
projects.project_name LIKE '%< ENTER YOUR PROJECT NAME HERE >%' AND
boardColumn.ColumnType = 2
ORDER BY
board.TeamId,
boardColumn.[Order]
When I check XML in the "Rules" column there I can find exactly what I was looking for.

Commerce V7 - Where do flow and feature configurations live?

I am in the process of customizing a checkout page - the shipping / billing / payment page in WebSphere commerce Aurora Store - V7 - and there are configuration checks throughout the page. Such as:
<flow:ifEnabled feature="ShippingInstructions">
...
</flow:ifEnabled>
I have found that these settings are configured in Management Center under the checkout tab, however there is one feature called "SharedShippingBillingPage" that I cannot find anywhere in configuration, Management Center, documentation, or Google. Where is this configured and how can I turn it on or off?
The flow and feature configurations are modeled as e-spots in version 7. The USAGETYPE column for these EMSPOT rows will be STOREFEATURE for features and STOREFILEREF for store file references (like CSS etc). The NAME of the EMSPOT represents the feature or file name.
Each feature EMSPOT row is associated with default content in DMEMSPOTDEF table to indicate if the feature is enabled or not. The DMEMSPOTDEF entry's CONTENTTYPE column will have the value FeatureEnabled and CONTENT column will either be true or false to indicate if the feature is enabled or not. Not having an EMSPOT or DMEMSPOTDEF entry for a feature is considered to be disabled. Each file reference EMSPOT row is also similarly associated with DMEMSPOTDEF entry.
Esites: These e-spots support store relationships. A feature can be enabled/disabled or file reference can be changed in a specific e-site by introducing a DMEMSPOTDEF entry for the corresponding store.
Since feature enable checks involve database reads, it is cached using DistributedMapCaches.
Through submitting a support request with IBM, I was told that the SharedShippingBillingPage feature has been deprecated and is not supported. They said that this feature is set to default to true (enabled) though. Features like this are typically controlled in management center, so I started getting curious as to where this configuration is stored.
It turns out that this information is stored in the database tables related to eSpots. If you want to do a direct database query to find out if a particular feature is enabled it would look similar to this:
select ddef.storeent_id, e.name, e.description, ddef.content from dmemspotdef ddef left join emspot e on ddef.emspot_id = e.emspot_id where ddef.contenttype = 'FeatureEnabled' and e.name = 'SharedShippingBillingPage';
To narrow down more to your store add a storeent_id clause to it.
select e.name, e.description, ddef.content from dmemspotdef ddef left join emspot e on ddef.emspot_id = e.emspot_id where ddef.storeent_id = 10101 and ddef.contenttype = 'FeatureEnabled' and e.name = 'SharedShippingBillingPage';

Unable to search for Orders/Customers in oracle commerce (ATG) - CSC 11.1

I am trying to perform order and profile search operations on CSC, but they return no results.
I the components /atg/commerce/textsearch/OrderOutputConfig/ and /atg/userprofiling/textsearch/ProfileOutputConfig/ and I found them indexing perfectly in the tables SRCH_ORDER_TOKENS and SRCH_PROFILE_TOKENS respectively.
After enabling loggingDebug in both components I found that the search query has additional condition seems that it's related to multisite pfrmZeroRealmsAccessible, however I found that all tokens stored in DB for orders and customers have this value pfrmdft. Below is the query extracted from logs:
[++SQLQuery++]
SELECT t1.id
FROM srch_order_tokens t1
WHERE CONTAINS(t1.tokens,?,0) > 0
-- Parameters --
p[1] = {pd: tokens} pflnAhmad% AND pfrmZeroRealmsAccessible% (java.lang.String)
[--SQLQuery--]
Note: My application has only one single site (not multisite) however I found some configuration files created by CIM related to multisite which I can't remove.
Please help me answering the following question:
Is this issue really related to multisite configuration and how can I fix this problem in orders and customers search?
In Oracle commerce 11.1 how can I disable working with multisite?
Thanks
If you have not configured multi site then you need change the property "siteAccessControlOn" to false in the below component
/atg/commerce/custsvc/environment/CSREnvironmentTools/
for more details you can get back to the below oracle docs link
http://docs.oracle.com/cd/E52191_01/Service.11-1/ATGCommerceServiceCenterInstall/html/s1203controllingsiteaccess01.html

Get list of all files with the user who checked in the latest version in TFS

Is there a way in TFS to get a list of files under source control with the user who checked in the latest version/version you have locally.
The closest functionality to this that i can find is in the source control explorer window you can see each files with the latest check-in date, but not with the user who checked it in.
There is no way currently from the VS Source control explorer. The best you can get is using the Web TFS version. You will see the name of the user in the comments section (in orange in the image below) along with changset # and any comment.
If that doesn't work for you somehow then you can either use TFS Api or SQL query against TFS DB. Following SQL should give you the result.
SELECT TOP 10
V.ChildItem AS [FileName],
I.DisplayName AS [ChangedBy],
CS.CreationDate AS [ChangeDate]
FROM tbl_Changeset CS
INNER JOIN tbl_Identity I
ON I.IdentityID = CS.OwnerID
INNER JOIN tbl_Version V
ON V.VersionFrom = CS.ChangesetID