I’ve been experimenting with a SuperRepo deployment and wanted to provide some feedback on the experience. Hopefully a lot of this is already in work, but in case it’s not:
Environment Configuration
It would be great to have a spec for what can be defined in foundry.yml and env.yml. I’ve been able to deduce a few things (e.g. mapping a group parameter to submission criteria) based on how the deployed parameters show up in the marketplace installation, but some clarity would be helpful.
CI Deployment Job Scope
From what I can tell, the CI job token does not have a few permissions needed to leverage features supported by @osdk/maker:
Creating a value type fails with a blockSetValidationError: error: {blockType: VALUE_TYPE, error: ..., error: logMessage: 'ServiceException: PERMISSION_DENIED (TypeRegistry:CreateValueTypePermissionDenied)'}
Creating an object type with a ‘direct’ source works on the first deployment, but updating it fails with a jobValidationError: {errorCode: PERMISSION_DENIED, errorName: Default:PermissionDenied, parameters: {operation: objects-data-funnel:view-direct-source-schema}}
The workaround here is just to install via the UI after the version is published
Project Tie-in
Related, but I had attempted to install the repo in one Project along with it’s store, and then deploy the installation to another project and was unable to do so. I was also unable to move an existing installation and have it successfully upgrade, neither through CI or UI.
The project installation may just be a tradeoff that’s easy enough to work around, but some additional documentation on installation patterns and mechanics would clear that up. Additionally some documentation/alignment with what features are supported where (e.g. Ontology vs. @osdk/maker vs. SuperRepo) would be great.
Overall, it’s a powerful tool and I think it very nicely fills a gap in the product offering. I look forward to the planned features as well!
@johnmerlie +1 on the env.yml spec. the closest thing in the docs right now is foundry deploy configure: it walks you through the inputs (namespace, project, website domain) and writes env.yml to the repo root, and you re-run it to change anything. I couldn’t find a documented schema for foundry.yml
for the CI token scope, one thing to try before falling back to the UI install: the deploy docs support deploying from outside Foundry CI with pnpm run build && foundry deploy, using your own token in FOUNDRY_TOKEN (it needs Foundry DevOps publishing permissions). it reads the same env.yml. I haven’t tested whether your token gets past the value type and direct source checks, but it’s quicker to check than a manual install each version
on the project side, the faq says installations are locked by default. you can unlock the project, but anything you edit by hand gets overwritten on the next deploy. agree that a page on installation patterns would help
I’m happy to report that we’re shipping a jsonschema for both env.yaml and foundry.yaml files since version 0.419.0 of the foundry cli. The cli will update automatically in-platform and you can update it locally by running foundry update self. From this version, you’ll notice a # yaml-language-server: $schema=./.palantir/foundry.schema.json on the first line in your config files after running the foundry update repo command to apply pending migrations.
Once this is set up, auto-complete suggestions, and schema errors will show inside the files in VS Code with a YAML language server extension installed (it is auto-installed when working in-platform).
I’ve checked and the TypeRegistry:CreateValueTypePermissionDenied should be resolved if you try again now. I’ve put up a fix for the missing objects-data-funnel:view-direct-source-schema permission and it should roll out over the course of the next week.
Cross-project deployments are a bit harder due to permissioning but we do have a feature coming to make it simpler. I’ll make sure we follow up with better docs around it, and more broadly around different strategies for deployments & repo architecting.
I did notice the foundry foundry.yml schema added, this was very helpful. FWIW, foundry update repo did not add the schema line to the env.yml file - but after reading your response I tried a foundry deploy configure which did add the line.
I will try the value type deployment soon, thanks for the update on that and the objects-data-funnel:view-direct-source-schema permission.
I recognize the cross-project implications are a bit more complicated, but good to know its on the radar.
On a related topic, the behavior with locked projects seems a little tricky. The docs FAQ page indicates that SuperRepo installs to a locked project by default, but to my recollection that doesn’t track with how the two initial deployments I’ve done worked. In both cases I deployed in-platform into (and from within) an existing project with a single product in SINGLETON mode, and neither project was locked automatically.
On one of the installs, I manually locked the project - which had the effect of making the SuperRepo within it ‘read-only’ and preventing additional pushes/changes (and by extension upgrades). Unlocking it restored the original behavior, but the create/deploy/install sequences I’ve observed don’t seem to point to a path where a locked project is even viable.
A big caveat to that is that the two SuperRepos I created and deployed were originally authored with cli versions 0.287.0 and 0.391.0 respectively and I have not tried the locking recently - so I recognize it’s quite possible that expected behavior could be different now.
Again, I appreciate the response and look forward to future updates!