We don't provide clear error messages to help developers troubleshoot problems with CI includes. See the proposal section with the details of the errors to improve.
We have these include types: local, file, remote, and template. All of them have their own structure and syntax. Your "include" does not match any of our include types.
abc is not a valid subkey for include. Valid subkeys are local, file, remote, or template. Learn more.
When a user includes different types of includes in the same entry (like project and template in this case), we show the same error.
Each include must use only one of local, file, remote, or template. Learn more.
This page may contain information related to upcoming products, features and functionality.
It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes.
Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.
@furkanayhan Can you provide some examples of the messages and a bit more context about the problem so I can understand what UX changes might help here? 🙏
Agreed, the error message is unclear to me as well. 💯
@marcel.amirault Would you have any suggestions for improving the error text here? I'm not sure what we're trying to say with the current error message.
@furkanayhan Thanks for the context! I have a couple more questions.
For this particular error, what's the problem with the includes and how should the user resolve the error?
Is this error the only one that we need to fix? Are there other similar instances? The issue title says "more user-friendly messages for CI includes", I wonder if there's other includes related errors that we should look at.
This error is also shown when a user includes different types in the same entry(like project and template in this case). Should we change this one as well?
Thanks @nadia_sotnikova for the ping and everyone for the great collaboration here. 🙇
@dhershkovitch - I'm going to place a candidate15.2 label on this issue so that it can be weighted start on June 1. Please let me know if there is a different timing for this work to be prioritized.
@marknuzzo Thanks, I pinged Furkan in a comment above to get more context about the problem. I'll move the issue to ready for design if the problem is clear. ☺
Hi @furkanayhan@marcel.amirault! I'm taking a look at this issue from 5 months ago 😄 There is a third scenario that I'd like to get your input on. (Please let me know if this would need Product input too 🙏)
What should the error message be if the user includes only the "file" keyword without "project"? Currently the BE code considers it as not a "matching" keyword, so it defaults to the error message: needs to match exactly one accessor!. And with the proposed changes in this issue, it would end up looking like:
file is not a valid subkey for include. Valid subkeys are local, file, remote, or template.
which doesn't seem fitting 😅. So I think a different kind of error message might be best here.
@lma-git Hrm, it looks like we've documented that wrong. It should be a docs section about include:project, not include:file, I think? I think I'm going to open up a docs MR to fix that right now. 🙇
And the error should therefore be:
file is not a valid subkey for include. Valid subkeys are local, project, remote, or template. (changing file to project in the second sentence)
It should be a docs section about include:project, not include:file, I think? I think I'm going to open up a docs MR to fix that right now.
@marcel.amirault I am not sure if either of them is true 😅 Both are required for a valid syntax. I guess we just chose file when implementing it for a random reason 🤔 However, I'd like to have include:project to make it consistent with the code.
@lma-git I guess "file is not a valid subkey for include. Valid subkeys are local, file, remote, or template." is a great start for now. You can create an MR with this and we can discuss in that MR. WDYT?