-
Notifications
You must be signed in to change notification settings - Fork 3
Refactor wording #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor wording #35
Conversation
MegaLinter status: ✅ SUCCESS
See errors details in artifact MegaLinter reports on CI Job page |
Using emojis: New job -> "📝🈺: " Job finihsed -> "📝✅: "
I've changed the message classes names and changed the commit subject prefixes to use emojis. TODO:
Include queue name:
Include job commit reference (final state for this PR):
Since the queue does not allow yet more than one job I'm not going to implement in the PR the full specification on issue #21. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Just a minor observation and my opinion on the open question.
hi @yeraydavidrodriguez @da2ce7 I've just realized that in order to add the job reference (commit hash) on the "finish job" commit subject I need to know (ovbiously) the hash:
I can add an argument to the action command and let the workflow handle that. Workflow: - name: Mark job as finished
id: finish-job
if: ${{ steps.create-job.outputs.job_created == 'true' }}
uses: ./
with:
git_repo_dir: ${{ runner.temp }}/temp_git_dir
queue_name: 'Library Update [library-aaa]'
action: 'finish-job'
job_payload: '{"field": "value", "state": "finished"}'
new_job_commit: "1e31b549c630f806961a291b4e3d4a1471f37490"
const markJobAsFinishedCommit = await queue.markJobAsFinished(
inputs.jobPayload,
inputs.newJobCommit, /* the commit where the job was created */
commitOptions
) Notice the new In the long run, we are going to add job ids, and I think maybe it makes more sense to pass the job id instead of the commit hash. Internally we can search for the commit hash. If you prefer to use the job id I can finish this PR without adding that part (job.ref.1e31b549c630f806961a291b4e3d4a1471f37490) and create a new issue to add job ids. In fact, I think it's a good idea to add job ids with a single job, before implementing the N-pending-jobs queue. |
Ignore my previous comment. With my fresh brain in the morning, I see I can get the commit because there is only one pending job. I was already thinking about multiple jobs. In fact, before adding the "finish" commit I check that there is a pending job and I have the commit hash in the StoredMessage. Anyway, I think it's a good idea the split the multi-job issue into 2 issues. We can implement first an issue to add the job number and then allow multiple pending jobs. |
The commit subject for the JobFinihsedMessage now contains the a referecne (commit) to the commit were the job was created. 📝🈺: queue-name: job.ref.f1a69d48a01cc130a64aeac5eaf762e4ba685de7
The commits with an standard subject without the queue refix must be be discarded.
The feature is finished but I want to refactor some parts of the code (minor changes, extract some classes to move validation to them).
|
hi @yeraydavidrodriguez @da2ce7 this is finished. |
Issue: #21