Skip to content

update to strict case-sensitive parameter names; issue #21 - #75

Merged
pdowler merged 10 commits into
ivoa-std:mainfrom
pdowler:parameter-case
Aug 27, 2026
Merged

pdowler merged 10 commits into
ivoa-std:mainfrom
pdowler:parameter-case

Conversation

@pdowler

@pdowler pdowler commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

This is currently draft as it needs a little more detail but I wanted to float the general idea as soon as possible.

Yes, I am proposing we transition to case-sensitive parameter names in a minor version. A major version should mean something like "implementors may have to rewrite from scratch" and "users need to learn a different API" and in my opinion neither of those are really true here. It's going to break some things and we will need to consider the impact when we get further along in WD-TAP-1.2, but I think here we can signal the future and should do so as strongly as possible.

@msdemlei

msdemlei commented Jul 14, 2026 via email

Copy link
Copy Markdown
Contributor

@mbtaylor

Copy link
Copy Markdown
Member
  • I agree that we should move to case-insensitive parameter names at least where we can do so without breaking things, i.e. for new standards and new parameters of existing standards. We can also strongly recommend upper case in such cases.

  • Recommending that new services enforce case sensitivity makes me a bit nervous, since it may mean old clients pointing at new services (for standards which have not themselves been updated) could break. But maybe this won't happen too often.

  • Concerning the behaviour with respect to unknown parameters: "Historically, services accepted and ignored unknown parameters" - was this mandated somewhere? I don't see it in DALI 1.1. In any case, changing this policy to must-reject needs careful thought since it may have negative consequences, in particular it makes it hard to maintain backward compatibility if a standard wants to add a new parameter in a minor version. At the most, I think DALI should set an expectation for unknown parameter handling, that concrete service specifications can override if they want to.

  • The term "historically" will become confusing in future versions of DALI. Be specific here, e.g. "historically" -> "before DALI v1.2", "this version" -> "version 1.2".

  • "In this document, parameter names are shown in upper-case for typographical clarity." - this sentence is now somewhat misleading, I'd remove it.

  • This commit includes some changes unrelated to the case-sensitivity issue (sections on MAXREC, REQUEST, RUNID are reordered as well as OpenAPI components introduced) which confuses what's new a bit.

  • Some editing/rewording is required.

@jwfraustro

Copy link
Copy Markdown
  • Concerning the behaviour with respect to unknown parameters: "Historically, services accepted and ignored unknown parameters" - was this mandated somewhere? I don't see it in DALI 1.1. In any case, changing this policy to must-reject needs careful thought since it may have negative consequences, in particular it makes it hard to maintain backward compatibility if a standard wants to add a new parameter in a minor version. At the most, I think DALI should set an expectation for unknown parameter handling, that concrete service specifications can override if they want to.

I also couldn't find it in DALI 1.1, but it is specified in TAP 1.1, in Section 2.7: https://www.ivoa.net/Documents/TAP/20190927/REC-TAP-1.1.html#tth_sEc2.7

Not all combinations of the parameters are meaningful. If a service receives a spurious parameter in an otherwise correct request, then the service must ignore the spurious parameter, must respond to the request normally and must not report errors concerning the spurious parameter.

@pdowler

pdowler commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator Author

I did re-order the parameters into two sections to clearly denote the deprecated/obsolete params, and then I moved one to put them in alphabetical order (because it was very close). That could have been done in a separate PR, but the need to do it for clarity only became obvious with the other changes.

so sorry for making that part of review harder than necessary

@pdowler

pdowler commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator Author

About "unknown parameters", @jwfraustro is correct. I think this language might be in other (older) standards as well. In general, DALI was made by refactoring: pull out common things and put them in one place... I guess we didn't do that in this case.

Still, the issue remains: in a case-sensitive world, people will make mistakes (I think when doing things more manually with curl, eg) and it would be better to fail rather than silently ignore (as TAP-1.1 says). At least for params that are case-sensitive, it is better to fail than ignore them so that users/clients will know what's happening and be able to fix it... maybe we could limit "must fail" to wrong-case of known parameters as a less extreme measure?

This change/addition to DALI is really to support the transition to case-sensitive by making (future) invalid input clear rather than subtle.

@pdowler

