Repository navigation
feat(registry,registry-seed): admit and seed the catalog crawler's publish action - #96
Open
kelvinprabhu wants to merge 5 commits into
Open
kelvinprabhu wants to merge 5 commits into
kelvinprabhu wants to merge 5 commits into
Conversation
…blish action registry 0.5.0: ProviderSchema accepts a `publish` action whose mapping is an https <...>/publish/<source>.yaml pipeline URL; select/init/confirm still need method, path and a mapping folder. registry-seed 0.2.0: bindings[].publishPipelineUrl adds that action, pinned to a commit SHA unless allowUnpinnedPipeline is set; on an existing binding the Job adds or repoints it. Nothing reads the action until the network adapter's catalog crawler runs, so this can be deployed ahead of it. Refs #77
The registry's ProviderSchema already refuses a publish mapping that is not an https <...>/publish/<source>.yaml, and the Job then fails naming the binding, so the render-time copy of that regex (and allowUnpinnedPipeline) only duplicated it. Pinning to a commit SHA stays a documented convention in values.yaml. The README row repeated the values comment. Refs #77
kelvinprabhu
commented
Oct 27, 2026
| "description": "How to call this provider for one Beckn action: where, how, and with which mapping. Anything the upstream needs that the Beckn body cannot express is the adapter plugin's work, not a field here. status is per action, so one can be retired without touching the others. Permits additional properties because the registry re-validates the MERGED document on a PUT, and that document carries the osid, osUpdatedAt and osOwner the registry injected itself -- which a strict schema rejects as extraneous. Do not set this back to false without removing the update requests from the Postman collection.", | ||
| "type": "object", | ||
| "additionalProperties": true, | ||
| "required": ["action", "method", "path", "mappings", "status"], |
Collaborator
Author
There was a problem hiding this comment.
why remove existing - > "method", "path",
| "method": { "type": "string", "enum": ["GET", "POST"] }, | ||
| "path": { "$ref": "#/definitions/Path" }, | ||
| "mappings": { "$ref": "#/definitions/MappingPath" }, | ||
| "mappings": { "type": "string" }, |
Collaborator
Author
There was a problem hiding this comment.
why changed from the existing code
Comment on lines
+136
to
+148
| # | ||
| # OPTIONAL -- the pipeline the network adapter's catalog crawler runs for this | ||
| # binding, on its own schedule, to build and publish its catalogs. Adds a | ||
| # `publish` action to the row (no method or path; the provider adapter's | ||
| # routing sends a publish on). Needs registry chart >= 0.5.0, whose | ||
| # ProviderSchema admits `publish`. | ||
| # publishPipelineUrl: https://raw.githubusercontent.com/OpenAgriNet/network-adapter/<40-hex-sha>/pkg/plugin/implementation/MandiPrice/publish/agmarknet.yaml | ||
| # | ||
| # It must be https, shaped <...>/publish/<source>.yaml with its mappings/ | ||
| # folder beside it (the registry refuses anything else). Pin it to a commit | ||
| # SHA: the crawler fetches the file on every run, so a branch URL changes what | ||
| # the adapters execute on every push. On a binding that already exists the | ||
| # Job adds or repoints the action in place. |
Collaborator
Author
There was a problem hiding this comment.
dont add this comments here
| with. | ||
| type: application | ||
| version: 0.1.1 | ||
| version: 0.2.0 |
Collaborator
Author
There was a problem hiding this comment.
keep 0.1.2 only
Comment on lines
+8
to
+15
| ## [0.2.0] - 2026-10-26 | ||
|
|
||
| ### Added | ||
| - `bindings[].publishPipelineUrl` writes a `publish` action beside `select` | ||
| (no method or path). On a binding that already exists the Job adds or | ||
| repoints that one action with a PUT of the whole record; every other write is | ||
| still create-only. Needs registry 0.5.0+. | ||
|
|
Collaborator
Author
There was a problem hiding this comment.
under 0.1.2 only
| binding = f'{b["participantId"]}|{b["capability"]}' | ||
| # actions is a list, not a map: the registry treats every nested | ||
| # object as an entity and injects an osid, which a map cannot carry. | ||
| actions = [{"action": "select", |
Collaborator
Author
There was a problem hiding this comment.
keep it as before |. it looks complicated |
…y the seed Review follow-up on #96: - ProviderSchema: method, path and the MappingPath ref stay required for every action. publish joins the Action enum and MappingPath also accepts a <...>/publish/<source>.yaml pipeline URL; the allOf and PublishMappingPath are gone. - registry-seed 0.1.2: the select action is written as before, with the publish action (POST /publish) appended when publishPipelineUrl is set. ensure_publish_action does its own PUT; values.yaml is unchanged. Refs #77
The crawler executes the pipeline a publish action names, so its URL must not be fetchable over plain http. Beckn action mappings keep accepting http or https as before. Refs #77
kelvinprabhu
added a commit
that referenced
this pull request
Oct 27, 2026
ProviderSchema.json is the chart copy from #96: publish joins the Action enum and MappingPath also accepts an https <...>/publish/<source>.yaml pipeline URL, while method, path and mappings stay required for every action. setup.py now writes the publish action as POST /publish, both on a new binding and when it adds or repoints the action on an existing one. Refs #77
Collaborator
Author
|
Dev rollout: OpenAgriNet/infra-automation#19 (PR OpenAgriNet/infra-automation#20) sets |
kelvinprabhu
added a commit
that referenced
this pull request
Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #77 · Refs OpenAgriNet/network-adapter#54 · Split from #92
Objective
Let the registry hold, and registry-seed write, the
publishaction that names the pipeline the network adapter's catalog crawler runs for a binding. Split out of #92 so it can be deployed before the crawler.Solution
registry:publishjoins theActionenum, andMappingPathalso accepts a<...>/publish/<source>.yamlpipeline URL. Every action still requiresmethod,pathandmappings.registry-seed:bindings[].publishPipelineUrl(optional) appends apublishaction (POST /publish) besideselect; on a binding that already exists the Job adds or repoints that action with a PUT of the whole record.Nothing reads the action until the crawler runs (#92), so this is safe to deploy on its own.
Verification
MappingPathchecked against the agmarknet SHA-pinned pipeline URL and existing*.select.yaml/*.discover.ymlmappings (match), and.., a barex.yaml,x.publish.yaml(refused).helm lintpasses; a binding withpublishPipelineUrlrenders andseed.pycompiles; the publish helpers tested against a mocked registry (add, already present, repoint, missing row).charts/registrylint fails ondevelopmenttoo (templates/deployment.yamlline 82, unrelated).Quick-start counterpart: #93 (same schema copy).
Not done