Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login
    1. Home
    2. atripp
    3. Posts

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    atrippA Offline
    • Profile
    • Following 0
    • Followers 3
    • Topics 1
    • Posts 1,971
    • Groups 2

    Posts

    Recent
    • RE: Composer feed: metapackage is not saved as a local package

      Hi @vdubrovskyi_1854 ,

      Unfortunately this is just how composer works; it never requests the metapackage from the server (i.e. ProGet) nor does it upload the composer.lock file to ProGet.

      There is obviously no way for ProGet to "guess" what metapackages you may want. Obviously, ProGet does not automatically download/install every metapackage from the upstream repository. That's obviously not behavior anyone would want, and we will not add it to ProGet.

      You have two options:

      1. Modify the behavior of composer to request these packages from ProGet,
      2. Writing a script to parse your composer.lock and then download and/or promote those files within ProGet

      Hope that helps,

      Alana

      posted in Support
      atrippA
      atripp
    • RE: Composer feed: metapackage is not saved as a local package

      Hi @vdubrovskyi_1854 ,

      I'm not an expert on how Composer handles packages, but so far as I can tell the behavior you’re seeing is expected and is how metapackage types are handled.

      A metapackage does not contain any files and is not installed into the vendor/ directory. It exists only to define dependencies on other packages. There is no contents in the package and thus, there is nothing for Composer to fetch.

      Because of this:

      • It will appear in composer.lock as part of dependency resolution
      • It will not create a directory under vendor/
      • The content itself is not be fetched (downloaded) from Composer
      • Only the Composer API is queried

      ProGet can only cache a package when a download/fetch occurs. Since metapackages are not fetched, there is nothing to cache.

      When you downloaded manually, you are deviating from Composer’s normal install behavior for metapackages -- so that's why it appears.

      In summary, this behavior is expected and not an error in ProGet. Unfortunately there's no way for ProGet to cache these packages, since Composer never downloads them.

      Hope that helps,

      Alana

      posted in Support
      atrippA
      atripp
    • RE: [Buildmaster] Add queryable custom properties on a deployment level

      Hi @Anthony,

      I'm afraid not; the deploymentinfo is part of the BuidMaster API, and it's effectively reading data from the database that you'd otherwise see in the UI. Its fairly "disconnected" from runtime execution.

      The only persistent (i.e. outside of runtime) variables are going to be configuration (i.e. Build-scoped) variables. I suppose one thing you could do is define multiple build variables (e.g. $MyTarget1=value, $MyTarget2=value2).

      You could also store a map variable on the build, like %MyMap = %(MyTarget1: value, MyTarget2: value2) -- although that might involve a bit of awkward OtterScript to get working.

      It's not a use case we designed for.

      Cheers,
      Alana

      posted in Support
      atrippA
      atripp
    • RE: Proget is unable to download Maven packages that use a nonstandard versioning scheme

      Hi @devops-user ,

      No problem, I just pushed Release 2025.25-rc.1.

      It's based simply the 2025.24 release with the Maven patch added in. You can install like this:
      https://docs.inedo.com/docs/installation/windows/inedo-hub/howto-install-prerelease-product-versions

      Thanks,
      Alana

      posted in Support
      atrippA
      atripp
    • RE: proget.inedo.com DDOSed?

      Thanks for the heads up @felfert !

      Looks like we're back now, looks like there was some issue reporting the outage on our end :)

      Alana

      posted in Support
      atrippA
      atripp
    • RE: [Buildmaster] Add queryable custom properties on a deployment level

      hi @Anthony ,

      This sounds like a great use-case for variables; you can programmatically set them in OtterScript using an operation (check your /reference/operations page to learn what the name is, I think it was renamed in modern versions of BUildMaster), and then query them with the variables endpoint: builds/«application-name»/«release-number»/«build-number»

      Here's a link to the documentation:
      https://docs.inedo.com/docs/buildmaster/reference/api/variables

      Cheers,
      Alana

      posted in Support
      atrippA
      atripp
    • RE: Proget is unable to download Maven packages that use a nonstandard versioning scheme

      Hi @devops-user ,

      Can you try out the container image above? We'd like to get confirmation that it's working and we can then merge it to ProGet 2025 (we were otherwise planning ProGet 2026).

      Thanks
      Alana

      posted in Support
      atrippA
      atripp
    • RE: Proget is unable to download Maven packages that use a nonstandard versioning scheme

      Thanks @joshua-mitchell_8090 , we'll consider merging it in then!

      As for "how the dependencies are identified within the project build vulnerabilities", I suppose so - the IncrementalVersion2 will allow for proper vulnerability associated with packages that use "incorrect" versions (like 1.2.3.4). Jackson Databind is the one we kept coming across.

      Note you can request another trial key from my.inedo.com to try it out :)

      posted in Support
      atrippA
      atripp
    • RE: ProGet SBOM Scan Not Creating Vulnerability Issues for NPM Packages

      Hi @_moep_ ,

      So there are quite a few "moving pieces" here.

      Vulnerability -> Assessment -> Compliance -> Build Issue

      Vulnerabilities & Assessments

      First and foremost, when you navigate to qs@0.6.6 in the ProGet UI, you should see several vulnerabilities listed, such PGV-2287703. So, the "identification" is there as a result of the offline version of that database being included with ProGet.

      But, ProGet is all about reducing noise while helping elevate real risks - and most vulnerabilities are theoretical, have no real-world exploits, would require a dedicated attacker, and would result tin no real damage.

      A "Denial of Service from Prototype Pollution" is great example of such a vulnerability. The risks and problems introduced by reactively upgrading every dependency far exceed any benefits -- moreover, it "de-sensitizes" everyone to real security risks. The idea of "when everything is severe nothing is" is the same as "when everything is a priority, nothing is".

      That's where Assessment comes in. In ProGet 2025 and earlier, a vulnerability is generally as "assessed" Ignored, Warn, or Blocked. PGV-2287703 will be assessed as Warn by default.

      **NOTE this will be changing in ProGet 2025. **

      Policies & Compliance

      Next, there's the question of Compliance; the vulnerability assessment (among other things, like license, deprecation status, etc) will determines whether or not a package is Compliant, Noncompliant, or Warn.

      Compliance rules are configured in policies. In ProGet 2025, by default, the "Warn" Assessment will not make a package Noncompliant. Just Warn.

      Builds & Issues

      A Build is considered Noncompliant if any of the packages are Noncompliant. A Noncomplaint build should be blocked from deploying to production.

      This is where Issues come in: an issue may be created when a build is analyzed (try it out by clicking [analyze] in the UI) for a Noncompliant package. The purpose of these Issues are to effectively "override" the compliance status on a single package.

      They are not informational; if you want a list of packages, vulnerabilities, licenses, just use pgutil builds audit to get that listing.

      Long story short, I'd decide on a process you'd want to use before even considering web hooks for all this.

      Also note that this mostly requires a paid license, so you may not even be getting functionality if you're on a free version

      hope that helps,
      Alana

      posted in Support
      atrippA
      atripp
    • RE: Support for Air-gapped environments

      Hi @steviecoaster ,

      Offline / air-gapped installation is common and a documented use-case:
      https://docs.inedo.com/docs/installation/windows/inedo-hub/offline

      As the article mentions, you can download the "offline installer", which is essentially a
      self-extracting zip file that runs a Custom Installer created using the Inedo Hub.

      That .exe file is not suitable for automation, so if that's a requirement then you'll need to use an alternative if you wanted to automate upgrade/installation. That article outlines a few concepts, but ultimately it really depends how "air-gapped" we're talking here.

      If we're talking a SCIF with "security-guard inspected installation media", then I don't think automation is really going to really get you much ;)

      Thanks,
      Alana

      posted in Support
      atrippA
      atripp
    • RE: Allow networkservice to use the DB in Proget

      Hi @reseau_6272 ,

      Just to confirm, you've switched the ProGet service from a domain account to use Network Service, and when starting the service you're getting some kind of permission error from SQL Server?

      The easiest solution is to simply switch to using a username/password instead of Windows Integrated Authentication and edit the connection string appropriately. Keeping in mind that, eventually, you will need to move away from SQL Server and migrate to PostgreSQL, which will not have these issues.

      Otherwise, you will explicitly need to grant a login to the machine account. Network Service is represented in SQL Server as the machine account (e.g., DOMAIN\MACHINENAME$), and the identity needs to be explicitly created CREATE LOGIN [MYDOMAIN\WEB01$] FROM WINDOWS; before you can assign permissions.

      Thanks,
      Alana

      posted in Support
      atrippA
      atripp
    • RE: [ProGet] Unexpected redirect when accessing Maven package with non-standard version starting with a character

      Hi @koksime-yap_5909,

      Good news, it's available now for testing! We're considering merging to ProGet 2025, or maybe keeping for ProGet 2026?

      Anyway, I posted a lot more detail now:
      https://forums.inedo.com/topic/5696/proget-is-unable-to-download-maven-packages-that-use-a-nonstandard-versioning-scheme/2

      Thanks,
      Alana

      FYI -- locked this, in case anyone has comments/questions on that change, I guess that post will be the "official" thread at this point :)

      posted in Support
      atrippA
      atripp
    • RE: Symbol Server id issue

      Hi @it_9582 ,

      Thanks for checking that! Well, I'm not sure then :)

      From here, how about sending us the package? Then I can upload it and see about debugging in ProGet to find out where it's coming from.

      If you can open a ticket and reference QA-3010 somewhere it'll link the issues right-up on our dashboard. Then you can attach the file to that ticket.

      We'll respond on there, and eventually update this thread once we figure out the issue.

      Thanks,
      Alana

      posted in Support
      atrippA
      atripp
    • RE: Proget is unable to download Maven packages that use a nonstandard versioning scheme

      Hi @joshua-mitchell_8090 ,

      Thanks for the inquiry! The changes are available in the inedo/proget:25.0.24-ci.4 container image, and we'd love to get a second set of eyes. Are you using Docker?

      They're relatively simple, but we just avoid changing stuff like this in maintenance releases... so it's currently slated for ProGet 2026.

      But it should be okay for a maintenance release. Please let us know, we'll decide to release based on your or other user feedback.

      Here's what we changed.

      First, we added a "sixth" component called IncrementalVersion2 that will support versions like 1.2.3.4-mybuild-678 (where 4 is the second incrementing version), so that vulnerability identification can work better. Our implementation is based on the the Maven version specs, which in retrospect, seems to be followed only by ProGet. Pretty low risk here.

      Second, we changed our "path parsing" logic, which identifies the groupId, artifactId, version, artifactType from a string like /junit/junit/4.8.2/junit-4.8.2.jar into /mygroup/more-group/group-42/my-artifact/1.0-SNAPSHOT/maven-metadata.xml.

      It's a little hard to explain, so I'll just share the new and old logic:

      //OLD: if (urlPartsQ.TryPeek(out string? maybeVersion) && char.IsNumber(maybeVersion, 0))
      if (urlPartsQ.TryPeek(out string? maybeVersion) && (
          char.IsNumber(maybeVersion, 0)
          || maybeVersion.EndsWith("-SNAPSHOT", StringComparison.OrdinalIgnoreCase)
          || (this.FileName is not null && !this.FileName.Equals("maven-metadata.xml", StringComparison.OrdinalIgnoreCase))
          ))
      {
          this.Version = maybeVersion;
          urlPartsQ.Pop();
      }
      

      Long story short, this seems to work fine for v8.5.0 and shouldn't break unless someone is uploading improperly named artifact files (e.g. my-group/my-artifact/version-1000/maven-metadata.xml or e.g. my-photo/cool-snapshot/hello-kitty.jpg).

      Thanks,
      Alana

      posted in Support
      atrippA
      atripp
    • RE: [ProGet] Unexpected redirect when accessing Maven package with non-standard version starting with a character

      Hi @koksime-yap_5909 ,

      Just as a quick update! Given that this is a more wide-spread problem, we've fixed the code and plan to release in ProGet 2026 (or possibly sooner, if we can make it low-risk enough in a mainteannce release).

      Thanks,
      Alana

      posted in Support
      atrippA
      atripp
    • RE: Symbol Server id issue

      Hi @it_9582 ,

      Sorry it looks like we're dealing with a lot more code than I expected we would. I really don't know what to look at, and neither your code or our code makes sense (it's been many many years since anyone edited it.

      I'm not sure if it's helpful, but I'll share the code of our class. If you spot anything simple to change, we can explore it. Otherwise, I think the only way to move forward would be for you to share us some example nuget packages that we can set a debugger to.

      Here's the MicrosoftPdbFile class, which i combined into one giant string here:

      using System;
      using System.Collections;
      using System.Collections.Generic;
      using System.Collections.Immutable;
      using System.IO;
      using System.Linq;
      using System.Text;
      
      namespace Inedo.ProGet.Symbols;
      
      /// <summary>
      /// Provides access to the data contained in a Microsoft PDB file.
      /// </summary>
      public sealed class MicrosoftPdbFile : IDisposable, IPdbFile
      {
          private RootIndex root;
          private Dictionary<string, int> nameIndex;
          private bool leaveStreamOpen;
          private bool disposed;
      
          /// <summary>
          /// Initializes a new instance of the <see cref="MicrosoftPdbFile"/> class.
          /// </summary>
          /// <param name="stream">Stream which is backed by a PDB file.</param>
          /// <param name="leaveStreamOpen">Value indicating whether to leave the stream open after this instance is disposed.</param>
          public MicrosoftPdbFile(Stream stream, bool leaveStreamOpen)
          {
              if (stream == null)
                  throw new ArgumentNullException(nameof(stream));
      
              this.leaveStreamOpen = leaveStreamOpen;
              this.Initialize(stream);
          }
      
          /// <summary>
          /// Gets the PDB signature.
          /// </summary>
          public uint Signature { get; private set; }
          /// <summary>
          /// Gets the PDB age.
          /// </summary>
          public uint Age { get; private set; }
          /// <summary>
          /// Gets the PDB guid.
          /// </summary>
          public Guid Guid { get; private set; }
      
          ImmutableArray<byte> IPdbFile.Id => this.Guid.ToByteArray().ToImmutableArray();
          bool IPdbFile.IsPortable => false;
      
          /// <summary>
          /// Returns a stream backed by the data in a named PDB stream.
          /// </summary>
          /// <param name="streamName">Name of the PDB stream to open.</param>
          /// <returns>Stream backed by the specified named stream.</returns>
          public Stream OpenStream(string streamName)
          {
              if (streamName == null)
                  throw new ArgumentNullException(nameof(streamName));
      
              int? streamIndex = this.TryGetStream(streamName);
              if (streamIndex == null)
                  throw new InvalidOperationException($"Stream {streamName} was not found.");
      
              return this.root.OpenRead((int)streamIndex);
          }
          /// <summary>
          /// Returns an enumeration of all of the stream names in the PDB file.
          /// </summary>
          /// <returns>Enumeration of all stream names.</returns>
          public IEnumerable<string> EnumerateStreams() => this.nameIndex.Keys;
          /// <summary>
          /// Returns an enumeration of all of the source file names in the PDB file.
          /// </summary>
          /// <returns>Enumeration of all of the source file names.</returns>
          public IEnumerable<string> GetSourceFileNames()
          {
              var srcFileNames = this.EnumerateStreams()
                  .Where(s => s.StartsWith("/src/files/", StringComparison.OrdinalIgnoreCase))
                  .Select(s => s.Substring("/src/files/".Length))
                  .ToHashSet(StringComparer.OrdinalIgnoreCase);
      
              try
              {
                  using (var namesStream = this.OpenStream("/names"))
                  using (var namesReader = new BinaryReader(namesStream))
                  {
                      namesStream.Position = 8;
                      int length = namesReader.ReadInt32();
                      long endPos = length + 12;
      
                      while (namesStream.Position < endPos && namesStream.Position < namesStream.Length)
                      {
                          try
                          {
                              var name = ReadNullTerminatedString(namesReader);
                              if (name.Length > 0 && Path.IsPathRooted(name))
                                  srcFileNames.Add(name);
                          }
                          catch
                          {
                              // Can't read name
                          }
                      }
                  }
              }
              catch
              {
                  // Can't enumerate names stream
              }
      
              return srcFileNames;
          }
      
          /// <summary>
          /// Closes the PDB file.
          /// </summary>
          public void Close()
          {
              if (!this.disposed)
              {
                  this.root.Close(this.leaveStreamOpen);
                  this.disposed = true;
              }
          }
          void IDisposable.Dispose() => this.Close();
      
          private void Initialize(Stream stream)
          {
              var fileSignature = new byte[0x20];
              stream.Read(fileSignature, 0, fileSignature.Length);
      
              this.root = new RootIndex(stream);
      
              using (var sigStream = this.root.OpenRead(1))
              using (var reader = new BinaryReader(sigStream))
              {
                  uint version = reader.ReadUInt32();
                  this.Signature = reader.ReadUInt32();
                  this.Age = reader.ReadUInt32();
                  this.Guid = new Guid(reader.ReadBytes(16));
      
                  this.nameIndex = ReadNameIndex(reader);
              }
          }
          private int? TryGetStream(string name) => this.nameIndex.TryGetValue(name, out int index) ? (int?)index : null;
      
          private static Dictionary<string, int> ReadNameIndex(BinaryReader reader)
          {
              int stringOffset = reader.ReadInt32();
      
              var startOffset = reader.BaseStream.Position;
              reader.BaseStream.Seek(stringOffset, SeekOrigin.Current);
      
              int count = reader.ReadInt32();
              int hashTableSize = reader.ReadInt32();
      
              var present = new BitArray(reader.ReadBytes(reader.ReadInt32() * 4));
              var deleted = new BitArray(reader.ReadBytes(reader.ReadInt32() * 4));
              if (deleted.Cast<bool>().Any(b => b))
                  throw new InvalidDataException("PDB format not supported: deleted bits are not 0.");
      
              var nameIndex = new Dictionary<string, int>(hashTableSize + 100, StringComparer.OrdinalIgnoreCase);
      
              for (int i = 0; i < hashTableSize; i++)
              {
                  if (i < present.Length && present[i])
                  {
                      int ns = reader.ReadInt32();
                      int ni = reader.ReadInt32();
      
                      var pos = reader.BaseStream.Position;
                      reader.BaseStream.Position = startOffset + ns;
                      var name = ReadNullTerminatedString(reader);
                      reader.BaseStream.Position = pos;
      
                      nameIndex.Add(name, ni);
                  }
              }
      
              return nameIndex;
          }
          private static string ReadNullTerminatedString(BinaryReader reader)
          {
              var data = new List<byte>();
              var b = reader.ReadByte();
              while (b != 0)
              {
                  data.Add(b);
                  b = reader.ReadByte();
              }
      
              return Encoding.UTF8.GetString(data.ToArray());
          }
      
          private sealed class PagedFile : IDisposable
          {
              private LinkedList<CachedPage> pages = new LinkedList<CachedPage>();
              private Stream baseStream;
              private readonly object lockObject = new object();
              private BitArray freePages;
              private uint pageSize;
              private uint pageCount;
              private bool disposed;
      
              public PagedFile(Stream baseStream, uint pageSize, uint pageCount)
              {
                  this.baseStream = baseStream;
                  this.pageSize = pageSize;
                  this.pageCount = pageCount;
                  this.CacheSize = 1000;
              }
      
              public int CacheSize { get; }
              public uint PageSize => this.pageSize;
              public uint PageCount => this.pageCount;
      
              public void InitializeFreePageList(byte[] data)
              {
                  this.freePages = new BitArray(data);
              }
              public byte[] GetFreePageList()
              {
                  var data = new byte[this.freePages.Count / 8];
                  for (int i = 0; i < data.Length; i++)
                  {
                      for (int j = 0; j < 8; j++)
                      {
                          if (this.freePages[(i * 8) + j])
                              data[i] |= (byte)(1 << j);
                      }
                  }
      
                  return data;
              }
              public byte[] GetPage(uint pageIndex)
              {
                  if (this.disposed)
                      throw new ObjectDisposedException(nameof(PagedFile));
                  if (pageIndex >= this.pageCount)
                      throw new ArgumentOutOfRangeException();
      
                  lock (this.lockObject)
                  {
                      var page = this.pages.FirstOrDefault(p => p.PageIndex == pageIndex);
                      if (page != null)
                      {
                          this.pages.Remove(page);
                      }
                      else
                      {
                          var buffer = new byte[this.pageSize];
                          this.baseStream.Position = this.pageSize * pageIndex;
                          this.baseStream.Read(buffer, 0, buffer.Length);
                          page = new CachedPage
                          {
                              PageIndex = pageIndex,
                              PageData = buffer
                          };
                      }
      
                      while (this.pages.Count >= this.CacheSize)
                      {
                          this.pages.RemoveLast();
                      }
      
                      this.pages.AddFirst(page);
      
                      return page.PageData;
                  }
              }
              public void Dispose()
              {
                  this.baseStream.Dispose();
                  this.pages = null;
                  this.disposed = true;
              }
      
              private sealed class CachedPage : IEquatable<CachedPage>
              {
                  public uint PageIndex;
                  public byte[] PageData;
      
                  public bool Equals(CachedPage other) => this.PageIndex == other.PageIndex && this.PageData == other.PageData;
                  public override bool Equals(object obj) => obj is CachedPage p ? this.Equals(p) : false;
                  public override int GetHashCode() => this.PageIndex.GetHashCode();
              }
          }
          private sealed class PdbStream : Stream
          {
              private RootIndex root;
              private StreamInfo streamInfo;
              private uint position;
      
              public PdbStream(RootIndex root, StreamInfo streamInfo)
              {
                  this.root = root;
                  this.streamInfo = streamInfo;
              }
      
              public override bool CanRead => true;
              public override bool CanSeek => true;
              public override bool CanWrite => false;
              public override long Length => this.streamInfo.Length;
              public override long Position
              {
                  get => this.position;
                  set => this.position = (uint)value;
              }
      
              public override void Flush()
              {
              }
              public override int Read(byte[] buffer, int offset, int count)
              {
                  if (buffer == null)
                      throw new ArgumentNullException(nameof(buffer));
      
                  int bytesRemaining = Math.Min(count, (int)(this.Length - this.position));
                  int bytesRead = 0;
      
                  while (bytesRemaining > 0)
                  {
                      uint currentPage = this.position / this.root.Pages.PageSize;
                      uint currentPageOffset = this.position % this.root.Pages.PageSize;
      
                      var page = this.root.Pages.GetPage(this.streamInfo.Pages[currentPage]);
      
                      int bytesToCopy = Math.Min(bytesRemaining, (int)(this.root.Pages.PageSize - currentPageOffset));
      
                      Array.Copy(page, currentPageOffset, buffer, offset + bytesRead, bytesToCopy);
                      bytesRemaining -= bytesToCopy;
                      this.position += (uint)bytesToCopy;
                      bytesRead += bytesToCopy;
                  }
      
                  return bytesRead;
              }
              public override int ReadByte()
              {
                  if (this.position >= this.Length)
                      return -1;
      
                  uint currentPage = this.position / this.root.Pages.PageSize;
                  uint currentPageOffset = this.position % this.root.Pages.PageSize;
      
                  var page = this.root.Pages.GetPage(this.streamInfo.Pages[currentPage]);
                  this.position++;
      
                  return page[currentPageOffset];
              }
              public override long Seek(long offset, SeekOrigin origin)
              {
                  switch (origin)
                  {
                      case SeekOrigin.Begin:
                          this.position = (uint)offset;
                          break;
      
                      case SeekOrigin.Current:
                          this.position = (uint)((long)this.position + offset);
                          break;
      
                      case SeekOrigin.End:
                          this.position = (uint)(this.Length + offset);
                          break;
                  }
      
                  return this.position;
              }
              public override void SetLength(long value) => throw new NotSupportedException();
              public override void Write(byte[] buffer, int offset, int count) => throw new NotSupportedException();
              public override void WriteByte(byte value) => throw new NotSupportedException();
          }
          private sealed class RootIndex
          {
              private BinaryReader reader;
              private List<StreamInfo> streams = new List<StreamInfo>();
              private StreamInfo rootStreamInfo;
              private StreamInfo rootPageListStreamInfo;
              private uint freePageMapIndex;
      
              public RootIndex(Stream stream)
              {
                  this.reader = new BinaryReader(stream);
                  this.Initialize();
              }
      
              public PagedFile Pages { get; private set; }
      
              public Stream OpenRead(int streamIndex)
              {
                  var streamInfo = this.streams[streamIndex];
                  return new PdbStream(this, streamInfo);
              }
              public void Close(bool leaveStreamOpen)
              {
                  if (!leaveStreamOpen)
                      this.reader.Dispose();
              }
      
              private void Initialize()
              {
                  this.reader.BaseStream.Position = 0x20;
                  var pageSize = this.reader.ReadUInt32();
                  var pageFlags = this.reader.ReadUInt32();
                  var pageCount = this.reader.ReadUInt32();
                  var rootSize = this.reader.ReadUInt32();
                  this.reader.ReadUInt32(); // skip reserved
      
                  this.Pages = new PagedFile(this.reader.BaseStream, pageSize, pageCount);
                  this.freePageMapIndex = pageFlags;
      
                  // Calculate the number of pages needed to store the root data
                  int rootPageCount = (int)(rootSize / pageSize);
                  if ((rootSize % pageSize) != 0)
                      rootPageCount++;
      
                  // Calculate the number of pages needed to store the list of pages
                  int rootIndexPages = (rootPageCount * 4) / (int)pageSize;
                  if (((rootPageCount * 4) % (int)pageSize) != 0)
                      rootIndexPages++;
      
                  // Read the page indices of the pages that contain the root pages
                  var rootIndices = new List<uint>(rootIndexPages);
                  for (int i = 0; i < rootIndexPages; i++)
                      rootIndices.Add(this.reader.ReadUInt32());
      
                  // Read the free page map
                  this.reader.BaseStream.Position = pageFlags * pageSize;
                  this.Pages.InitializeFreePageList(this.reader.ReadBytes((int)pageSize));
      
                  this.rootPageListStreamInfo = new StreamInfo(rootIndices.ToArray(), (uint)rootPageCount * 4);
      
                  // Finally actually read the root indices themselves
                  var rootPages = new List<uint>(rootPageCount);
                  using (var rootPageListStream = new PdbStream(this, this.rootPageListStreamInfo))
                  using (var pageReader = new BinaryReader(rootPageListStream))
                  {
                      for (int i = 0; i < rootPageCount; i++)
                          rootPages.Add(pageReader.ReadUInt32());
                  }
      
                  this.rootStreamInfo = new StreamInfo(rootPages.ToArray(), rootSize);
                  using (var rootStream = new PdbStream(this, this.rootStreamInfo))
                  {
                      var rootReader = new BinaryReader(rootStream);
      
                      uint streamCount = rootReader.ReadUInt32();
      
                      var streamLengths = new uint[streamCount];
                      for (int i = 0; i < streamLengths.Length; i++)
                          streamLengths[i] = rootReader.ReadUInt32();
      
                      var streamPages = new uint[streamCount][];
                      for (int i = 0; i < streamPages.Length; i++)
                      {
                          if (streamLengths[i] > 0 && streamLengths[i] < int.MaxValue)
                          {
                              uint streamLengthInPages = streamLengths[i] / pageSize;
                              if ((streamLengths[i] % pageSize) != 0)
                                  streamLengthInPages++;
      
                              streamPages[i] = new uint[streamLengthInPages];
                              for (int j = 0; j < streamPages[i].Length; j++)
                                  streamPages[i][j] = rootReader.ReadUInt32();
                          }
                      }
      
                      for (int i = 0; i < streamLengths.Length; i++)
                      {
                          this.streams.Add(
                              new StreamInfo(streamPages[i], streamLengths[i])
                          );
                      }
                  }
              }
          }
          private sealed class StreamInfo
          {
              private uint[] pages;
              private uint length;
      
              public StreamInfo(uint[] pages, uint length, bool dirty = false)
              {
                  this.pages = pages;
                  this.length = length;
                  this.IsDirty = dirty;
              }
      
              public uint[] Pages
              {
                  get => this.pages;
                  set
                  {
                      if (this.pages != value)
                      {
                          this.pages = value;
                          this.IsDirty = true;
                      }
                  }
              }
              public uint Length
              {
                  get => this.length;
                  set
                  {
                      if (this.length != value)
                      {
                          this.length = value;
                          this.IsDirty = true;
                      }
                  }
              }
              public bool IsDirty { get; private set; }
          }
      }
      
      posted in Support
      atrippA
      atripp
    • RE: Symbol Server id issue

      Hi @it_9582 ,

      It's certainly possible; there's a few hundred lines of code that make up the MicrosoftPdbFile class, so I don't know which parts to share with you. Of course I'm happy to share it all if you'd like.

      Since you mentioned your colleague was able to read the file, perhaps you can share what you did, and I can see how it compares to our code?

      Thanks,
      Alana

      posted in Support
      atrippA
      atripp
    • RE: Symbol Server id issue

      Hi @it_9582 ,

      If there's an error reading the file using GetMetadataReader, then we load it using the MicrosoftPdbFile class that we wrote. So, I'm guessing that's what's causing the wrong information?

      Anyway, let me share you the full code for the PortablePdbFile class. I summarized it before, but you can see the full context of what we're doing any why.

      using System.Collections.Immutable;
      using System.IO;
      using System.Reflection.Metadata;
      
      namespace Inedo.ProGet.Symbols;
      
      public sealed class PortablePdbFile : IPdbFile
      {
          private readonly MetadataReader metadataReader;
      
          private PortablePdbFile(MetadataReader metadataReader) => this.metadataReader = metadataReader;
      
          // visual studio always treats this value like a guid, despite the portable pdb spec
          public ImmutableArray<byte> Id => this.metadataReader.DebugMetadataHeader.Id.RemoveRange(16, 4);
      
          // not really age, but actually last 4 bytes of id - ignored by visual studio
          uint IPdbFile.Age => BitConverter.ToUInt32(this.metadataReader.DebugMetadataHeader.Id.ToArray(), 16);
          bool IPdbFile.IsPortable => true;
      
          public IEnumerable<string> GetSourceFileNames()
          {
              foreach (var docHandle in this.metadataReader.Documents)
              {
                  if (!docHandle.IsNil)
                  {
                      var doc = this.metadataReader.GetDocument(docHandle);
                      yield return this.metadataReader.GetString(doc.Name);
                  }
              }
          }
      
          public static PortablePdbFile Load(Stream source)
          {
              if (source == null)
                  throw new ArgumentNullException(nameof(source));
      
              try
              {
                  var provider = MetadataReaderProvider.FromPortablePdbStream(source, MetadataStreamOptions.LeaveOpen);
                  var reader = provider.GetMetadataReader();
                  if (reader.MetadataKind != MetadataKind.Ecma335)
                      return null;
      
                  return new PortablePdbFile(reader);
              }
              catch
              {
                  return null;
              }
          }
      
          void IDisposable.Dispose()
          {
          }
      }
      
      posted in Support
      atrippA
      atripp
    • RE: Proget 25.x and Azure PostGres

      Hi @certificatemanager_4002 ,

      From the cybersecurity perspective, it's fine to leave it as root since the core process is run by the non-root user postgres inside of the container. You're never exposing a network service while the containerized process has root privileges.

      Here is more information on this if you're curious:
      https://stackoverflow.com/questions/73672857/how-to-run-postgres-in-docker-as-non-root-user

      As you can see in that link, it's technically possible to configure as non-root, but it requires more effort and doesn't really get you any benefit.

      As for load-testing and restarting, it really depends on the hardware and similar factors. Keep in mind that InedoDB is simply the postgresql container image with some minor configuration tweaks/changes. So any question you ask about InedoDB you can really ask about postgresql as well.

      As for using an external PostgreSQL server, the only information we have at this time is in the link I sent you before. You really need to be an expert on PostgreSQL if you wish to run your own server.

      Thanks,
      Alana

      posted in Support
      atrippA
      atripp
    • RE: An error occurred in the web application: v3 index.json not found.

      It looks like someone (at IP 10.2.12.133) has configured the wrong URL in Visual Studio or something. They are trying to access the NuGet API via the wrong URL (note the /feeds vs /nuget at the base url).

      Cheers,
      Alana

      posted in Support
      atrippA
      atripp
    • 1 / 1