pdowler commented Jul 14, 2026 •

Copy link
Copy Markdown
Collaborator Author

The diff with split view is a little better and making sense of the re-org (Deprecated Parameters section), but I could also put them back in the previous order and simplify the message to some boilerplate, eg:

The VERSION parameter is deprecated and no longer used. Clients should stop using it. 
Services must accept and ignore a deprecated parameter if included in a request.

Thoughts?

@msdemlei

msdemlei commented Jul 15, 2026 via email

Copy link
Copy Markdown
Contributor

@msdemlei

msdemlei commented Jul 15, 2026 via email

Copy link
Copy Markdown
Contributor

@mbtaylor

Copy link
Copy Markdown
Member

Right, I was thinking of hint-type parameters where services are allowed to simply ignore them, like VOSI detail and (though it wasn't introduced in a version update) SCS VERB.

We explicitly jumped the other way in SAMP to support ad-hoc flexibility and experimentation with new optional parameters so e.g. you could send a non-standard colour hint along with your table load message hoping that the service might make sense of it, but not really caring if it didn't. But SAMP is a more hinty kind of protocol than typical DALI-compliant ones.

In our new world, just blindly sending detail=min would yield an
error on VOSI 1.0 services. However, VOSI 1.1 clients can catch that
with reasonable effort and drop the parameter on the next request.

I dislike that try-fail-catch-retry pattern for client-service interactions quite a lot - it would certainly require parseable error messages with a vocabulary that indicates in some detail what's gone wrong. Some way to determine up front what version the service is implementing would be IMO much preferable, though in some cases would turn a 1-shot into a 2-shot client-server interaction which is also not ideal.

One possible way to have it both ways would be to provide a syntactical marker for parameters that may legally be ignored without provoking an error, say by having a prefix like "HINT-", "OPT-" or "IGNORABLE-". Then if we need to introduce, say a verbosity option for VOSI tables in the future it could be controlled with a parameter with a name like HINT-VERB. I'm not necessarily advocating this (it's more complication) but it might be worth considering.

@msdemlei

msdemlei commented Jul 15, 2026 via email

Copy link
Copy Markdown
Contributor

@pdowler

pdowler commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator Author

I don't think hint parameters like VOSI detail are the same as "unknown parameters"... they are known and services are allowed to ignore them. That's in the detailed description of the behaviour/effect of that param and we were able to make it easier for clients by making it a "hint" rather than a specific required behaviour.

@pdowler

pdowler commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator Author

I have undone the reorg to minimise the diffs so it should be easier to see real changes now. I tweaked the text to clarify the ones that are not getting OpenAPI treatment.

In DALI-1.1 we said "VERSION parameter has been removed". Should I use that same langauge for REQUEST and RUNID? It currently says "deprecated" in the PR, but with a ?

I think this relates to "unknown parameter" handling because "removed" makes VERSION "unknown"...
I interpret "deprecated" to mean "known and ignore".

@mbtaylor

Copy link
Copy Markdown
Member

I don't think hint parameters like VOSI detail are the same as "unknown parameters"... they are known and services are allowed to ignore them.

Agreed - the point is that we were able to introduce detail in a minor version update (VOSI 1.1) without VOSI 1.0 services choking on VOSI 1.1 clients trying to use it. With the must-reject-unknown-parameter rule that wouldn't have been possible.

@mbtaylor

Copy link
Copy Markdown
Member

I agree that in view of the new unknown parameter policy, parameters from previous versions should be deprecated not removed. The unknown parameter policy should also be noted in the change log.

Aside from that and some minor typos, this PR now looks OK to me.

@pdowler

pdowler commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator Author

Clarifying the bit about deprecated vs unknown... there is a bit of a gotcha there too. If DALI specifies some parameter and later deprecates it (eg REQUEST, RUNID, VERSION) then this becomes a sort-of permanent list of parameters that services should ignore rather than reject... and maybe as a side effect I think that means no (DALI) service can (ever?) define a parameter with that name and some service-specific meaning.

Or do we have to deprecate params to signal that services should stop implementing them and later remove them to free up that name for possible re-use? In which case, VERSION is already removed and in this PR I am deprecating REQUEST and RUNID.

Or am I overthinking this?

@msdemlei

msdemlei commented Jul 17, 2026 via email

Copy link
Copy Markdown
Contributor

@pdowler

pdowler commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator Author

In the new sub section "Transition to Case-sensitive Parameter Names" there are a couple of statements with TBD:

Existing services should ... for a reasonable period of time (TBD)
Service validation should ... for a reasonable period of time (TBD)

Any thoughts on making that more concrete? "The next version of DALI (1.3) will specify strict case-sensitive..."??

@pdowler

pdowler commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator Author

In the latest commit, I simplified and just went for the most strict statement about case: any parameter defined with OpenAPI is case-sensitive. Since DALI is a common case on which other standards are built, this doesn't come into force until another standard is updated to use/refer to the OpenAPI part.

I think the meaning is that this will come into play in TAP-1.2 and in there all parameter names will be case sensitive. That's the place where we need to chose the case soon and then have a long-ish WD->PR stage where clients can be updated. Services would remain as they are until they are updated to TAP-1.2 and TAP-1.2 becomes a REC. I think that is plenty of time to improve clients and minimise pain, but when we discussed other ways to gradually introduce this change they were always more complicated/confusing and didn't actually improve the situation.

Does this look OK?

@mbtaylor

Copy link
Copy Markdown
Member

I am mostly OK with the latest text. One comment:

Existing services continue to support case-insensitive parameter names ("legacy" parameters) until they are upgraded to a new version of a standard with an OpenAPI specification and case-sensitive parameter names, after which they must only support the specified case.

I'd be more comfortable with "... after which they should only support the specified case", but I won't fight it if you feel strongly.

@pdowler

pdowler commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator Author

If we say "should" here, that would mean some services could remain lax in param name handling, even after updating to TAP-1.2. That might be ok, or it might allow people to write non-portable client code that works for some services but not others... I am on the fence about this.

@pdowler
pdowler marked this pull request as ready for review August 24, 2026 20:18
@msdemlei

msdemlei commented Aug 25, 2026 via email

Copy link
Copy Markdown
Contributor

@mbtaylor mbtaylor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this PR the Deprecated and Unknown Parameters section has been introduced, and the RUNID and REQUEST parameters have been deprecated. These changes should be noted in the change log in Appendix A.

Also, the uws:runId element should probably be removed from the example in section 2.1 since RUNID is now deprecated.

Comment thread DALI.tex
Comment on lines +1153 to +1154
Service validation must be able to differentiate between minor versions in order to
check parameter name handling.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I note that this will be problematic. Services usually do not report the DALI version with which they comply, only the service version, and service specifications are typically not written with respect to a fixed DALI version. But I'm not requesting that this text is changed or removed.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I was thinking service (eg TAP) minor version and I think that TAP-1.2 will say "DALI-1.2 or later"... so a minimum DALI version, which still allows for future additions to DALI (eg new xtypes) to be used in TAP service

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK yes, that works.

fix uws runId example use
mbtaylor
mbtaylor previously approved these changes Aug 27, 2026

@mbtaylor mbtaylor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above a query the runId element in the example, but OK. There are some other issues with that job document anyway I could address in a separate PR.

Comment thread DALI.tex Outdated
<uws:job xmlns:uws="http://www.ivoa.net/xml/UWS/v1.0">
<uws:jobId>123</uws:jobId>
<uws:runId>test</uws:runId>
<uws:runId />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why delete the text content of the runId element rather than deleting the element altogether (it is declared [0..1])?

@pdowler pdowler Aug 27, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the output of a UWS job without a valuer and it included the empty element; I am pretty sure that means the element is required by the UWS schema (but can be empty) because our xml code generally does not ommit empty elements unless it is required.

check the UWS xsd...

<xs:complexType name="JobSummary">
      <xs:annotation>
         <xs:documentation>
            The complete representation of the state of a job
         </xs:documentation>
      </xs:annotation>
      <xs:sequence>
         <xs:element name="jobId" type="uws:JobIdentifier" />
         <xs:element name="runId" type="xs:string" maxOccurs="1"
            minOccurs="0"
         >
...

I will remove the empty element from the example.

@pdowler
pdowler merged commit 86f4829 into ivoa-std:main Aug 27, 2026
1 check passed
This was referenced Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants